Fix Windows tests after switch to CMake.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-09-18  Alex Christensen  <achristensen@webkit.org>
2
3         Fix Windows tests after switch to CMake.
4
5         * testing/js/WebCoreTestSupportPrefix.h:
6         Include cmakeconfig.h before wtf/Platform.h like we do in all the other precompiled headers
7         to have consistent features defined.
8
9 2015-09-18  Alexey Proskuryakov  <ap@apple.com>
10
11         REGRESSION (r189526): Nightlies don't work on Mavericks
12         https://bugs.webkit.org/show_bug.cgi?id=149215
13
14         Reviewed by Daniel Bates.
15
16         * platform/sql/SQLiteDatabase.cpp:
17         (WebCore::SQLiteDatabase::SQLiteDatabase): Fixed the check to work when cross-compiling
18         for 10.9 with 10.10 SDK.
19         (WebCore::SQLiteDatabase::disableThreadingChecks): Removed an obsolete version check -
20         WebCore has an #error elsewhere making sure that the version is higher than that.
21         (WebCore::SQLiteDatabase::authorizerFunction): Ditto.
22
23 2015-09-18  Alex Christensen  <achristensen@webkit.org>
24
25         CMake clean build fix after r189971.
26
27         * CMakeLists.txt:
28         Remove Entity.idl.
29
30 2015-09-18  Antti Koivisto  <antti@apple.com>
31
32         Support style isolation in shadow trees
33         https://bugs.webkit.org/show_bug.cgi?id=149353
34
35         Reviewed by Ryosuke Niwa.
36
37         Allow ShadowRoots to have their own StyleResolvers.
38
39         This patch just adds the mechanism, all shadow roots still use the document resolver.
40
41         * css/StyleResolver.h:
42         (WebCore::StyleResolverParentPusher::push):
43         (WebCore::StyleResolverParentPusher::~StyleResolverParentPusher):
44         * dom/Element.cpp:
45         (WebCore::Element::absoluteLinkURL):
46         (WebCore::Element::styleResolver):
47
48             Helper function for getting the right StyleResolver for the element.
49
50         (WebCore::Element::resolveStyle):
51
52             Helper function for resolving element style.
53
54         * dom/Element.h:
55         * dom/ShadowRoot.cpp:
56         (WebCore::ShadowRoot::~ShadowRoot):
57         (WebCore::ShadowRoot::styleResolver):
58         (WebCore::ShadowRoot::cloneNode):
59         * dom/ShadowRoot.h:
60         (WebCore::ShadowRoot::resetStyleInheritance):
61         * editing/EditingStyle.cpp:
62         (WebCore::styleFromMatchedRulesForElement):
63         * html/HTMLTitleElement.cpp:
64         (WebCore::HTMLTitleElement::computedTextWithDirection):
65         * html/canvas/CanvasRenderingContext2D.cpp:
66         (WebCore::CanvasRenderingContext2D::setFont):
67         * inspector/InspectorCSSAgent.cpp:
68         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
69         * page/animation/KeyframeAnimation.cpp:
70         (WebCore::KeyframeAnimation::KeyframeAnimation):
71         * rendering/RenderElement.cpp:
72         (WebCore::RenderElement::getUncachedPseudoStyle):
73         (WebCore::RenderElement::containingBlockForFixedPosition):
74         * rendering/RenderNamedFlowFragment.cpp:
75         (WebCore::RenderNamedFlowFragment::checkRegionStyle):
76         (WebCore::RenderNamedFlowFragment::computeStyleInRegion):
77         * style/StyleResolveTree.cpp:
78         (WebCore::Style::styleForElement):
79         * svg/SVGElement.cpp:
80         (WebCore::SVGElement::customStyleForRenderer):
81         (WebCore::SVGElement::animatedSMILStyleProperties):
82         * svg/SVGElementRareData.h:
83         (WebCore::SVGElementRareData::overrideComputedStyle):
84
85 2015-09-18  Alex Christensen  <achristensen@webkit.org>
86
87         [Win] Fix bindings tests after r189934.
88
89         Reviewed by Brent Fulgham.
90
91         * bindings/scripts/preprocessor.pm:
92         (applyPreprocessor):
93         Bindings tests use /usr/bin/gcc from cygwin, which requires different flags.
94         If we're using gcc to preprocess, use it like we did before r189934.
95
96 2015-09-18  Eric Carlson  <eric.carlson@apple.com>
97
98         [MediaStream] Finish implementing MediaDevices.enumerateDevices
99         https://bugs.webkit.org/show_bug.cgi?id=149322
100         <rdar://problem/22750866>
101
102         Reviewed by Brent Fulgham.
103
104         Test: fast/mediastream/MediaDevices-enumerateDevices.html
105
106         * CMakeLists.txt: Add MediaDevicesRequest.cpp
107
108         * Modules/mediastream/MediaDeviceInfo.h: Add MediaDeviceInfoVector typedef.
109
110         * Modules/mediastream/MediaDevices.cpp:
111         (WebCore::MediaDevices::enumerateDevices): Use MediaDevicesRequest.
112         * Modules/mediastream/MediaDevices.h: EnumerateDevicePromise -> EnumerateDevicesPromise.
113         * Modules/mediastream/MediaDevices.idl:
114
115         * Modules/mediastream/MediaDevicesRequest.cpp: Added.
116         (WebCore::MediaDevicesRequest::create):
117         (WebCore::MediaDevicesRequest::MediaDevicesRequest):
118         (WebCore::MediaDevicesRequest::~MediaDevicesRequest):
119         (WebCore::MediaDevicesRequest::securityOrigin):
120         (WebCore::MediaDevicesRequest::contextDestroyed):
121         (WebCore::MediaDevicesRequest::start):
122         (WebCore::MediaDevicesRequest::didCompleteRequest):
123         (WebCore::MediaDevicesRequest::requestOrigin):
124         * Modules/mediastream/MediaDevicesRequest.h: Added.
125
126         * Modules/mediastream/MediaStreamTrackSourcesRequest.cpp:
127         (WebCore::MediaStreamTrackSourcesRequest::MediaStreamTrackSourcesRequest):
128         (WebCore::MediaStreamTrackSourcesRequest::didCompleteRequest):
129         * Modules/mediastream/MediaStreamTrackSourcesRequest.h:
130
131         * Modules/mediastream/UserMediaRequest.cpp:
132         (WebCore::UserMediaRequest::enumerateDevices): Deleted.
133         * Modules/mediastream/UserMediaRequest.h:
134
135         * WebCore.xcodeproj/project.pbxproj: Add MediaDevicesRequest.cpp
136
137         * platform/mediastream/MediaDevicesPrivate.cpp: Removed.
138         * platform/mediastream/MediaDevicesPrivate.h: Removed.
139
140         * platform/mediastream/MediaStreamCreationClient.h:
141         * platform/mediastream/MediaStreamTrackSourcesRequestClient.h:
142         (WebCore::MediaStreamTrackSourcesRequestClient::~MediaStreamTrackSourcesRequestClient):
143
144         * platform/mediastream/mac/AVCaptureDeviceManager.h:
145         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
146         (WebCore::AVCaptureDeviceManager::verifyConstraintsForMediaType): Optionally take an
147           AVCaptureSession instead of always allocating one.
148         (WebCore::AVCaptureDeviceManager::bestSourcesForTypeAndConstraints): Pass the AVCaptureSession
149           to verifyConstraintsForMediaType.
150
151         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
152         (WebCore::RealtimeMediaSourceCenterMac::getMediaStreamTrackSources):
153
154         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
155         (WebCore::MockRealtimeMediaSourceCenter::getMediaStreamTrackSources):
156
157 2015-09-18  Chris Dumez  <cdumez@apple.com>
158
159         WebContent crash in WebCore::MemoryPressureHandler::releaseCriticalMemory() with GuardMalloc when preparing to suspend
160         https://bugs.webkit.org/show_bug.cgi?id=149350
161
162         Reviewed by Antti Koivisto.
163
164         in MemoryPressureHandler::releaseCriticalMemory(), iterate over a copy of
165         Document::allDocuments() instead of iterating over allDocuments() directly.
166         Also make sure the Documents are ref'd inside the copy.
167
168         This is needed because clearing the StyleResolver of a Document may cause
169         Documents to be unref'd and removed from the allDocument() HashSet.
170
171         No new tests, already covered by existing tests.
172
173         * platform/MemoryPressureHandler.cpp:
174         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
175
176 2015-09-18  Brent Fulgham  <bfulgham@apple.com>
177
178         [Win] Unreviewed build fix.
179
180         Non-cmake build does not include quotes in the file path, so a search
181         operation always failed.
182
183         * bindings/scripts/preprocessor.pm:
184         (applyPreprocessor):
185
186 2015-09-18  Chris Dumez  <cdumez@apple.com>
187
188         REGRESSION (r182449, Mavericks ONLY): Pages re-open empty after swiping back and scrolling on them
189         https://bugs.webkit.org/show_bug.cgi?id=149317
190         <rdar://problem/22521514>
191
192         Reviewed by Tim Horton.
193
194         Disable on Mavericks a PageCache optimization from r182449 which lets
195         into PageCache pages that only have certain types of pending loads
196         (images and XHR). This is because it has been determined via bisection
197         that this change is the one that introduced the bug on Mavericks.
198
199         * loader/DocumentLoader.cpp:
200         (WebCore::areAllLoadersPageCacheAcceptable):
201
202 2015-09-18  Brent Fulgham  <bfulgham@apple.com>
203
204         [Win] Use tiled drawing for main background layer
205         https://bugs.webkit.org/show_bug.cgi?id=149347
206         <rdar://problem/22759632>
207
208         Reviewed by Alex Christensen.
209
210         Turn on tiled drawing for the root layer when using
211         accelerated compositing on Windows. 
212
213         * page/Frame.h: Export the 'isMainFrame' method so that
214         it can be used by WebKit.dll.
215         * platform/graphics/ca/GraphicsLayerCA.cpp:
216         (WebCore::GraphicsLayerCA::getDebugBorderInfo): Use a full
217         pixel width on Windows, since it doesn't support High DPI (yet).
218         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
219         (PlatformCALayerWin::create): Use nullptr.
220         (toCACFFilterType): Ditto.
221         (layerTreeHostForLayer): Ditto.
222         (PlatformCALayer::platformCALayer): Ditto.
223          (PlatformCALayerWin::PlatformCALayerWin): Use the correct contents scaling
224         factor for new layers.
225         (PlatformCALayerWin::animationForKey): Use nullptr.
226         * platform/graphics/ca/win/WebTiledBackingLayerWin.cpp:
227         (WebTiledBackingLayerWin::displayCallback): Update assertion to
228         recognize LayerTypePageTiledBackingLayer as a valid layer to be used
229         in this display routine.
230
231 2015-09-18  Chris Dumez  <cdumez@apple.com>
232
233         Drop support for Entity Node type
234         https://bugs.webkit.org/show_bug.cgi?id=149239
235
236         Reviewed by Darin Adler.
237
238         Drop support for Entity DOM type. This legacy type has been dropped in
239         DOM4:
240         - https://dom.spec.whatwg.org/#dom-core-changes
241
242         Chrome [1] and Firefox [2] already dropped it. There is currently no
243         way to construct an Entity Node in WebKit.
244
245         [1] https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/k3tZGP2EANc
246         [2] https://developer.mozilla.org/en-US/docs/Web/API/Entity
247
248         No new tests, already covered by existing W3C test.
249
250         * DerivedSources.cpp:
251         * WebCore.xcodeproj/project.pbxproj:
252         * bindings/gobject/WebKitDOMPrivate.cpp:
253         (WebKit::wrap): Deleted.
254         * bindings/js/JSNodeCustom.cpp:
255         (WebCore::createWrapperInline): Deleted.
256         * bindings/objc/DOM.mm:
257         (kitClass): Deleted.
258         * dom/Document.cpp:
259         (WebCore::Document::importNode): Deleted.
260         (WebCore::Document::adoptNode): Deleted.
261         (WebCore::Document::childTypeAllowed): Deleted.
262         (WebCore::Document::canAcceptChild): Deleted.
263         * dom/Entity.h:
264         * dom/Entity.idl:
265         * dom/Node.cpp:
266         (WebCore::Node::isDefaultNamespace): Deleted.
267         (WebCore::Node::lookupPrefix): Deleted.
268         (WebCore::Node::lookupNamespaceURI): Deleted.
269         (WebCore::appendTextContent): Deleted.
270         (WebCore::Node::setTextContent): Deleted.
271         * dom/Node.h:
272         * dom/Range.cpp:
273         (WebCore::lengthOfContentsInNode): Deleted.
274         (WebCore::Range::processContentsBetweenOffsets): Deleted.
275         (WebCore::Range::insertNode): Deleted.
276         (WebCore::Range::checkNodeWOffset): Deleted.
277         (WebCore::Range::checkNodeBA): Deleted.
278         (WebCore::Range::selectNode): Deleted.
279         (WebCore::Range::selectNodeContents): Deleted.
280         (WebCore::Range::surroundContents): Deleted.
281         * editing/MarkupAccumulator.cpp:
282         (WebCore::MarkupAccumulator::appendStartMarkup): Deleted.
283         * xml/XPathUtil.cpp:
284         (WebCore::XPath::isValidContextNode): Deleted.
285
286 2015-09-17  Brian Burg  <bburg@apple.com>
287
288         ASSERT(!m_frontendRouter->hasLocalFrontend()) when running Web Inspector tests
289         https://bugs.webkit.org/show_bug.cgi?id=149006
290
291         Reviewed by Joseph Pecoraro.
292
293         The patch fixes two defects:
294
295             (1) the stub inspector frontend is not closed reliably when a test times out
296             (2) frontend clients and channels are sometimes connected to the wrong controllers
297
298         When an inspector test times out, the test runner requests (via the inspected page's controller)
299         that the inspector close. But, the stub frontend works independently of InspectorClient,
300         so the inspected page's InspectorController cannot close the stub frontend. The assertion
301         failed because the stub frontend's channel was still connected to the inspected page's controller.
302
303         The fix is to route requests for the inspector window to close through the FrontendClient's
304         closeWindow() method rather than InspectorClient, so that the stub frontend can react.
305         The other code paths (i.e., through close() and closeLocalFrontend()) have been removed.
306
307         Now that the stub frontend eagerly closes its channel before the Page gets GC'd, several
308         methods invoked during test teardown must be reordered to avoid using dangling pointers.
309
310         The stub frontend in Internals has been rewritten to properly disconnect itself
311         from both the frontend and inspected page's inspector controllers.
312
313         While fixing this bug, I noticed that we are inconsistent about which inspector controller
314         (the inspected page's or the frontend page's) receives the FrontendClient and which takes
315         FrontendChannels. It is now the case for all configurations that the FrontendClient is
316         connected to the frontend page's inspector controller, and FrontendChannels are connected
317         to the inspected page's inspector controller. In the WK2 case, the Inspector Process
318         has an attached frontend client, and its inspected Web Process has frontend channels.
319
320         No new tests, covered by existing tests.
321
322         * inspector/InspectorClient.h:
323         * inspector/InspectorController.cpp:
324         (WebCore::InspectorController::~InspectorController):
325         (WebCore::InspectorController::inspectedPageDestroyed):
326
327             This method is called from Page::~Page, so we should disconnect all frontends now
328             before subframes are detached from the page, making InspectorController inaccessible.
329
330         (WebCore::InspectorController::disconnectFrontend):
331
332             The teardown branch was never being run before, because we never disconnected the
333             frontend's channel correctly. Some agents use the overlay during teardown, so notify
334             agents before releasing the overlay page.
335
336         (WebCore::InspectorController::disconnectAllFrontends):
337
338             The actions from close() are inlined and rearranged here, similar to disconnectFrontend.
339             We have to notify agents before removing InspectorClient as some agents make use of it.
340
341         (WebCore::InspectorController::close): Deleted.
342         (WebCore::InspectorController::show): This assertion is vacuously true now.
343         * inspector/InspectorFrontendClientLocal.cpp:
344         (WebCore::InspectorFrontendClientLocal::inspectedPage): Added. Used by stub frontend.
345         * inspector/InspectorFrontendClientLocal.h:
346         (WebCore::InspectorFrontendClientLocal::frontendPage): Added.
347         * loader/EmptyClients.h:
348         * page/Page.cpp:
349         (WebCore::Page::~Page):
350
351             Notify inspector before detaching frames, otherwise it will not be possible to
352             cleanly disconnect the stub frontend's channel.
353
354         * testing/Internals.cpp:
355
356             Rewrite the stub frontend to better encapsulate its setup and teardown logic.
357
358         (WebCore::InspectorStubFrontend::frontendPage): Added.
359         (WebCore::InspectorStubFrontend::InspectorStubFrontend): Added.
360         (WebCore::InspectorStubFrontend::~InspectorStubFrontend): Added.
361         (WebCore::InspectorStubFrontend::closeWindow): Added.
362         (WebCore::InspectorStubFrontend::sendMessageToFrontend): Added.
363         (WebCore::Internals::openDummyInspectorFrontend):
364         (WebCore::Internals::closeDummyInspectorFrontend):
365         (WebCore::InspectorFrontendClientDummy::~InspectorFrontendClientDummy): Deleted.
366         (WebCore::InspectorFrontendClientDummy::InspectorFrontendClientDummy): Deleted.
367         (WebCore::InspectorFrontendChannelDummy::~InspectorFrontendChannelDummy): Deleted.
368         (WebCore::InspectorFrontendChannelDummy::InspectorFrontendChannelDummy): Deleted.
369         (WebCore::InspectorFrontendChannelDummy::sendMessageToFrontend): Deleted.
370         * testing/Internals.h:
371
372 2015-09-18  Chris Dumez  <cdumez@apple.com>
373
374         classList.toggle(name, force) treats undefined `force` argument as false
375         https://bugs.webkit.org/show_bug.cgi?id=148582
376         <rdar://problem/22545600>
377
378         Reviewed by Ryosuke Niwa.
379
380         classList.toggle(name, force) treats undefined `force` argument as false.
381         However, according to the Web IDL specification, we should treat undefined
382         as if the value was missing for optional parameters that do not have a
383         default value:
384         https://heycam.github.io/webidl/#dfn-overload-resolution-algorithm (Step 14.4).
385
386         For optional parameters that have a default value, undefined should be
387         converted into the default value. This is supported as of r189957.
388
389         In this patch, we use custom bindings to provide a spec-compliant version
390         of DOMTokenList.toggle(). Unfortunately, adding such support in the
391         bindings generator would be a non-trivial task (I guess, we would have to
392         generalize using WTF::Optional<> type for all optional parameters in our
393         implementation. Also we cannot use the default value support added in
394         r189957 because the toggle() implementation needs to be able to
395         distinguish all 3 states for the 'force' parameter: true, false or
396         missing.
397
398         The new behavior matches the behavior of Firefox and the specification.
399
400         Test: fast/dom/Element/class-list-toggle.html
401
402         * CMakeLists.txt:
403         * WebCore.vcxproj/WebCore.vcxproj:
404         * WebCore.vcxproj/WebCore.vcxproj.filters:
405         * WebCore.xcodeproj/project.pbxproj:
406         * bindings/js/JSBindingsAllInOne.cpp:
407         * bindings/js/JSDOMTokenListCustom.cpp: Added.
408         (WebCore::JSDOMTokenList::toggle):
409         * html/DOMTokenList.h:
410         * html/DOMTokenList.idl:
411
412 2015-09-17  Joseph Pecoraro  <pecoraro@apple.com>
413
414         Web Inspector: Remove unused canClearBrowserCookies / canClearBrowserCache protocol methods
415         https://bugs.webkit.org/show_bug.cgi?id=149307
416
417         Reviewed by Brian Burg.
418
419         * inspector/InspectorClient.h:
420         (WebCore::InspectorClient::canClearBrowserCache): Deleted.
421         (WebCore::InspectorClient::clearBrowserCache): Deleted.
422         (WebCore::InspectorClient::canClearBrowserCookies): Deleted.
423         (WebCore::InspectorClient::clearBrowserCookies): Deleted.
424         These were unimplemented by any ports.
425
426         * inspector/CommandLineAPIHost.cpp:
427         * inspector/InspectorController.cpp:
428         (WebCore::InspectorController::InspectorController):
429         * inspector/InspectorResourceAgent.cpp:
430         (WebCore::InspectorResourceAgent::InspectorResourceAgent):
431         (WebCore::InspectorResourceAgent::canClearBrowserCache): Deleted.
432         (WebCore::InspectorResourceAgent::clearBrowserCache): Deleted.
433         (WebCore::InspectorResourceAgent::canClearBrowserCookies): Deleted.
434         (WebCore::InspectorResourceAgent::clearBrowserCookies): Deleted.
435         * inspector/InspectorResourceAgent.h:
436         * inspector/InspectorTimelineAgent.cpp:
437         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
438         * inspector/InspectorTimelineAgent.h:
439         * inspector/WorkerInspectorController.cpp:
440         (WebCore::WorkerInspectorController::WorkerInspectorController):
441         Remove uses of InspectorClient where it is no longer needed.
442
443 2015-09-16  Ryosuke Niwa  <rniwa@webkit.org>
444
445         Update features.json for Shadow DOM and Web Components
446         https://bugs.webkit.org/show_bug.cgi?id=149249
447
448         Reviewed by Antti Koivisto.
449
450         Updated the status of Shadow DOM and made myself the point of contact for shadow DOM and web components.
451
452         * features.json:
453
454 2015-09-17  Chris Dumez  <cdumez@apple.com>
455
456         [WebIDL] Add support for default parameter values
457         https://bugs.webkit.org/show_bug.cgi?id=149263
458         <rdar://problem/22545600>
459
460         Reviewed by Ryosuke Niwa.
461
462         Add support for default parameter values to our Web IDL parser and JS
463         bindings generator. This allows the bindings to convert undefined to
464         the parameter's default value for optional parameters:
465         https://heycam.github.io/webidl/#dfn-optional-argument-default-value
466
467         Previously, our bindings generator would just convert undefined to
468         0 / false / "undefined" for optional parameters, depending on the
469         parameter type.
470
471         This patch uses the new default parameter support to fix a bug in
472         document.createNodeIterator() / document.createTreeWalker()'s handling
473         of the whatToShow parameter:
474         https://dom.spec.whatwg.org/#document
475
476         WebKit currently was undefined to 0 in this case, even though it should
477         use the parameter's default value: OxFFFFFFFF.
478
479         I am planning to go through other optional parameters in a follow-up
480         patch and add default values where needed.
481
482         No new tests, already covered by existing layout tests and
483         added bindings tests coverage.
484
485         * bindings/scripts/CodeGeneratorJS.pm:
486         (GenerateParametersCheck):
487         * bindings/scripts/IDLParser.pm:
488         (parseOptionalOrRequiredArgument):
489         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
490         (webkit_dom_test_obj_method_with_optional_arg_and_default_value):
491         (webkit_dom_test_obj_method_with_optional_string_and_default_value):
492         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
493         * bindings/scripts/test/JS/JSTestObj.cpp:
494         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArgAndDefaultValue):
495         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValue):
496         * bindings/scripts/test/ObjC/DOMTestObj.h:
497         * bindings/scripts/test/ObjC/DOMTestObj.mm:
498         (-[DOMTestObj methodWithOptionalArgAndDefaultValue:]):
499         (-[DOMTestObj methodWithOptionalStringAndDefaultValue:]):
500         * bindings/scripts/test/TestObj.idl:
501         * dom/Document.idl:
502
503 2015-09-17  Dean Jackson  <dino@apple.com>
504
505         Multi-hop reference cycles not detected.
506         https://bugs.webkit.org/show_bug.cgi?id=149181
507
508         Reviewed by Jon Honeycutt.
509
510         SVG's cycle detection was not picking up a
511         case where an element was drawing a pattern, that
512         referenced another pattern, that referenced another
513         pattern, that referenced the original pattern.
514
515         The issue was that we were forgetting to check the
516         children of the renderer itself, rather than just
517         the children of the referenced renderers.
518
519         Found by running a test from Blink.
520
521         I also took the opportunity to clean up the debugging
522         code that logs cycle detection.
523
524         Test: svg/custom/pattern-3-step-cycle.html
525
526         * platform/Logging.h: Add a new SVG channel. I can't believe we
527         didn't already have one!
528         * rendering/svg/SVGResourcesCycleSolver.cpp:
529         (WebCore::SVGResourcesCycleSolver::resourceContainsCycles): Check the referenced
530         resources for cycles.
531         (WebCore::SVGResourcesCycleSolver::resolveCycles): Logging update.
532
533 2015-09-17  Dean Jackson  <dino@apple.com>
534
535         Cyclic resources were not detected if the reference had deep containers
536         https://bugs.webkit.org/show_bug.cgi?id=149182
537
538         Reviewed by Jon Honeycutt.
539
540         During our examination of the SVG rendering tree looking for cycles,
541         if a resource pointed to something that had a nested structure, and
542         one of the parent nodes in that structure was a container object
543         without resources itself, we were not looking into the children.
544
545         Test: svg/custom/pattern-content-cycle-w-resourceless-container.html
546
547         * rendering/svg/SVGResourcesCycleSolver.cpp:
548         (WebCore::SVGResourcesCycleSolver::resourceContainsCycles): We should still
549         check all children resources, but not exit early if there are none. Instead
550         we should recurse into any children.
551         (WebCore::SVGResourcesCycleSolver::resolveCycles): Changes to some debug
552         code that no longer compiled (it's still off by default, but at least
553         it will work now).
554
555 2015-09-17  Myles C. Maxfield  <mmaxfield@apple.com>
556
557         REGRESSION(r188871): 50% regression in page load time of Wikipedia home page
558         https://bugs.webkit.org/show_bug.cgi?id=149320
559
560         Reviewed by Daniel Bates.
561
562         This is due to <rdar://problem/22144016> about how language-specific
563         font fallback is an order of magnitude slower than regular non-language-
564         specific font-fallback. This performance problem has been fixed, but not
565         for iOS 9.
566
567         No new tests because there is no correctness change.
568
569         * platform/graphics/ios/FontCacheIOS.mm:
570         (WebCore::platformLookupFallbackFont):
571
572 2015-09-17  Ryosuke Niwa  <rniwa@webkit.org>
573
574         Add HTMLSlotElement, Element.slot, and NonDocumentTypeChildNode.assignedSlot
575         https://bugs.webkit.org/show_bug.cgi?id=149241
576
577         Reviewed by Antti Koivisto.
578
579         Implement the slotting algorithm and related features: slot element, slot attribute, and assignedSlot
580         as specified by https://w3c.github.io/webcomponents/spec/shadow/#slotting-algorithm
581         as of 8bf56e8ea5521a7a911efd1cabeb2be0d5c3ca74.
582
583         The slotting algorithm is implemented by the newly introduced SlotAssignment class which is created on
584         demand by ShadowRoot when a HTMLSlotElement is inserted into the shadow root. SlotAssignment contains
585         a HashMap of a slot name to SlotInfo structure, which holds the number of slot elements of the said name,
586         the first element if it's known, and an ordered list of the assigned nodes.
587
588         When there is exactly one slot element of a given name, "element" returns the slot element in O(1).
589         When another slot of the same name is inserted into the same shadow tree, we increment "elementCount" and
590         set "element" to nullptr since we don't know which slot element comes first in the tree order without O(n)
591         tree traversal, which is lazily done in resolveAllSlotElements.
592
593         Observe that SlotInfo's "element" can be nullptr in two occasions: (1) when there is no slot element of
594         the given name (SlotAssignment::assignSlots may insert such an entry), and (2) when there are more than
595         one slot elements of the same name and we haven't run resolveAllSlotElements.
596
597         Resolving assigned nodes, on the other hand, is always O(n) unless all assignments are up to date, and
598         lazily computed by assignSlots. This is because inserting or removing a node doesn't tell us the relative
599         ordering of the node with respect to other nodes assigned to the same slot. For example, let's say we have
600         child nodes (A, B, C, D) and (A, D) are assigned to slot Alpha and (B, C) are assigned to slot Beta. If we
601         insert a new node E between nodes B and C and this node is assigned to slot Alpha, then we must create an
602         ordered list (A, E, D) for slot Alpha. Unfortunately, determining where to insert E in this list can cost
603         O(n) child traversal in the worst case.
604
605         Tests: fast/shadow-dom/HTMLSlotElement-interface.html
606                fast/shadow-dom/NonDocumentTypeChildNode-interface-assignedSlot.html
607
608         * CMakeLists.txt:
609         * DerivedSources.cpp:
610         * DerivedSources.make:
611         * WebCore.vcxproj/WebCore.vcxproj:
612         * WebCore.vcxproj/WebCore.vcxproj.filters:
613         * WebCore.xcodeproj/project.pbxproj:
614         * dom/Element.cpp:
615         (WebCore::Element::attributeChanged): Invalidate the slot assignments when slot attribute is changed.
616         (WebCore::Element::childrenChanged): Ditto for when a child node is inserted or removed. We can avoid it
617         when there is no default slot and only text nodes are removed or added in the future.
618         * dom/Element.idl: Added slot attribute on Element.
619         * dom/Node.cpp:
620         (WebCore::Node::assignedSlot): Added. Returns the assigned slot if the slot is in an open shadow tree.
621         * dom/Node.h:
622         * dom/NonDocumentTypeChildNode.idl: Added assignedSlot. Only expose in JS for now to avoid generating
623         the binding code for HTMLSlotElement in other languages.
624         * dom/ShadowRoot.cpp:
625         (WebCore::ShadowRoot::findAssignedSlot): Added. Forwards it to the implementation in SlotAssignment.
626         (WebCore::ShadowRoot::addSlotElementByName): Ditto.
627         (WebCore::ShadowRoot::removeSlotElementByName): Ditto.
628         (WebCore::ShadowRoot::invalidateSlotAssignments): Ditto.
629         (WebCore::ShadowRoot::assignedNodesForSlot): Ditto.
630         * dom/ShadowRoot.h:
631         (WebCore::ShadowRoot): Added m_slotAssignments as a member.
632         * dom/SlotAssignment.cpp: Added.
633         (WebCore::treatNullAsEmpty): Added. See https://w3c.github.io/webcomponents/spec/shadow/#dfn-default-slot
634         (WebCore::SlotAssignment::findAssignedSlot): Find the slot element to which a given node is assigned.
635         Since there could be multiple slot elements of the same name (or lack thereof), call findFirstSlotElement
636         to find the first slot element.
637         (WebCore::SlotAssignment::addSlotElementByName): Added. Called when a new slot element is inserted into
638         the associated shadow tree. When a slot element's name is changed, removeSlotElementByName is called on
639         with the old name before addSlotElementByName is called with the new name.
640         (WebCore::SlotAssignment::removeSlotElementByName): Ditto for removal.
641         (WebCore::SlotAssignment::assignedNodesForSlot): Added. Finds the ordered list of assigned nodes for
642         a given slot element. When there are multiple slot elements of the same name, we return the list only if
643         SlotInfo::element matches the argument. 
644         (WebCore::SlotAssignment::findFirstSlotElement): Added. Resolves SlotInfo::element if needed.
645         (WebCore::SlotAssignment::resolveAllSlotElements): Finds SlotInfo::element for all slots. We resolve all
646         slots simultaneously to avoid doing O(number of nodes) tree traversal for O(number of slots) to avoid
647         the worst case O(n^2) behavior when all nodes in the shadow tree are slot elements of the same name. 
648         (WebCore::SlotAssignment::assignSlots): Added. Computes the slot assignments by traversing each child
649         of the shadow host and adding to the appropriate SlotInfo::assignedNodes, creating a new entry if needed.
650         * dom/SlotAssignment.h: Added.
651         (WebCore::SlotAssignment::SlotAssignment):
652         (WebCore::SlotAssignment::invalidate):
653         (WebCore::SlotAssignment::SlotInfo::SlotInfo):
654         (WebCore::SlotAssignment::SlotInfo::hasSlotElements):
655         (WebCore::SlotAssignment::SlotInfo::hasDuplicatedSlotElements):
656         (WebCore::SlotAssignment::SlotInfo::shouldResolveSlotElement):
657         * html/HTMLAttributeNames.in: Added slot attribute.
658         * html/HTMLSlotElement.cpp: Added.
659         (WebCore::HTMLSlotElement::create):
660         (WebCore::HTMLSlotElement::HTMLSlotElement):
661         (WebCore::HTMLSlotElement::insertedInto): Calls addSlotElementByName.
662         (WebCore::HTMLSlotElement::removedFrom): Calls removeSlotElementByName. Because the element had already
663         been removed from the shadow tree, we can't use containingShadowRoot() to find the ShadowRoot here.
664         (WebCore::HTMLSlotElement::attributeChanged): Calls removeSlotElementByName and addSlotElementByName.
665         (WebCore::HTMLSlotElement::getDistributedNodes): Returns an ordered list of the assigned nodes.
666         * html/HTMLSlotElement.h: Added.
667         * html/HTMLSlotElement.idl: Added.
668         * html/HTMLTagNames.in: Added slot element.
669
670 2015-09-17  Chris Dumez  <cdumez@apple.com>
671
672         Regression(r189881): release assertion hit in toJS(ExecState*, JSDOMGlobalObject*, DocumentFragment*)
673         https://bugs.webkit.org/show_bug.cgi?id=149281
674
675         Reviewed by Ryosuke Niwa.
676
677         After r189881, we started generating a toJS() function for DocumentFragment
678         as an optimization. DocumentFragment has a subclass (ShadowRoot) but the
679         default toJS() implementation should have still been acceptable given that
680         the subclass is not web-exposed and therefore does not have a JS wrapper.
681
682         However, the ShadowRoot interface was introduced shortly after in r189841
683         and to toJS() implementation for DocumentFragment is now invalid. This
684         patch introduces a ShadowRoot-aware custom implementation of toJS() for
685         DocumentFragment to address the problem.
686
687         No new tests, already covered by:
688         plugins/snapshotting/snapshot-plugin-not-quite-blocked-by-image.html
689
690         * bindings/js/JSDocumentFragmentCustom.cpp:
691         (WebCore::createNewDocumentFragmentWrapper):
692         (WebCore::toJSNewlyCreated):
693         (WebCore::toJS):
694         Provide a ShadowRoot-aware custom implementation of toJS() /
695         toJSNewlyCreated() for DocumentFragment.
696
697         * bindings/js/JSNodeCustom.cpp:
698         (WebCore::createWrapperInline):
699         Fix bug in toJS() implementation for Node as it was not handling
700         ShadowRoots properly either.
701
702         * dom/DocumentFragment.idl:
703         Use [CustomToJSObject] so we can provide our own custom implementation
704         of toJS().
705
706 2015-09-17  Antti Koivisto  <antti@apple.com>
707
708         De-template ContainerNodeAlgorithms
709         https://bugs.webkit.org/show_bug.cgi?id=149286
710
711         Reviewed by Andreas Kling.
712
713         These are always used with ContainerNode/Node.
714
715         * dom/ContainerNode.cpp:
716         (WebCore::ContainerNode::removeDetachedChildren):
717         (WebCore::destroyRenderTreeIfNeeded):
718         (WebCore::ContainerNode::takeAllChildrenFrom):
719         (WebCore::ContainerNode::insertBeforeCommon):
720         (WebCore::ContainerNode::appendChildCommon):
721
722             Make append a member for consistency with insert.
723
724         (WebCore::ContainerNode::notifyChildInserted):
725         (WebCore::ContainerNode::notifyChildRemoved):
726         (WebCore::ContainerNode::parserInsertBefore):
727         (WebCore::ContainerNode::replaceChild):
728         (WebCore::ContainerNode::appendChild):
729         (WebCore::ContainerNode::parserAppendChild):
730
731             Also make rest of these ownership-taking functions take Ref<>&&.
732
733         * dom/ContainerNode.h:
734         (WebCore::NoEventDispatchAssertion::NoEventDispatchAssertion):
735         (WebCore::ContainerNode::setFirstChild):
736         * dom/ContainerNodeAlgorithms.cpp:
737         (WebCore::notifyChildNodeRemoved):
738         (WebCore::addChildNodesToDeletionQueue):
739         (WebCore::removeDetachedChildrenInContainer):
740         (WebCore::collectFrameOwners):
741         (WebCore::assertConnectedSubrameCountIsConsistent):
742         (WebCore::disconnectSubframes):
743         * dom/ContainerNodeAlgorithms.h:
744         (WebCore::removeDetachedChildrenInContainer): Deleted.
745         (WebCore::appendChildToContainer): Deleted.
746         (WebCore::Private::NodeRemovalDispatcher::dispatch): Deleted.
747         (WebCore::Private::addChildNodesToDeletionQueue): Deleted.
748         * html/parser/HTMLConstructionSite.cpp:
749         (WebCore::insert):
750         (WebCore::executeInsertTask):
751         (WebCore::executeReparentTask):
752         (WebCore::executeInsertAlreadyParsedChildTask):
753         * html/track/WebVTTParser.cpp:
754         (WebCore::WebVTTTreeBuilder::constructTreeFromToken):
755         * xml/XMLErrors.cpp:
756         (WebCore::XMLErrors::appendErrorMessage):
757         (WebCore::createXHTMLParserErrorHeader):
758         (WebCore::XMLErrors::insertErrorMessageBlock):
759         * xml/parser/XMLDocumentParser.cpp:
760         (WebCore::XMLDocumentParser::enterText):
761         (WebCore::toString):
762         * xml/parser/XMLDocumentParserLibxml2.cpp:
763         (WebCore::XMLDocumentParser::startElementNs):
764         (WebCore::XMLDocumentParser::processingInstruction):
765         (WebCore::XMLDocumentParser::cdataBlock):
766         (WebCore::XMLDocumentParser::comment):
767
768 2015-09-17  Tim Horton  <timothy_horton@apple.com>
769
770         Block Objective-C exceptions in DictionaryLookup
771         https://bugs.webkit.org/show_bug.cgi?id=149256
772
773         Reviewed by Anders Carlsson.
774
775         * editing/mac/DictionaryLookup.mm:
776         (WebCore::DictionaryLookup::rangeForSelection):
777         (WebCore::DictionaryLookup::rangeAtHitTestResult):
778         (WebCore::expandSelectionByCharacters):
779         (WebCore::DictionaryLookup::stringForPDFSelection):
780         (WebCore::showPopupOrCreateAnimationController):
781         (WebCore::DictionaryLookup::hidePopup):
782         It is possible for Lookup to throw an exception if one of its
783         related services dies for some reason. This shouldn't take down
784         our UI process, so block the exceptions.
785
786 2015-09-17  Yusuke Suzuki  <utatane.tea@gmail.com>
787
788         [ES6] Add more fine-grained APIs and additional hooks to control module loader from WebCore
789         https://bugs.webkit.org/show_bug.cgi?id=149129
790
791         Reviewed by Saam Barati.
792
793         No behavior change.
794
795         * bindings/js/JSDOMWindowBase.cpp:
796         * bindings/js/JSWorkerGlobalScopeBase.cpp:
797
798 2015-09-17  Alex Christensen  <achristensen@webkit.org>
799
800         Switch AppleWin build to use CMake
801         https://bugs.webkit.org/show_bug.cgi?id=149163
802
803         Reviewed by Brent Fulgham.
804
805         * bindings/scripts/preprocess-idls.pl:
806         (CygwinPathIfNeeded):
807         (WriteFileIfChanged):
808         * bindings/scripts/preprocessor.pm:
809         (applyPreprocessor):
810         Fix new cygwin quirks.  Cygwin is now using some paths from CMake.
811
812 2015-09-17  Zalan Bujtas  <zalan@apple.com>
813
814         Remove integral snapping functions from InlineBox class.
815         https://bugs.webkit.org/show_bug.cgi?id=136419
816
817         Reviewed by Simon Fraser.
818
819         We should not integral snap inlines during layout time.
820
821         Covered by existing tests.
822
823         * rendering/InlineBox.h:
824         (WebCore::InlineBox::pixelSnappedLogicalLeft): Deleted.
825         (WebCore::InlineBox::pixelSnappedLogicalRight): Deleted.
826         (WebCore::InlineBox::pixelSnappedLogicalTop): Deleted.
827         (WebCore::InlineBox::pixelSnappedLogicalBottom): Deleted.
828         * rendering/InlineFlowBox.cpp:
829         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
830         (WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
831         (WebCore::InlineFlowBox::addBorderOutsetVisualOverflow):
832         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
833
834 2015-09-17  Per Arne Vollan  <peavo@outlook.com>
835
836         [WinCairo] Compile error, include file not found.
837         https://bugs.webkit.org/show_bug.cgi?id=149282
838
839         Reviewed by Alex Christensen.
840
841         * PlatformWin.cmake:
842         Copy forwarding headers from new legacy directory, fixing CMake clean builds since r189746.
843
844 2015-09-17  Tim Horton  <timothy_horton@apple.com>
845
846         Delete some dead code
847         https://bugs.webkit.org/show_bug.cgi?id=149255
848
849         Reviewed by Dan Bernstein.
850
851         No new tests, just cleanup.
852
853         * platform/RuntimeApplicationChecksIOS.h:
854         * platform/RuntimeApplicationChecksIOS.mm:
855         (WebCore::applicationIsEpicurious): Deleted.
856         (WebCore::applicationIsMASH): Deleted.
857         Nothing uses these application checks anymore.
858
859         * platform/ios/SoundIOS.mm:
860         (WebCore::systemBeep):
861         What a beep should be on iOS, I don't know.
862         What it should not be is a NSLog.
863
864 2015-09-17  Saam barati  <sbarati@apple.com>
865
866         Interpreter::unwind() shouldn't be responsible for filtering out uncatchable exceptions
867         https://bugs.webkit.org/show_bug.cgi?id=149228
868
869         Reviewed by Mark Lam.
870
871         No new tests, already covered by current tests. This is not an observable behavior change.
872
873         * bindings/js/JSNodeFilterCustom.cpp:
874         (WebCore::JSNodeFilter::acceptNode):
875
876 2015-09-17  Zalan Bujtas  <zalan@apple.com>
877
878         column-rule-style: outset/inset doesn't work
879         https://bugs.webkit.org/show_bug.cgi?id=148815
880         <rdar://problem/22582644>
881
882         Reviewed by David Hyatt.
883
884         https://drafts.csswg.org/css-multicol-1/#crs
885         The <‘border-style’> values are interpreted as in the collapsing border model.
886
887         Unskipped 4 multicolumn tests, 
888
889         * rendering/RenderMultiColumnSet.cpp:
890         (WebCore::RenderMultiColumnSet::paintColumnRules):
891         * rendering/RenderTableCell.cpp:
892         (WebCore::collapsedBorderStyle): Deleted.
893         * rendering/style/RenderStyle.h:
894         (WebCore::collapsedBorderStyle):
895
896 2015-09-17  Chris Dumez  <cdumez@apple.com>
897
898         Range.deleteContents cannot delete DocType
899         https://bugs.webkit.org/show_bug.cgi?id=148773
900         <rdar://problem/22571280>
901
902         Reviewed by Ryosuke Niwa.
903
904         Range.deleteContents() was not able to delete a DocumentType Node, and
905         was throwing a HIERARCHY_REQUEST_ERR. The DOM specification does not
906         say we should throw in such case:
907         https://dom.spec.whatwg.org/#dom-range-deletecontents
908
909         However, Range.extractContents() should still throw an exception
910         if any of the contained children in a DocumentType Node:
911         https://dom.spec.whatwg.org/#concept-range-extract (Step 12)
912
913         No new tests, already covered by existing test.
914
915         * dom/Range.cpp:
916         (WebCore::Range::deleteContents):
917         (WebCore::Range::extractContents):
918         (WebCore::Range::checkDeleteExtract):
919         * dom/Range.h:
920
921 2015-09-17  Eric Carlson  <eric.carlson@apple.com>
922
923         [Mac MediaStream] Cleanup capture source classes
924         https://bugs.webkit.org/show_bug.cgi?id=149233
925
926         Reviewed by Jer Noble.
927
928         * platform/cf/CoreMediaSoftLink.cpp: Soft-link CMAudioFormatDescriptionGetStreamBasicDescription,
929           CMSampleBufferGetAudioBufferListWithRetainedBlockBuffer, and CMSampleBufferGetNumSamples.
930         * platform/cf/CoreMediaSoftLink.h:
931
932         * platform/mediastream/mac/AVAudioCaptureSource.h:
933         (WebCore::AVAudioCaptureSource::Observer::~Observer):
934         * platform/mediastream/mac/AVAudioCaptureSource.mm:
935         (WebCore::AVAudioCaptureSource::AVAudioCaptureSource): Initialize m_inputDescription.
936         (WebCore::AVAudioCaptureSource::capabilities): 0 -> nullptr.
937         (WebCore::AVAudioCaptureSource::addObserver): New, add an observer and tell it to prepare.
938         (WebCore::AVAudioCaptureSource::removeObserver): New.
939         (WebCore::operator==): Compare AudioStreamBasicDescription.
940         (WebCore::operator!=):
941         (WebCore::AVAudioCaptureSource::captureOutputDidOutputSampleBufferFromConnection): Call 
942           observer->prepare when passed a new stream description, call observer->process.
943
944         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
945         (WebCore::refreshCaptureDeviceList): Set m_groupID and m_localizedName.
946         (WebCore::AVCaptureDeviceManager::sessionSupportsConstraint): Invalid constraint names should
947           be ignored, so return true when passed one.
948         (WebCore::AVCaptureDeviceManager::getSourcesInfo): This just didn't work, fix it.
949         (WebCore::AVCaptureDeviceManager::verifyConstraintsForMediaType): Optional constraints are
950           optional so they don't need to be validated.
951         (WebCore::AVCaptureDeviceManager::bestSourcesForTypeAndConstraints): m_audioSource -> m_audioAVMediaCaptureSource,
952           m_videoSource -> m_videoAVMediaCaptureSource.
953         (WebCore::AVCaptureDeviceManager::sourceWithUID): Ditto.
954
955         * platform/mediastream/mac/AVMediaCaptureSource.h:
956         (WebCore::AVMediaCaptureSource::session):
957         (WebCore::AVMediaCaptureSource::device):
958         (WebCore::AVMediaCaptureSource::currentStates):
959         (WebCore::AVMediaCaptureSource::constraints):
960         (WebCore::AVMediaCaptureSource::statesDidChanged):
961         (WebCore::AVMediaCaptureSource::createWeakPtr):
962         (WebCore::AVMediaCaptureSource::buffer): Deleted.
963         (WebCore::AVMediaCaptureSource::setBuffer): Deleted.
964         * platform/mediastream/mac/AVMediaCaptureSource.mm:
965         (WebCore::AVMediaCaptureSource::AVMediaCaptureSource): Initilize m_weakPtrFactory.
966         (WebCore::AVMediaCaptureSource::scheduleDeferredTask): New, call a function asynchronously on
967           the main thread.
968         (-[WebCoreAVMediaCaptureSourceObserver captureOutput:didOutputSampleBuffer:fromConnection:]): Don't
969           dispatch calls to the main thread, let the derived classes do that if necessary.
970
971         * platform/mediastream/mac/AVVideoCaptureSource.h:
972         (WebCore::AVVideoCaptureSource::width):
973         (WebCore::AVVideoCaptureSource::height):
974         (WebCore::AVVideoCaptureSource::previewLayer):
975         (WebCore::AVVideoCaptureSource::currentFrameSampleBuffer):
976         * platform/mediastream/mac/AVVideoCaptureSource.mm:
977         (WebCore::AVVideoCaptureSource::setFrameRateConstraint): Remove unwanted logging.
978         (WebCore::AVVideoCaptureSource::setupCaptureSession): Configure the AVCaptureVideoDataOutput so
979           it delivers 32-bit BGRA samples.
980         (WebCore::AVVideoCaptureSource::calculateFramerate): Return bool to signal if the frame rate
981           changed.
982         (WebCore::AVVideoCaptureSource::processNewFrame): New. Process sample buffer, invalidate cached
983           image, signal when characteristics change.
984         (WebCore::AVVideoCaptureSource::captureOutputDidOutputSampleBufferFromConnection): Schedule
985           call to processNewFrame on the main thread so we do all video processing on main thread.
986         (WebCore::AVVideoCaptureSource::currentFrameImage): Create and return a CVImageBuffer of the
987           current video frame.
988         (WebCore::AVVideoCaptureSource::paintCurrentFrameInContext): Draw the current frame to a context.
989
990 2015-09-15  Sergio Villar Senin  <svillar@igalia.com>
991
992         [CSS Grid Layout]  Using automatic (instead of min-content) minimums for 'auto' tracks
993         https://bugs.webkit.org/show_bug.cgi?id=142329
994
995         Reviewed by Darin Adler.
996
997         Based on Blink's r198697 by <svillar@igalia.com> and r200478 by <jfernandez@igalia.com>
998
999         More precisely (syntax-wise), this would allow 'auto' to be used within the
1000         minmax() function (it's currently forbidden) and have the 'auto' keyword map
1001         to minmax(auto, auto) instead of minmax(min-content, max-content).
1002         - As a minimum, 'auto' would mean "use the specified minimum size, or if
1003         that is auto, treat as 0 or min-content per Flexbox rules".
1004         - As a maximum, 'auto' would mean "use the max-content size".
1005
1006         Regarding the implementation, a new phase is added to the track sizing
1007         algorithm called ResolveIntrinsicMinimums (the former ResolveIntrinsicMinimums
1008         is now called ResolveContentBasedMinimums which does not include 'auto'
1009         resolution) which will be run before any other. This phase uses the minimum
1010         size of grid items (as specified by min-width/height).
1011
1012         Tests: fast/css-grid-layout/grid-automatic-minimum-for-auto-columns.html
1013                fast/css-grid-layout/grid-automatic-minimum-for-auto-rows.html
1014
1015         * css/CSSParser.cpp:
1016         (WebCore::CSSParser::parseGridBreadth):
1017         * rendering/RenderGrid.cpp:
1018         (WebCore::RenderGrid::computeUsedBreadthOfMinLength):
1019         (WebCore::RenderGrid::computeUsedBreadthOfMaxLength):
1020         (WebCore::RenderGrid::minSizeForChild):
1021         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
1022         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForNonSpanningItems):
1023         (WebCore::RenderGrid::trackSizeForTrackSizeComputationPhase):
1024         (WebCore::RenderGrid::shouldProcessTrackForTrackSizeComputationPhase):
1025         (WebCore::RenderGrid::trackShouldGrowBeyondGrowthLimitsForTrackSizeComputationPhase):
1026         (WebCore::RenderGrid::markAsInfinitelyGrowableForTrackSizeComputationPhase):
1027         (WebCore::RenderGrid::updateTrackSizeForTrackSizeComputationPhase):
1028         (WebCore::RenderGrid::currentItemSizeForTrackSizeComputationPhase):
1029         * rendering/RenderGrid.h:
1030         * rendering/style/GridTrackSize.h:
1031         (WebCore::GridTrackSize::minTrackBreadth):
1032         (WebCore::GridTrackSize::maxTrackBreadth):
1033         (WebCore::GridTrackSize::cacheMinMaxTrackBreadthTypes):
1034         (WebCore::GridTrackSize::hasIntrinsicMinTrackBreadth):
1035         (WebCore::GridTrackSize::hasAutoMinTrackBreadth):
1036         (WebCore::GridTrackSize::hasAutoMaxTrackBreadth):
1037         (WebCore::GridTrackSize::hasMaxContentOrAutoMaxTrackBreadth):
1038         (WebCore::GridTrackSize::hasAutoOrMinContentMinTrackBreadthAndIntrinsicMaxTrackBreadth):
1039         (WebCore::GridTrackSize::hasMinContentMinTrackBreadthAndMinOrMaxContentMaxTrackBreadth): Deleted.
1040
1041 2015-09-17  Javier Fernandez  <jfernandez@igalia.com>
1042
1043         [CSS Grid Layout] Relayout whenever Box Alignment properties change
1044         https://bugs.webkit.org/show_bug.cgi?id=148070
1045
1046         Reviewed by Darin Adler.
1047
1048         We were Reattaching the styles to the RenderTree whenever Content Alignment
1049         properties (align-items and justify-items) changed their values, since the
1050         Self Alignment properties depend on such values to resolve 'auto' values
1051         during layout.
1052
1053         This patch removes such restriction, since we resolve the auto values
1054         whenever we access the alignment properties. The only thing we need to
1055         do is to mark a grid item for layout whenever the Default Alignment
1056         properties change from/to stretch, since it implies a resize of the grid
1057         items using 'auto' values for the Self Alignment properties.
1058
1059         Tests: fast/css-grid-layout/relayout-align-items-changed.html
1060                fast/css-grid-layout/relayout-align-self-changed.html
1061                fast/css-grid-layout/relayout-justify-items-changed.html
1062                fast/css-grid-layout/relayout-justify-self-changed.html
1063                fast/repaint/align-items-change.html
1064                fast/repaint/align-items-overflow-change.html
1065                fast/repaint/align-self-change.html
1066                fast/repaint/align-self-overflow-change.html
1067                fast/repaint/justify-items-change.html
1068                fast/repaint/justify-items-legacy-change.html
1069                fast/repaint/justify-items-overflow-change.html
1070                fast/repaint/justify-self-change.html
1071                fast/repaint/justify-self-overflow-change.html
1072
1073         * rendering/RenderGrid.cpp:
1074         (WebCore::defaultAlignmentIsStretch):
1075         (WebCore::RenderGrid::styleDidChange):
1076         * rendering/RenderGrid.h:
1077         * rendering/style/RenderStyle.cpp:
1078         (WebCore::RenderStyle::resolveAlignmentOverflow):
1079         (WebCore::RenderStyle::changeRequiresLayout):
1080         * style/StyleResolveTree.cpp:
1081         (WebCore::Style::determineChange): Deleted.
1082
1083 2015-09-16  Carlos Garcia Campos  <cgarcia@igalia.com>
1084
1085         printing does not use minimum page zoom factor
1086         https://bugs.webkit.org/show_bug.cgi?id=108507
1087
1088         Reviewed by Darin Adler.
1089
1090         * page/PrintContext.cpp:
1091         (WebCore::PrintContext::beginAndComputePageRectsWithPageSize):
1092         Helper function to share common code from numberOfPages() and
1093         spoolAllPagesWithBoundaries().
1094         (WebCore::PrintContext::numberOfPages): Use beginAndComputePageRectsWithPageSize().
1095         (WebCore::PrintContext::spoolAllPagesWithBoundaries): Use
1096         beginAndComputePageRectsWithPageSize() and don't flip the Y axis
1097         for non Cocoa platforms.
1098         * page/PrintContext.h:
1099
1100 2015-09-16  Ryosuke Niwa  <rniwa@webkit.org>
1101
1102         removeShadow shouldn't call ChildNodeRemovalNotifier with the shadow host as the removal point
1103         https://bugs.webkit.org/show_bug.cgi?id=149244
1104
1105         Reviewed by Antti Koivisto.
1106
1107         Since a shadow host is in a different tree than nodes in its shadow tree, it's incorrect to call
1108         removedFrom with the shadow host as the removal point. This causes HTMLSlotElement::removedFrom
1109         which will be added in the bug 149241 to call methods on a wrong ShadowRoot.
1110
1111         We still keep the ad-hoc behavior of using the shadow host as the insertion/removal point when
1112         calling insertedInto and removedFrom on the shadow root itself to update the InDocument node flag.
1113         We may want to re-visit this design in the future.
1114
1115         No new tests since I couldn't quite create a reduction. However, tests I'm adding in the bug 149241
1116         will crash without this change.
1117
1118         I separated this patch from the bug 149241 to isolate the high-risk code change here.
1119
1120         * dom/Element.cpp:
1121         (WebCore::Element::addShadowRoot): Call insertedInto on ShadowRoot, and then call it on all its
1122         children separately with the insertion point set to the shadow root since insertedInto relies on
1123         insertion point's inDocument flag to be true when the shadow host is in the document.
1124         (WebCore::Element::removeShadowRoot): Ditto in the reverse order.
1125
1126 2015-09-16  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1127
1128         Remove all uses of PassRefPtr in WebCore/inspector
1129         https://bugs.webkit.org/show_bug.cgi?id=149156
1130
1131         Reviewed by Darin Adler.
1132
1133         * inspector/DOMEditor.cpp:
1134         (WebCore::DOMEditor::InsertBeforeAction::InsertBeforeAction):
1135         (WebCore::DOMEditor::ReplaceChildNodeAction::ReplaceChildNodeAction):
1136         (WebCore::DOMEditor::insertBefore):
1137         (WebCore::DOMEditor::replaceChild):
1138         * inspector/DOMEditor.h:
1139         * inspector/DOMPatchSupport.cpp:
1140         (WebCore::DOMPatchSupport::removeChildAndMoveToNew):
1141         * inspector/InspectorDOMAgent.cpp:
1142         (WebCore::InspectorDOMAgent::highlightSelector):
1143         * inspector/InspectorDatabaseAgent.cpp:
1144         (WebCore::InspectorDatabaseAgent::didOpenDatabase):
1145         * inspector/InspectorDatabaseAgent.h:
1146         * inspector/InspectorDatabaseInstrumentation.h:
1147         * inspector/InspectorDatabaseResource.h:
1148         (WebCore::InspectorDatabaseResource::setDatabase):
1149         * inspector/InspectorFrontendHost.cpp:
1150         (WebCore::FrontendMenuProvider::create):
1151         * inspector/InspectorInstrumentation.cpp:
1152         (WebCore::InspectorInstrumentation::didOpenDatabaseImpl):
1153         * inspector/InspectorLayerTreeAgent.h:
1154         * inspector/InspectorOverlay.cpp:
1155         (WebCore::InspectorOverlay::highlightNodeList):
1156         * inspector/InspectorOverlay.h:
1157         * inspector/InspectorPageAgent.cpp:
1158         (WebCore::InspectorPageAgent::sharedBufferContent):
1159         * inspector/InspectorPageAgent.h:
1160         * inspector/InspectorResourceAgent.cpp:
1161         * inspector/InspectorTimelineAgent.cpp:
1162         (WebCore::startProfiling):
1163         (WebCore::stopProfiling):
1164         (WebCore::InspectorTimelineAgent::stopFromConsole):
1165         * inspector/InspectorTimelineAgent.h:
1166         * inspector/InspectorWorkerResource.h:
1167         (WebCore::InspectorWorkerResource::create):
1168         * inspector/InstrumentingAgents.h:
1169         * inspector/NetworkResourcesData.cpp:
1170         (WebCore::createOtherResourceTextDecoder):
1171         (WebCore::NetworkResourcesData::addResourceSharedBuffer):
1172         * inspector/NetworkResourcesData.h:
1173         * inspector/TimelineRecordFactory.cpp:
1174         (WebCore::createQuad):
1175         * inspector/WebInjectedScriptHost.h:
1176         * inspector/WebInjectedScriptManager.cpp:
1177         (WebCore::WebInjectedScriptManager::WebInjectedScriptManager):
1178         * inspector/WebInjectedScriptManager.h:
1179
1180 2015-09-16  Brady Eidson  <beidson@apple.com>
1181
1182         Have window.indexedDB.open return an IDBOpenDBRequest.
1183         https://bugs.webkit.org/show_bug.cgi?id=149234
1184
1185         Reviewed by Alex Christensen.
1186
1187         Test: storage/indexeddb/modern/opendatabase-request.html
1188
1189         * Modules/indexeddb/client/IDBFactoryImpl.cpp:
1190         (WebCore::IDBClient::IDBFactory::open):
1191         (WebCore::IDBClient::IDBFactory::openInternal):
1192         * Modules/indexeddb/client/IDBFactoryImpl.h:
1193
1194 2015-09-16  Antti Koivisto  <antti@apple.com>
1195
1196         Turn ChildNodeInsertion/RemovalNotifier classes into functions
1197         https://bugs.webkit.org/show_bug.cgi?id=149236
1198
1199         Reviewed by Ryosuke Niwa.
1200
1201         Less architecture, more readability.
1202
1203         * dom/ContainerNode.cpp:
1204         (WebCore::ContainerNode::notifyChildInserted):
1205         (WebCore::ContainerNode::notifyChildRemoved):
1206         (WebCore::ContainerNode::removeChildren):
1207         * dom/ContainerNodeAlgorithms.cpp:
1208         (WebCore::notifyDescendantInsertedIntoDocument):
1209         (WebCore::notifyDescendantInsertedIntoTree):
1210         (WebCore::notifyNodeInsertedIntoDocument):
1211         (WebCore::notifyNodeInsertedIntoTree):
1212         (WebCore::notifyChildNodeInserted):
1213         (WebCore::notifyNodeRemovedFromDocument):
1214         (WebCore::notifyNodeRemovedFromTree):
1215         (WebCore::notifyChildNodeRemoved):
1216         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument): Deleted.
1217         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoTree): Deleted.
1218         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument): Deleted.
1219         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree): Deleted.
1220         * dom/ContainerNodeAlgorithms.h:
1221         (WebCore::ChildNodeInsertionNotifier::ChildNodeInsertionNotifier): Deleted.
1222         (WebCore::ChildNodeRemovalNotifier::ChildNodeRemovalNotifier): Deleted.
1223         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument): Deleted.
1224         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree): Deleted.
1225         (WebCore::ChildNodeInsertionNotifier::notify): Deleted.
1226         (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromDocument): Deleted.
1227         (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromTree): Deleted.
1228         (WebCore::ChildNodeRemovalNotifier::notify): Deleted.
1229         * dom/Element.cpp:
1230         (WebCore::Element::addShadowRoot):
1231         (WebCore::Element::removeShadowRoot):
1232         (WebCore::Element::createShadowRoot):
1233
1234 2015-09-16  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1235
1236         Remove all uses of PassRefPtr in WebCore/bindings
1237         https://bugs.webkit.org/show_bug.cgi?id=149207
1238
1239         Reviewed by Darin Adler.
1240
1241         If RefPtr<>&& argument is passed to new variable or other function, we use copyRef() or WTF::move().
1242         copyRef() should be used when the argument continues to be used in following code. If it is final use
1243         inside function, we have to use WTF::move().
1244
1245         * bridge/NP_jsobject.cpp:
1246         * bridge/NP_jsobject.h:
1247         * bridge/c/CRuntimeObject.cpp:
1248         (JSC::Bindings::CRuntimeObject::CRuntimeObject):
1249         * bridge/c/CRuntimeObject.h:
1250         (JSC::Bindings::CRuntimeObject::create):
1251         * bridge/c/c_instance.cpp:
1252         (JSC::Bindings::CInstance::CInstance):
1253         * bridge/c/c_instance.h:
1254         (JSC::Bindings::CInstance::create):
1255         * bridge/jsc/BridgeJSC.cpp:
1256         (JSC::Bindings::Array::Array):
1257         (JSC::Bindings::Instance::Instance):
1258         * bridge/jsc/BridgeJSC.h:
1259         * bridge/objc/ObjCRuntimeObject.h:
1260         (JSC::Bindings::ObjCRuntimeObject::create):
1261         * bridge/objc/ObjCRuntimeObject.mm:
1262         (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
1263         * bridge/objc/WebScriptObjectProtocol.h:
1264         * bridge/objc/objc_instance.h:
1265         * bridge/objc/objc_instance.mm:
1266         (ObjcInstance::ObjcInstance):
1267         (ObjcInstance::create):
1268         * bridge/objc/objc_runtime.h:
1269         * bridge/objc/objc_runtime.mm:
1270         (JSC::Bindings::ObjcArray::ObjcArray):
1271         * bridge/runtime_object.cpp:
1272         (JSC::Bindings::RuntimeObject::RuntimeObject):
1273         * bridge/runtime_object.h:
1274         * bridge/runtime_root.cpp:
1275         (JSC::Bindings::RootObject::create):
1276         * bridge/runtime_root.h:
1277
1278 2015-09-16  Chris Dumez  <cdumez@apple.com>
1279
1280         Element's attribute NS API should defined treat undefined namespace as null
1281         https://bugs.webkit.org/show_bug.cgi?id=149238
1282         <rdar://problem/22562204>
1283
1284         Reviewed by Ryosuke Niwa.
1285
1286         Element's attribute NS API should treat defined undefined namespace as null
1287         instead of converting it to the "undefined" String. This is because the
1288         namespace parameter is a nullable String as per the DOM spec:
1289         - https://dom.spec.whatwg.org/#element
1290
1291         The attribute is nullable and WebIDL says undefined should be converted
1292         to null for nullable parameters:
1293         - https://heycam.github.io/webidl/#es-nullable-type (step 3)
1294
1295         Firefox follows the specification.
1296
1297         No new tests, already covered by existing test.
1298
1299         * dom/Element.idl:
1300
1301 2015-09-16  Chris Dumez  <cdumez@apple.com>
1302
1303         Possible small iOS PLT regression from r189537
1304         https://bugs.webkit.org/show_bug.cgi?id=149232
1305
1306         Reviewed by Ryosuke Niwa.
1307
1308         r189537 may have regressed PLT a bit on iOS. That change added a couple
1309         of extra branches to throw exceptions. This patch marks those branches
1310         as UNLIKELY() as we already do for other similar checks in the JS
1311         bindings.
1312
1313         * bindings/scripts/CodeGeneratorJS.pm:
1314         (GenerateImplementation):
1315         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1316         (webkit_dom_test_obj_get_property):
1317         (webkit_dom_test_obj_class_init):
1318         (webkit_dom_test_obj_get_strict_type_checking_attribute):
1319         (webkit_dom_test_obj_set_strict_type_checking_attribute):
1320         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1321         * bindings/scripts/test/JS/JSTestObj.cpp:
1322         (WebCore::jsTestObjStrictTypeCheckingAttribute):
1323         (WebCore::setJSTestObjStrictTypeCheckingAttribute):
1324         * bindings/scripts/test/ObjC/DOMTestObj.h:
1325         * bindings/scripts/test/ObjC/DOMTestObj.mm:
1326         (-[DOMTestObj strictTypeCheckingAttribute]):
1327         (-[DOMTestObj setStrictTypeCheckingAttribute:]):
1328         * bindings/scripts/test/TestObj.idl:
1329         * html/HTMLTableElement.cpp:
1330         (WebCore::HTMLTableElement::setTHead):
1331         (WebCore::HTMLTableElement::setTFoot):
1332
1333 2015-09-16  Joseph Pecoraro  <pecoraro@apple.com>
1334
1335         Web Inspector: Fix common typo "supress" => "suppress"
1336         https://bugs.webkit.org/show_bug.cgi?id=149199
1337
1338         Reviewed by Gyuyoung Kim.
1339
1340         * html/shadow/ContentDistributor.h:
1341         (WebCore::ContentDistributor::needsDistribution):
1342         * page/ContentSecurityPolicy.cpp:
1343         (WebCore::ContentSecurityPolicy::reportViolation):
1344         * platform/NotImplemented.h:
1345         * platform/graphics/ca/win/LayerChangesFlusher.cpp:
1346         (WebCore::LayerChangesFlusher::hookCallback):
1347         * platform/mac/HIDGamepadProvider.cpp:
1348         (WebCore::HIDGamepadProvider::deviceRemoved):
1349         * platform/win/makesafeseh.asm:
1350
1351 2015-09-16  Chris Dumez  <cdumez@apple.com>
1352
1353         WebIDL: Rename [ReturnNewObject] to [NewObject] and use it more consistently in DOM
1354         https://bugs.webkit.org/show_bug.cgi?id=149192
1355
1356         Reviewed by Darin Adler.
1357
1358         Rename [ReturnNewObject] to [NewObject] and use it more consistently in
1359         DOM.
1360
1361         This aligns our IDL extended attribute naming with standard Web IDL:
1362         https://heycam.github.io/webidl/#NewObject
1363
1364         We already have [ReturnNewObject] in most places that the DOM
1365         specification uses [NewObject] but we are missing a few so I'll
1366         fix this as well:
1367         https://dom.spec.whatwg.org/#interface-document
1368
1369         Using [NewObject] lets the bindings generator know that the API in
1370         question always returns new objects and that we can bypass the check
1371         for existing wrappers and directly create a new wrapper for the
1372         returned object.
1373
1374         This patch also adds support for generating the toJSNewlyCreated()
1375         utility function for most types. Previously, to use [ReturnNewObject]
1376         for a new type, you needed to add the type to a hard-coded list in
1377         the bindings generator then provide your own implementation for
1378         toJSNewlyCreated() as custom bindings.
1379
1380         No new-exposed behavior change.
1381
1382         * bindings/js/JSDocumentCustom.cpp:
1383         * bindings/js/JSEventCustom.cpp:
1384         * bindings/js/JSNodeListCustom.cpp:
1385         Add toJSNewlyCreated() custom implementation for Node, Event and
1386         Document, that shares code with the existing toJS() implementation for
1387         those types.
1388
1389         * bindings/js/JSCDATASectionCustom.cpp: Removed.
1390         * bindings/js/JSTextCustom.cpp: Removed.
1391         * bindings/js/JSTouchCustom.cpp: Removed.
1392         * bindings/js/JSTouchListCustom.cpp: Removed.
1393         Drop several custom bindings files as the bindings generator is
1394         now able to generate the toJSNewlyCreated() utility function for
1395         most types.
1396
1397         * bindings/scripts/CodeGeneratorJS.pm:
1398         - Rename [ReturnNewObject] to [NewObject].
1399         - Generate a toJSNewlyCreated() whenever we generate a toJS() already.
1400           Get rid of the hard-coded list of types that need a
1401           toJSNewlyCreated().
1402
1403         * bindings/scripts/IDLAttributes.txt:
1404         Rename [ReturnNewObject] to [NewObject].
1405
1406         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1407         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
1408         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
1409         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
1410         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1411         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
1412         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1413         * bindings/scripts/test/JS/JSTestEventConstructor.h:
1414         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1415         * bindings/scripts/test/JS/JSTestEventTarget.h:
1416         * bindings/scripts/test/JS/JSTestException.cpp:
1417         * bindings/scripts/test/JS/JSTestException.h:
1418         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1419         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
1420         * bindings/scripts/test/JS/JSTestInterface.cpp:
1421         * bindings/scripts/test/JS/JSTestInterface.h:
1422         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1423         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
1424         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1425         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
1426         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1427         * bindings/scripts/test/JS/JSTestNondeterministic.h:
1428         * bindings/scripts/test/JS/JSTestObj.cpp:
1429         * bindings/scripts/test/JS/JSTestObj.h:
1430         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1431         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
1432         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
1433         * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
1434         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1435         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1436         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1437         * bindings/scripts/test/JS/JSTestTypedefs.h:
1438         * bindings/scripts/test/JS/JSattribute.cpp:
1439         * bindings/scripts/test/JS/JSattribute.h:
1440         * bindings/scripts/test/JS/JSreadonly.cpp:
1441         * bindings/scripts/test/JS/JSreadonly.h:
1442         Rebaseline bindings tests.
1443
1444         * dom/Attr.idl:
1445         * dom/CDATASection.idl:
1446         * dom/Comment.idl:
1447         * dom/DocumentFragment.idl:
1448         * dom/DocumentType.idl:
1449         * dom/EntityReference.idl:
1450         * dom/ProcessingInstruction.idl:
1451         Add [JSGenerateToJSObject] so that the bindings generator generates
1452         a toJS() / toJSNewlyCreated() for this type. While it is not strictly
1453         needed, it avoids falling back to using the toJS() from Node which
1454         calls the virtual nodeType() function to determine the node type.
1455         This change was made for efficiency purposes.
1456
1457         * dom/DOMImplementation.idl:
1458         Rename [ReturnNewObject] to [NewObject] and add it to createHTMLDocument()
1459         as well, as per the specification:
1460         https://dom.spec.whatwg.org/#interface-domimplementation
1461
1462         * dom/Document.idl:
1463         Rename [ReturnNewObject] to [NewObject] and add it to more operations
1464         as per he DOM specification:
1465         https://dom.spec.whatwg.org/#document
1466
1467         * dom/Node.idl:
1468         Add [NewObject] to cloneNode() as per the DOM specification:
1469         https://dom.spec.whatwg.org/#node
1470
1471         * dom/ParentNode.idl:
1472         Add [NewObject] to querySelectorAll() as per the DOM specification:
1473         https://dom.spec.whatwg.org/#parentnode
1474
1475         * dom/Range.idl:
1476         Add [NewObject] for several operations, as per the DOM specification:
1477         https://dom.spec.whatwg.org/#interface-range
1478
1479 2015-09-16  Brady Eidson  <beidson@apple.com>
1480
1481         Have window.indexedDB.deleteDatabase return an IDBOpenDBRequest.
1482         https://bugs.webkit.org/show_bug.cgi?id=149229
1483
1484         Reviewed by Alex Christensen.
1485
1486         Test: storage/indexeddb/modern/deletedatabase-request.html
1487               storage/indexeddb/modern/deletedatabase-null-name-exception.html
1488
1489         * CMakeLists.txt:
1490         * WebCore.xcodeproj/project.pbxproj:
1491
1492         * Modules/indexeddb/IDBDatabaseIdentifier.cpp: Added.
1493         (WebCore::IDBDatabaseIdentifier::IDBDatabaseIdentifier):
1494         * Modules/indexeddb/IDBDatabaseIdentifier.h: Added.
1495         (WebCore::IDBDatabaseIdentifier::IDBDatabaseIdentifier):
1496         (WebCore::IDBDatabaseIdentifier::isHashTableDeletedValue):
1497         (WebCore::IDBDatabaseIdentifier::hash):
1498         (WebCore::IDBDatabaseIdentifier::isValid):
1499         (WebCore::IDBDatabaseIdentifier::operator==):
1500         (WebCore::IDBDatabaseIdentifier::databaseName):
1501         (WebCore::IDBDatabaseIdentifierHash::hash):
1502         (WebCore::IDBDatabaseIdentifierHash::equal):
1503         (WebCore::IDBDatabaseIdentifierHashTraits::isEmptyValue):
1504
1505         * Modules/indexeddb/client/IDBFactoryImpl.cpp:
1506         (WebCore::IDBClient::shouldThrowSecurityException):
1507         (WebCore::IDBClient::IDBFactory::getDatabaseNames):
1508         (WebCore::IDBClient::IDBFactory::open):
1509         (WebCore::IDBClient::IDBFactory::deleteDatabase):
1510         * Modules/indexeddb/client/IDBFactoryImpl.h:
1511
1512         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp: Copied from Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp.
1513         (WebCore::IDBClient::IDBOpenDBRequest::IDBOpenDBRequest):
1514         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp.
1515         (WebCore::IDBClient::IDBOpenDBRequest::create):
1516
1517         * Modules/indexeddb/client/IDBRequestImpl.cpp: Copied from Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp.
1518         (WebCore::IDBClient::IDBRequest::IDBRequest):
1519         (WebCore::IDBClient::IDBRequest::result):
1520         (WebCore::IDBClient::IDBRequest::errorCode):
1521         (WebCore::IDBClient::IDBRequest::error):
1522         (WebCore::IDBClient::IDBRequest::source):
1523         (WebCore::IDBClient::IDBRequest::transaction):
1524         (WebCore::IDBClient::IDBRequest::readyState):
1525         (WebCore::IDBClient::IDBRequest::eventTargetInterface):
1526         (WebCore::IDBClient::IDBRequest::activeDOMObjectName):
1527         (WebCore::IDBClient::IDBRequest::canSuspendForPageCache):
1528         * Modules/indexeddb/client/IDBRequestImpl.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.h.
1529
1530         * platform/Logging.h:
1531
1532 2015-09-16  Chris Dumez  <cdumez@apple.com>
1533
1534         Add initial support for [Unforgeable] IDL extended attribute
1535         https://bugs.webkit.org/show_bug.cgi?id=149147
1536
1537         Reviewed by Darin Adler.
1538
1539         Add initial support for [Unforgeable] IDL extended attribute:
1540         https://heycam.github.io/webidl/#Unforgeable
1541
1542         In particular, attributes marked as unforgeable are now:
1543         - on the instance rather than the prototype
1544         - non-configurable. WebKit does not match the Web IDL specification
1545           and most properties are currently non-configurable already. However,
1546           I added an extra check for [Unforgeable] so that unforgeable
1547           attributes stay unconfigurable if we later decide to match the spec
1548           and mark properties as configurable.
1549
1550         Operation marked as unforgeable are now non-configurable. However, this
1551         patch does not move them from the prototype to the instance yet. This
1552         needs to be addressed in a follow-up patch as this is a larger change.
1553
1554         This patch also drops support for the undocumented
1555         [OperationsNotDeletable] IDL extended attribute. It is no longer needed
1556         now that we support [Unforgeable] and still support [NotDeletable] for
1557         operations.
1558
1559         Test: fast/dom/unforgeable-attributes.html
1560
1561         * Modules/plugins/QuickTimePluginReplacement.idl:
1562         Drop [OperationsNotDeletable] on the interface and mark the only
1563         operation on this interface as [NotDeletable]. There is no behavior
1564         change but this allows us to drop support for a non-standard and
1565         undocumented IDL extended attribute.
1566
1567         * bindings/scripts/CodeGeneratorJS.pm:
1568         (AttributeShouldBeOnInstance):
1569         (GenerateAttributesHashTable):
1570         (GenerateImplementation):
1571         Add initial support for [Unforgeable] IDL extended attribute.
1572
1573         * bindings/scripts/IDLAttributes.txt:
1574         Add [Unforgeable]. Drop [OperationsNotDeletable].
1575
1576         * crypto/CryptoKeyPair.idl:
1577         Drop [OperationsNotDeletable] on the interface as this interface has
1578         no operations.
1579
1580         * dom/Document.idl:
1581         * page/DOMWindow.idl:
1582         * page/Location.idl:
1583         Mark attributes / interfaces as [Unforgeable] as per the latest HTML
1584         specification:
1585         https://html.spec.whatwg.org/multipage/dom.html#document
1586         https://html.spec.whatwg.org/multipage/browsers.html#window
1587         https://html.spec.whatwg.org/multipage/browsers.html#the-location-interface
1588
1589 2015-09-16  Zalan Bujtas  <zalan@apple.com>
1590
1591         Simple line layout: Glitch selecting long text.
1592         https://bugs.webkit.org/show_bug.cgi?id=149204
1593         rdar://problem/22646472
1594
1595         Reviewed by Antti Koivisto.
1596
1597         When long text is split into multiple RenderText objects, we ignore renderer boundaries while
1598         collecting wrapping positions (so that we don't end up wrapping unbreakable fragments at the end of each renderer).
1599         This patch ensures that fragments with hypen character ignore renderer boundaries too.
1600
1601         Test: fast/text/multiple-renderers-with-hypen-on-boundary.html
1602
1603         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
1604         (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
1605
1606 2015-09-16  Brady Eidson  <beidson@apple.com>
1607
1608         Remove stray logging string mistakenly left in r189746.
1609
1610         * Modules/indexeddb/legacy/LegacyFactory.cpp:
1611         (WebCore::LegacyFactory::deleteDatabase):
1612
1613 2015-09-16  Chris Fleizach  <cfleizach@apple.com>
1614
1615         AX: No VoiceOver typing feedback in some search fields
1616         https://bugs.webkit.org/show_bug.cgi?id=149177
1617
1618         Reviewed by Mario Sanchez Prada.
1619
1620         If SearchFieldRole is not marked as a TextControl, it does not end up returning the accessibilityValue,
1621         which is needed to output the right text to VoiceOver.
1622
1623         Test: accessibility/ax-value-with-search.html
1624
1625         * accessibility/AccessibilityObject.cpp:
1626         (WebCore::AccessibilityObject::isTextControl):
1627
1628 2015-09-16  Manuel Rego Casasnovas  <rego@igalia.com>
1629
1630         [css-grid] Grid container's height should include scrollbar
1631         https://bugs.webkit.org/show_bug.cgi?id=149210
1632
1633         Reviewed by Sergio Villar Senin.
1634
1635         Add scrollbar's size in the grid container's height calculation at
1636         RenderGrid::layoutGridItems().
1637
1638         Test: fast/css-grid-layout/grid-container-margin-border-padding-scrollbar.html
1639
1640         * rendering/RenderGrid.cpp:
1641         (WebCore::RenderGrid::layoutGridItems): Include scrollbarLogicalHeight()
1642         while computing the grid's logical height.
1643
1644 2015-09-16  Carlos Garcia Campos  <cgarcia@igalia.com>
1645
1646         Unreviewed. Fix GObject DOM bindings API break after r189676.
1647
1648         webkit_dom_character_data_append_data() used to raise exceptions.
1649
1650         * bindings/scripts/CodeGeneratorGObject.pm:
1651         (FunctionUsedToRaiseException):
1652
1653 2015-09-15  Commit Queue  <commit-queue@webkit.org>
1654
1655         Unreviewed, rolling out r189847.
1656         https://bugs.webkit.org/show_bug.cgi?id=149208
1657
1658         Asserts on all the tests (Requested by ap on #webkit).
1659
1660         Reverted changeset:
1661
1662         "Simple line layout: Glitch selecting long text."
1663         https://bugs.webkit.org/show_bug.cgi?id=149204
1664         http://trac.webkit.org/changeset/189847
1665
1666 2015-09-15  Zalan Bujtas  <zalan@apple.com>
1667
1668         Simple line layout: Glitch selecting long text.
1669         https://bugs.webkit.org/show_bug.cgi?id=149204
1670         rdar://problem/22646472
1671
1672         Reviewed by Antti Koivisto.
1673
1674         When long text is split into multiple RenderText objects, we ignore renderer boundaries while
1675         collecting wrapping positions (so that we don't end up wrapping unbreakable fragments at the end of each renderer).
1676         This patch ensures that fragments with hypen character ignore renderer boundaries too.
1677
1678         Test: fast/text/multiple-renderers-with-hypen-on-boundary.html
1679
1680         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
1681         (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
1682
1683 2015-09-15  Ryosuke Niwa  <rniwa@webkit.org>
1684
1685         GTK+ build fix attempt after r189841.
1686
1687         * PlatformGTK.cmake:
1688
1689 2015-09-15  Chris Dumez  <cdumez@apple.com>
1690
1691         Document.createElement(localName) does not handle correctly missing or null parameter
1692         https://bugs.webkit.org/show_bug.cgi?id=149184
1693         <rdar://problem/22565070>
1694
1695         Reviewed by Ryosuke Niwa.
1696
1697         Document.createElement(localName) does not handle correct missing or
1698         null parameter:
1699         - https://dom.spec.whatwg.org/#interface-document
1700
1701         As per the specification, the parameter is a non-nullable DOMString and
1702         is mandatory. Therefore, as per Web IDL, we should have the following
1703         behavior:
1704         1. If the parameter is missing, we should throw an exception
1705         2. If the parameter is null, we should convert it to the "null" string
1706            and create a <null> element.
1707
1708         Chrome and Firefox behave according to the specification. However,
1709         WebKit was doing:
1710         1. Create a <undefined> element
1711         2. Throw an InvalidCharacterError
1712
1713         This patch aligns WebKit's behavior with the specification and other
1714         major browsers.
1715
1716         No new tests, already covered by existing tests.
1717
1718         * dom/Document.idl:
1719
1720 2015-09-15  Ryosuke Niwa  <rniwa@webkit.org>
1721
1722         Add ShadowRoot interface and Element.prototype.attachShadow
1723         https://bugs.webkit.org/show_bug.cgi?id=149187
1724
1725         Reviewed by Antti Koivisto.
1726
1727         Add back ShadowRoot IDL interface and Element.prototype.attachShadow in accordance with
1728         http://w3c.github.io/webcomponents/spec/shadow/ at db27e6e36eab512d86edcdabb33ed27b5751acd7 excluding getSelection(),
1729         elementFromPoint(), elementsFromPoint(), caretPositionFromPoint(), and styleSheets attribute on ShadowRoot interface.
1730
1731         The feature is enabled by default on Mac and iOS ports for testing and disabled by default elsewhere.
1732
1733         Also added HTMLElement::canHaveUserAgentShadowRoot which returns false by default and overridden elsewhere to return true
1734         to distinguish elements for which attachShadow is supposed to throw NotSupported.
1735         See https://w3c.github.io/webcomponents/spec/shadow/#widl-Element-attachShadow-ShadowRoot-ShadowRootInit-shadowRootInitDict
1736
1737         Tests: fast/shadow-dom/Element-interface-attachShadow.html
1738                fast/shadow-dom/Element-interface-shadowRoot-attribute.html
1739                fast/shadow-dom/ShadowRoot-interface.html
1740
1741         * CMakeLists.txt:
1742         * Configurations/FeatureDefines.xcconfig:
1743         * DerivedSources.cpp:
1744         * DerivedSources.make:
1745         * PlatformGTK.cmake:
1746         * WebCore.vcxproj/WebCore.vcxproj:
1747         * WebCore.vcxproj/WebCore.vcxproj.filters:
1748         * WebCore.xcodeproj/project.pbxproj:
1749         * css/SelectorChecker.cpp:
1750         (WebCore::SelectorChecker::matchRecursively):
1751         * dom/Element.cpp:
1752         (WebCore::Element::bindingsOffsetParent):
1753         (WebCore::Element::offsetParent):
1754         (WebCore::Element::addShadowRoot):
1755         (WebCore::Element::createShadowRoot):
1756         (WebCore::Element::attachShadow): Added.
1757         (WebCore::Element::bindingShadowRoot): Added. Returns null unless the attached shadow root is in the "open" mode.
1758         * dom/Element.h:
1759         * dom/Element.idl: Added attachShadow and shadowRoot. We only expose these to JS for now since Dictionary argument isn't
1760         supported by other binding code.
1761         * dom/ShadowRoot.cpp: Removed an unused enum.
1762         * dom/ShadowRoot.h:
1763         (WebCore::ShadowRoot::Type): Replaced old-style enum "ShadowRootType" by an enum class named "Type". Also added two new
1764         values Open and Closed for author shadow roots.
1765         (WebCore::ShadowRoot::type):
1766         * dom/ShadowRoot.idl: Added.
1767         * html/HTMLButtonElement.h:
1768         * html/HTMLDetailsElement.h:
1769         (HTMLButtonElement::canHaveUserAgentShadowRoot): Ditto.
1770         * html/HTMLElement.h:
1771         (WebCore::HTMLElement::canHaveUserAgentShadowRoot): Added. Returns false by default.
1772         * html/HTMLInputElement.h:
1773         * html/HTMLKeygenElement.h:
1774         * html/HTMLMarqueeElement.h:
1775         * html/HTMLMediaElement.h:
1776         * html/HTMLMeterElement.h:
1777         * html/HTMLPlugInElement.h:
1778         * html/HTMLProgressElement.h:
1779         * html/HTMLSelectElement.h:
1780         * html/HTMLSummaryElement.h:
1781         * html/HTMLTextAreaElement.h:
1782         * html/shadow/InsertionPoint.h:
1783         (ShadowRootWithInsertionPoints::ShadowRootWithInsertionPoints):
1784         * rendering/RenderElement.cpp:
1785         (WebCore::RenderElement::selectionPseudoStyle):
1786         * rendering/RenderLayer.cpp:
1787         (WebCore::rendererForScrollbar):
1788         * svg/SVGElement.cpp:
1789         (WebCore::SVGElement::correspondingUseElement):
1790         * testing/Internals.cpp:
1791         (WebCore::Internals::shadowRootType):
1792
1793 2015-09-15  Brent Fulgham  <bfulgham@apple.com>
1794
1795         [Win] Unreviewed release fix after r189832
1796
1797         * platform/graphics/ca/win/PlatformCALayerWin.h: The implementation
1798         should exist in Release builds as well.
1799
1800 2015-09-15  Benjamin Poulain  <bpoulain@apple.com>
1801
1802         Style invalidation affecting siblings does not work with inline-style changes
1803         https://bugs.webkit.org/show_bug.cgi?id=149189
1804
1805         Reviewed by Antti Koivisto.
1806
1807         Style::resolveTree() made the assumption that inline style changes only affect
1808         descendants and should not participate in "StyleRecalcAffectsNextSiblingElementStyle".
1809         That was wrong. If the inline style change through CSSOM, it can cause the creation
1810         of a style attribute, which is observable through "StyleRecalcAffectsNextSiblingElementStyle".
1811
1812         This patch removes the incorrect assumption. Style invalidation is always propagated now.
1813
1814         Tests: fast/css/style-attribute-invalidation-propagates-to-counted-siblings.html
1815                fast/css/style-attribute-invalidation-propagates-to-direct-siblings.html
1816                fast/css/style-attribute-invalidation-propagates-to-indirect-siblings.html
1817
1818         * css/PropertySetCSSStyleDeclaration.cpp:
1819         (WebCore::InlineCSSStyleDeclaration::didMutate): Deleted.
1820         * dom/StyledElement.cpp:
1821         (WebCore::StyledElement::inlineStyleChanged):
1822         * dom/StyledElement.h:
1823         (WebCore::StyledElement::invalidateStyleAttribute):
1824         Clean up inline-style invalidation a tiny bit.
1825
1826         * style/StyleResolveTree.cpp:
1827         (WebCore::Style::resolveTree):
1828         Fix the bug.
1829
1830 2015-09-15  Joseph Pecoraro  <pecoraro@apple.com>
1831
1832         Web Inspector: Paused Debugger prevents page reload
1833         https://bugs.webkit.org/show_bug.cgi?id=148174
1834
1835         Reviewed by Brian Burg.
1836
1837         When navigating the page while paused, suppress any pausing until the page
1838         has completed navigation. If not paused and navigating, you can still pause
1839         in pagehide and unload handlers or other late page events.
1840
1841         Could not write a reliable test for this at the moment.
1842         InspectorTest.reloadPage has multiple issues with the output,
1843         so I'll investigate making reload tests more reliable later.
1844
1845         * inspector/InspectorController.h:
1846         * inspector/InspectorController.cpp:
1847         (WebCore::InspectorController::resume): Deleted.
1848         * loader/FrameLoader.cpp:
1849         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
1850         We now use existing InspectorInstrumentation functions instead of a method
1851         on InspectorController during load. In dropping the method InspectorController
1852         can drop a member variable no longer used.
1853
1854         * inspector/InspectorInstrumentation.h:
1855         (WebCore::InspectorInstrumentation::willStartProvisionalLoad):
1856         Add a new instrumentation hook.
1857
1858         * inspector/InspectorInstrumentation.cpp:
1859         (WebCore::InspectorInstrumentation::willStartProvisionalLoadImpl):
1860         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
1861         When starting or completing main frame navigations, let the PageDebuggerAgent do some work.
1862
1863         * inspector/PageDebuggerAgent.h:
1864         * inspector/PageDebuggerAgent.cpp:
1865         (WebCore::PageDebuggerAgent::mainFrameStartedLoading):
1866         (WebCore::PageDebuggerAgent::mainFrameStoppedLoading):
1867         (WebCore::PageDebuggerAgent::mainFrameNavigated):
1868         Suppress pausing if navigating while paused. Otherwise behave as normal.
1869
1870 2015-09-15  Brent Fulgham  <bfulgham@apple.com>
1871
1872         [Win] Provide a means for viewing the layer tree
1873         https://bugs.webkit.org/show_bug.cgi?id=149165
1874
1875         Reviewed by Simon Fraser.
1876
1877         Revise the old fprintf logic to generate a string
1878         containing the layer tree so that it can be output
1879         to the debugger (or elsewhere).
1880
1881         * platform/graphics/ca/PlatformCALayer.h: Rename 'printTree'
1882         to 'printLayerTree', and make it available in release builds.
1883         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
1884         (WebCore::CACFLayerTreeHost::printLayerTree): Added. Calls into
1885         the PlatformCALayer implementation.
1886         * platform/graphics/ca/win/CACFLayerTreeHost.h:
1887         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
1888         (printIndent): Revise to use two-space indent and use StringBuilder.
1889         (printTransform): Ditto.
1890         (printColor): Added helper function.
1891         (printLayer): Revised to output information on the layer contents.
1892         (PlatformCALayerWin::printLayerTree): Renamed from 'printTree'.
1893         (PlatformCALayerWin::printTree): Deleted.
1894         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
1895         (PlatformCALayerWinInternal::drawRepaintCounters): Drive-by fix. Match the
1896         cocoa repaint counter logic by not painting counters for the layers that
1897         contain the tile grid.
1898         * platform/graphics/ca/win/PlatformCALayerWin.h:
1899         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
1900         (PlatformCALayerWinInternal::drawRepaintCounters):
1901
1902 2015-09-15  Myles C. Maxfield  <mmaxfield@apple.com>
1903
1904         REGRESSION(r155554): Nested isolates can cause an infinite loop when laying out bidi runs
1905         https://bugs.webkit.org/show_bug.cgi?id=149153
1906
1907         Reviewed by David Hyatt.
1908
1909         When traversing bidi runs, we might encounter a run which is supposed to be isolated. In this
1910         situation, we will append a placeholder run in the run list, and remember a pointer to these
1911         isolated runs inside BidiResolver. Then, once we're done traversing the bidi runs, we return
1912         to the isolated runs and handle them separately (and replace the placeholder with the result).
1913
1914         However, due to the fact that our BidiRuns start at leaf nodes, we have to keep track of which
1915         local root of the render tree we were inspecting (to ensure that we visit the same node
1916         multiple times if there are nested isolate spans). We were not correctly keeping track of this
1917         local root, which was leading us to consider the same root multiple times, thereby leading to
1918         an infinite loop.
1919
1920         The solution is simply to keep root information alongside the isolated run information inside
1921         BidiResolver. However, BidiResolver is inside platform/, which means that this new type should
1922         be a template argument, just like how BidiRun itself is a template argument.
1923
1924         This new type, BidiIsolatedRun, holds all the information that our isolate-revisiting logic
1925         needs inside constructBidiRunsForSegment(). It also holds a reference to the placeholder run
1926         which we will replace.
1927
1928         Test: fast/text/international/unicode-bidi-isolate-nested-crash.html
1929
1930         * platform/graphics/GraphicsContext.cpp:
1931         (WebCore::GraphicsContext::drawBidiText): BidiIsolatedRun template argument is unused, so pass
1932         in Void.
1933         * platform/text/BidiResolver.h: Add template argument.
1934         (WebCore::BidiResolver::isolatedRuns):
1935         (WebCore::IsolatedRun>::~BidiResolver):
1936         (WebCore::IsolatedRun>::appendRun):
1937         (WebCore::IsolatedRun>::embed):
1938         (WebCore::IsolatedRun>::checkDirectionInLowerRaiseEmbeddingLevel):
1939         (WebCore::IsolatedRun>::lowerExplicitEmbeddingLevel):
1940         (WebCore::IsolatedRun>::raiseExplicitEmbeddingLevel):
1941         (WebCore::IsolatedRun>::commitExplicitEmbedding):
1942         (WebCore::IsolatedRun>::updateStatusLastFromCurrentDirection):
1943         (WebCore::IsolatedRun>::reorderRunsFromLevels):
1944         (WebCore::IsolatedRun>::createBidiRunsForLine):
1945         (WebCore::IsolatedRun>::setMidpointForIsolatedRun): Use references instead of pointers.
1946         (WebCore::IsolatedRun>::midpointForIsolatedRun): Ditto.
1947         (WebCore::Run>::~BidiResolver): Deleted.
1948         (WebCore::Run>::appendRun): Deleted.
1949         (WebCore::Run>::embed): Deleted.
1950         (WebCore::Run>::checkDirectionInLowerRaiseEmbeddingLevel): Deleted.
1951         (WebCore::Run>::lowerExplicitEmbeddingLevel): Deleted.
1952         (WebCore::Run>::raiseExplicitEmbeddingLevel): Deleted.
1953         (WebCore::Run>::commitExplicitEmbedding): Deleted.
1954         (WebCore::Run>::updateStatusLastFromCurrentDirection): Deleted.
1955         (WebCore::Run>::reorderRunsFromLevels): Deleted.
1956         (WebCore::Run>::createBidiRunsForLine): Deleted.
1957         (WebCore::Run>::setMidpointForIsolatedRun): Deleted.
1958         (WebCore::Run>::midpointForIsolatedRun): Deleted.
1959         * rendering/InlineIterator.h:
1960         (WebCore::BidiIsolatedRun::BidiIsolatedRun): New type.
1961         (WebCore::addPlaceholderRunForIsolatedInline): Create new type, and include local root
1962         information.
1963         (WebCore::IsolateTracker::addFakeRunIfNecessary): Include local root information.
1964         (WebCore::InlineBidiResolver::appendRun): Ditto.
1965         * rendering/RenderBlockLineLayout.cpp: Update for new BidiIsolatedRun type.
1966         (WebCore::setUpResolverToResumeInIsolate):
1967         (WebCore::constructBidiRunsForSegment):
1968         * rendering/line/TrailingObjects.h:
1969
1970 2015-09-15  Brady Eidson  <beidson@apple.com>
1971
1972         Add empty IDBFactory implementation for Modern IDB.
1973         https://bugs.webkit.org/show_bug.cgi?id=149191
1974
1975         Reviewed by Jer Noble.
1976
1977         No new tests (No behavior change).
1978
1979         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
1980         (WebCore::DOMWindowIndexedDatabase::indexedDB):
1981         
1982         * Modules/indexeddb/client/IDBFactoryImpl.cpp: 
1983         (WebCore::IDBClient::IDBFactory::create):
1984         (WebCore::IDBClient::IDBFactory::IDBFactory):
1985         (WebCore::IDBClient::IDBFactory::getDatabaseNames):
1986         (WebCore::IDBClient::IDBFactory::open):
1987         (WebCore::IDBClient::IDBFactory::deleteDatabase):
1988         (WebCore::IDBClient::IDBFactory::cmp):
1989         * Modules/indexeddb/client/IDBFactoryImpl.h: 
1990         
1991         * CMakeLists.txt:
1992         * WebCore.xcodeproj/project.pbxproj:
1993         
1994         * loader/EmptyClients.cpp:
1995         * page/DatabaseProvider.h:
1996
1997 2015-09-15  Antti Koivisto  <antti@apple.com>
1998
1999         Split FontDescription into lower and higher level types
2000         https://bugs.webkit.org/show_bug.cgi?id=149036
2001
2002         Reviewed by Darin Adler.
2003
2004         Currently FontDescription is used through the text subsystem. However much of the data it
2005         carries is only needed by FontCascade and text layout but not by the lower level Font/FontCache
2006         layer. This makes code confusing. For example families specified in FontDescription are ignored
2007         at lower levels.
2008
2009         Split it into a low level FontDescription and a high level FontCascadeDescription type:
2010
2011         FontDescription <-> Font
2012         FontCascadeDescription <-> FontCascade
2013
2014         The former only carries information that is needed to instantiate a Font or fetch it from the FontCache.
2015         The latter has additional data for CSS font cascade semantics and other higher level features.
2016
2017 2015-09-15  Myles C. Maxfield  <mmaxfield@apple.com>
2018
2019         GraphicsContext::drawBidiText()'s BidiResolver should not have isolated runs
2020         https://bugs.webkit.org/show_bug.cgi?id=149193
2021
2022         Reviewed by Anders Carlsson.
2023
2024         There are two users of BidiResolver, one which needs isolated runs (in RenderBlockLineLayout) and
2025         one which doesn't (in GraphicsContext::drawBidiText()). Because of [1], the isolated runs vector
2026         is migrating to a new type outside of platform/. Therefore, only the first user of BidiResolver
2027         should have this member variable.
2028
2029         This is achieved by creating two subclasses of BidiResolver, and using the Curiously Repeating
2030         Template pattern to downcast into specializations.
2031
2032         [1] https://bugs.webkit.org/show_bug.cgi?id=149153
2033
2034         No new tests because there is no behavior change.
2035
2036         * platform/text/BidiResolver.h:
2037         (WebCore::BidiResolverBase::BidiResolverBase):
2038         (WebCore::BidiResolverBase::increment):
2039         (WebCore::BidiResolverBase::appendRun):
2040         (WebCore::BidiResolverBase::incrementInternal):
2041         (WebCore::IsolateRun>::~BidiResolverWithIsolate):
2042         (WebCore::Subclass>::appendRunInternal):
2043         (WebCore::Subclass>::embed):
2044         (WebCore::Subclass>::checkDirectionInLowerRaiseEmbeddingLevel):
2045         (WebCore::Subclass>::lowerExplicitEmbeddingLevel):
2046         (WebCore::Subclass>::raiseExplicitEmbeddingLevel):
2047         (WebCore::Subclass>::commitExplicitEmbedding):
2048         (WebCore::Subclass>::updateStatusLastFromCurrentDirection):
2049         (WebCore::Subclass>::reorderRunsFromLevels):
2050         (WebCore::Subclass>::createBidiRunsForLine):
2051         (WebCore::Subclass>::setMidpointForIsolatedRun):
2052         (WebCore::Subclass>::midpointForIsolatedRun):
2053         (WebCore::BidiResolver::BidiResolver): Deleted.
2054         (WebCore::BidiResolver::increment): Deleted.
2055         (WebCore::BidiResolver::isolatedRuns): Deleted.
2056         (WebCore::Run>::~BidiResolver): Deleted.
2057         (WebCore::Run>::appendRun): Deleted.
2058         (WebCore::Run>::embed): Deleted.
2059         (WebCore::Run>::checkDirectionInLowerRaiseEmbeddingLevel): Deleted.
2060         (WebCore::Run>::lowerExplicitEmbeddingLevel): Deleted.
2061         (WebCore::Run>::raiseExplicitEmbeddingLevel): Deleted.
2062         (WebCore::Run>::commitExplicitEmbedding): Deleted.
2063         (WebCore::Run>::updateStatusLastFromCurrentDirection): Deleted.
2064         (WebCore::Run>::reorderRunsFromLevels): Deleted.
2065         (WebCore::Run>::createBidiRunsForLine): Deleted.
2066         (WebCore::Run>::setMidpointForIsolatedRun): Deleted.
2067         (WebCore::Run>::midpointForIsolatedRun): Deleted.
2068         * rendering/InlineIterator.h:
2069         (WebCore::InlineBidiResolver::incrementInternal):
2070         (WebCore::InlineBidiResolver::appendRunInternal):
2071         (WebCore::InlineBidiResolver::increment): Deleted.
2072         (WebCore::InlineBidiResolver::appendRun): Deleted.
2073         * rendering/line/TrailingObjects.h:
2074
2075 2015-09-15  Chris Dumez  <cdumez@apple.com>
2076
2077         new Event() without parameter should throw
2078         https://bugs.webkit.org/show_bug.cgi?id=149146
2079         <rdar://problem/22565070>
2080
2081         Reviewed by Ryosuke Niwa.
2082
2083         new Event() without parameter should throw because the type parameter
2084         is mandatory as per the specification:
2085         https://dom.spec.whatwg.org/#interface-event
2086
2087         Both Firefox and Chrome throw in this case. However, WebKit was
2088         creating an event whose type is the string "undefined". This patch
2089         aligns our behavior with the specification and other major browsers.
2090
2091         No new tests, already covered by existing test.
2092
2093         * bindings/scripts/CodeGeneratorJS.pm:
2094         (GenerateConstructorDefinition):
2095         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2096         (WebCore::JSTestEventConstructorConstructor::constructJSTestEventConstructor):
2097
2098 2015-09-15  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2099
2100         [GTK] Build failure with ACCELERATED_2D_CANVAS when cairo-gl has built with OpenGLESv2 support only.
2101         https://bugs.webkit.org/show_bug.cgi?id=149172
2102
2103         Reviewed by Martin Robinson.
2104
2105         No new tests, no behavior change.
2106
2107         * platform/graphics/glx/GLContextGLX.cpp:
2108         (WebCore::GLContextGLX::cairoDevice):
2109
2110 2015-09-15  Chris Dumez  <cdumez@apple.com>
2111
2112         Element.getAttributeNS() should return null if the attribute does not exist
2113         https://bugs.webkit.org/show_bug.cgi?id=149180
2114         <rdar://problem/22561011>
2115
2116         Reviewed by Ryosuke Niwa.
2117
2118         Element.getAttributeNS() should return null if the attribute does not
2119         exist, similarly to what Element.getAttribute() does:
2120         - https://dom.spec.whatwg.org/#element (both return a nullable DOMString).
2121         - https://dom.spec.whatwg.org/#dom-element-getattributens (step 2)
2122
2123         Firefox and Chrome match the specification. However, WebKit was returning
2124         an empty string for getAttributeNS() and null for getAttribute(). This
2125         patch aligns WebKit's behavior with the specification and other browsers.
2126
2127         No new tests, already covered by existing tests.
2128
2129         * dom/Element.idl:
2130
2131 2015-09-15  Ryosuke Niwa  <rniwa@webkit.org>
2132
2133         ContentDistribution should be only used for details elements
2134         https://bugs.webkit.org/show_bug.cgi?id=149148
2135
2136         Reviewed by Antti Koivisto.
2137
2138         Extracted ShadowRootWithInsertionPoints out of ShadowRoot for HTMLDetailsElement and HTMLSummaryElement.
2139
2140         We don't add a separate .h and .cpp files since this is a temporary measure until we replace it with
2141         a slot-based shadow DOM implementation.
2142
2143         No new tests. There should be no observable behavioral change.
2144
2145         * dom/Element.cpp:
2146         (WebCore::Element::addShadowRoot): Removed the call to didShadowBoundaryChange since this function is only
2147         called in ensureUserAgentShadowRoot. Also moved the call to didAddUserAgentShadowRoot for
2148         HTMLDetailsElement's shadow root which uses this function instead of ensureUserAgentShadowRoot.
2149         (WebCore::Element::removeShadowRoot): Removed the call to invalidateDistribution since it's only called by
2150         ~Element.
2151         (WebCore::Element::createShadowRoot):
2152         (WebCore::Element::ensureUserAgentShadowRoot): Moved the call didAddUserAgentShadowRoot into addShadowRoot
2153         since HTMLDetailsElement uses a subclass of ShadowRoot.
2154         (WebCore::Element::childrenChanged):
2155         (WebCore::Element::removeAllEventListeners):
2156
2157         * dom/Element.h:
2158         (Element::addShadowRoot): Made this function a protected member as it's now used by HTMLDetailsElement.
2159
2160         * dom/ShadowRoot.cpp:
2161         (WebCore::ShadowRoot::childrenChanged): Deleted.
2162
2163         * dom/ShadowRoot.h:
2164         (WebCore::ShadowRoot::distributor): Made this a virtual function and return nullptr by default.
2165         (WebCore::ShadowRoot::isOrphan):
2166
2167         * html/HTMLDetailsElement.cpp:
2168         (WebCore::HTMLDetailsElement::create): Uses ShadowRootWithInsertionPoints instead of ShadowRoot.
2169
2170         * html/HTMLInputElement.cpp:
2171         (WebCore::HTMLInputElement::runPostTypeUpdateTasks): Removed the call to invalidateDistribution since it's
2172         only relevant for HTMLDetailsElement's shadow DOM.
2173
2174         * html/HTMLSummaryElement.cpp:
2175         (WebCore::HTMLSummaryElement::create): Uses ShadowRootWithInsertionPoints instead of ShadowRoot.
2176
2177         * html/shadow/ContentDistributor.cpp:
2178         (WebCore::ContentDistributor::distribute):
2179         (WebCore::ContentDistributor::ensureDistribution):
2180         (WebCore::ContentDistributor::invalidateDistribution):
2181
2182         * html/shadow/InsertionPoint.cpp:
2183         (WebCore::InsertionPoint::childrenChanged):
2184         (WebCore::InsertionPoint::insertedInto):
2185         (WebCore::InsertionPoint::removedFrom):
2186         (WebCore::findInsertionPointOf):
2187         (WebCore::ShadowRootWithInsertionPoints::childrenChanged): Moved from ShadowRoot.
2188
2189         * html/shadow/InsertionPoint.h:
2190         (WebCore::ShadowRootWithInsertionPoints::create): Added.
2191         (WebCore::ShadowRootWithInsertionPoints::ShadowRootWithInsertionPoints): Added.
2192
2193 2015-09-15  Brent Fulgham  <bfulgham@apple.com>
2194
2195         [Win] Tiled drawing is rendering more times than it should
2196         https://bugs.webkit.org/show_bug.cgi?id=149144
2197         <rdar://problem/22313905>
2198
2199         Reviewed by Simon Fraser.
2200
2201         Provide a more faithful implemenation of the Objective C tiled drawing logic.
2202         (1) Create a new WebTiledBackingLayerWin class that represents a the
2203             container of tiles. This matches the Objective C design.
2204         (2) Move implementation of several methods (e.g., isOpaque) to the internal
2205             class implementation so that the Tile Drawing logic can perform special
2206             handling in these cases.
2207         (3) Remove the duplicated Tiled Drawing logic from PlatformCALayerWinInternal,
2208             since it was just duplicating code in TileController and TileGrid.
2209         (4) Clean up the display callback code to avoid performing incorrect flipping
2210             of the coordinate system.
2211
2212         * PlatformAppleWin.cmake: Add new WebTiledBackingLayerWin file.            
2213         * WebCore.vcxproj/WebCore.vcxproj: Add the new WebTiledBackingLayerWin files.
2214         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2215         * platform/graphics/ca/PlatformCALayer.cpp:
2216         (PlatformCALayer::flipContext): Added convenience method.
2217         (PlatformCALayer::drawRepaintIndicator): Ditto.
2218         * platform/graphics/ca/TileGrid.cpp:
2219         (TileGrid::platformCALayerPaintContents): Flip the context before drawing the repaint
2220         indicator on Windows.
2221         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2222         (PlatformCALayerWin::PlatformCALayerWin): Create a WebTiledBackingLayerWin
2223         object if using tiled drawing.
2224         (PlatformCALayerWin::~PlatformCALayerWin):
2225         (PlatformCALayerWin::isOpaque): Move implementation to internal class.
2226         (PlatformCALayerWin::setOpaque): Ditto.
2227         (PlatformCALayerWin::setBorderWidth): Ditto.
2228         (PlatformCALayerWin::setBorderColor): Ditto.
2229         (PlatformCALayerWin::contentsScale): Ditto.
2230         (PlatformCALayerWin::setContentsScale): Ditto.
2231         (PlatformCALayerWin::cornerRadius): Ditto.
2232         (PlatformCALayerWin::tiledBacking): Ditto.
2233         (PlatformCALayerWin::drawTextAtPoint): New helper method to draw repaint counter
2234         text. Needed to work around bug in CG.
2235         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
2236         (PlatformCALayerWinInternal::PlatformCALayerWinInternal): Remove tiling-logic
2237         related member variables.
2238         (PlatformCALayerWinInternal::~PlatformCALayerWinInternal):
2239         (shouldInvertBeforeDrawingContent): Added convenience method.
2240         (shouldInvertBeforeDrawingRepaintCounters): Ditto.
2241         (PlatformCALayerWinInternal::displayCallback):
2242         (PlatformCALayerWinInternal::drawRepaintCounters): Helper method to
2243         share code between the two layer classes.
2244         (PlatformCALayerWinInternal::internalSetNeedsDisplay): use nullptr.
2245         (PlatformCALayerWinInternal::setNeedsDisplay): Ditto.
2246         (PlatformCALayerWinInternal::setNeedsDisplayInRect): Move tiled code
2247         to WebTiledBackingLayerWin and simplify the remaing code.
2248         (PlatformCALayerWinInternal::setSublayers): Remove tile code.
2249         (PlatformCALayerWinInternal::getSublayers): Ditto.
2250         (PlatformCALayerWinInternal::removeAllSublayers): Ditto.
2251         (PlatformCALayerWinInternal::insertSublayer): Ditto.
2252         (PlatformCALayerWinInternal::sublayerCount): Ditto.
2253         (PlatformCALayerWinInternal::indexOfSublayer): Ditto.
2254         (PlatformCALayerWinInternal::sublayerAtIndex): Ditto.
2255         (PlatformCALayerWinInternal::setBounds): Ditto.
2256         (PlatformCALayerWinInternal::setFrame): Ditto.
2257         (PlatformCALayerWinInternal::isOpaque): Ditto.
2258         (PlatformCALayerWinInternal::setOpaque): Ditto.
2259         (PlatformCALayerWinInternal::contentsScale): Ditto.
2260         (PlatformCALayerWinInternal::setContentsScale): Ditto.
2261         (PlatformCALayerWinInternal::setBorderWidth): Ditto.
2262         (PlatformCALayerWinInternal::setBorderColor): Ditto.
2263         (layerTypeIsTiled): Deleted.
2264         (PlatformCALayerWinInternal::constrainedSize): Deleted.
2265         (PlatformCALayerWinInternal::tileDisplayCallback): Deleted.
2266         (PlatformCALayerWinInternal::addTile): Deleted.
2267         (PlatformCALayerWinInternal::removeTile): Deleted.
2268         (PlatformCALayerWinInternal::tileAtIndex): Deleted.
2269         (PlatformCALayerWinInternal::tileCount): Deleted.
2270         (PlatformCALayerWinInternal::updateTiles): Deleted.
2271         (PlatformCALayerWinInternal::drawTile): Deleted.
2272         (PlatformCALayerWinInternal::createTileController): Deleted.
2273         (PlatformCALayerWinInternal::tiledBacking): Deleted.
2274         * platform/graphics/ca/win/PlatformCALayerWinInternal.h:
2275         (WebCore::PlatformCALayerWinInternal::owner):
2276         * platform/graphics/ca/win/WebTiledBackingLayerWin.cpp: Added.
2277         (WebTiledBackingLayerWin::WebTiledBackingLayerWin):
2278         (WebTiledBackingLayerWin::~WebTiledBackingLayerWin):
2279         (DisplayOnMainThreadContext::DisplayOnMainThreadContext):
2280         (redispatchOnMainQueue):
2281         (WebTiledBackingLayerWin::displayCallback):
2282         (WebTiledBackingLayerWin::setNeedsDisplay):
2283         (WebTiledBackingLayerWin::setNeedsDisplayInRect):
2284         (WebTiledBackingLayerWin::setBounds):
2285         (WebTiledBackingLayerWin::isOpaque):
2286         (WebTiledBackingLayerWin::setOpaque):
2287         (WebTiledBackingLayerWin::contentsScale):
2288         (WebTiledBackingLayerWin::setContentsScale):
2289         (WebTiledBackingLayerWin::setBorderWidth):
2290         (WebTiledBackingLayerWin::setBorderColor):
2291         (WebTiledBackingLayerWin::createTileController):
2292         (WebTiledBackingLayerWin::tiledBacking):
2293         (WebTiledBackingLayerWin::invalidate):
2294         * platform/graphics/ca/win/WebTiledBackingLayerWin.h: Added.
2295
2296 2015-09-14  David Hyatt  <hyatt@apple.com>
2297
2298         [New Block-Inside-Inline Model] Implement margin collapsing across contiguous anonymous inline blocks.
2299         https://bugs.webkit.org/show_bug.cgi?id=149132
2300
2301         Reviewed by Zalan Bujtas.
2302
2303         Added new tests inside fast/block/inside-inlines/
2304
2305         * rendering/InlineFlowBox.cpp:
2306         (WebCore::InlineFlowBox::anonymousInlineBlock):
2307         Change this accessor to be more robust and be willing to both recur (in case we ever do decide intermediate line boxes should exist)
2308         and to type check. This is not currently needed, but I'm just being paranoid and future proof.
2309
2310         (WebCore::InlineFlowBox::addToLine):
2311         Again, for thoroughness, I am making sure to propagate the hasAnonymousInlineBlock() bit through to parents. This is only needed
2312         if we build intermediate line boxes for lines with anonymous inline blocks.
2313
2314         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
2315         Anonymous inline blocks receive a layout via layoutBlockChild, in order to make sure that margin collapsing runs. This means
2316         that unlike other line objects, the position of the child has been determined already. Therefore we simply set the position
2317         of the line box that wraps the anonymous inline block to the already-computed position for that block.
2318
2319         Also patch the code that sets lineTop and lineBottom using the root box's dimensions. We don't really care about the root line
2320         box on anonymous inline block lines and just want to set lineTop and lineBottom to fit the anonymous inline block.
2321
2322         * rendering/RenderBlockFlow.cpp:
2323         (WebCore::RenderBlockFlow::collapseMargins):
2324         (WebCore::RenderBlockFlow::collapseMarginsWithChildInfo):
2325         Refactor collapseMargins to call a helper function that can pass in a previous "sibling", and that can handle the child
2326         being null. We do this to perform a margin collapse when anonymous inline blocks run up against regular lines (which is like
2327         collapsing with a sibling block "child").
2328
2329         * rendering/RenderBlockFlow.h:
2330         Tweak the MarginInfo constructor to take a const RenderBlockFlow. Tweak some line layout methods to pass in the LineLayoutState
2331         so that MarginInfo is available during line layout.
2332
2333         * rendering/RenderBlockLineLayout.cpp:
2334         (WebCore::RenderBlockFlow::createLineBoxes):
2335         When we create a new line box, if it is not an anonymous inline block line and our previous line was, simulate a margin
2336         collapse in order to possibly push the line box down or up. Re-use the pagination adjustment code to rewind line layout
2337         and perform it again if pushed below a float.
2338
2339         (WebCore::constructBidiRunsForSegment):
2340         (WebCore::RenderBlockFlow::layoutRunsAndFloats):
2341         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
2342         (WebCore::RenderBlockFlow::layoutLineBoxes):
2343         (WebCore::RenderBlockFlow::determineStartPosition):
2344         (WebCore::RenderBlockFlow::matchedEndLine):
2345         (WebCore::RenderBlockFlow::updateRegionForLine):
2346         (WebCore::RenderBlockFlow::marginCollapseLinesFromStart):
2347         Patch line layout to run margin collapsing when anonymous inline blocks are encountered. This involves making sure
2348         margin info and float bottom positions are passed through so that layoutBlockChild can be properly called on
2349         anonymous inline blocks that we encounter.
2350
2351         In addition line layout when it syncs dirty lines has to run margin collapsing on earlier lines in order to make
2352         sure margin info is properly set up at the first dirty line position.
2353
2354         Note that there will be more improvements/changes in this area (dirty line syncing), as the current model is inefficient
2355         when many anonymous inline blocks are scattered throughout a large-scale line box tree.
2356
2357         * rendering/RootInlineBox.cpp:
2358         (WebCore::RootInlineBox::alignBoxesInBlockDirection):
2359         (WebCore::RootInlineBox::ascentAndDescentForBox):
2360         Make sure to rely on the block layout code for the placement of the boxes themselves. Set up the line box code to not have
2361         an effect on ascent/descent.
2362
2363         * rendering/line/BreakingContext.h:
2364         (WebCore::BreakingContext::BreakingContext):
2365         (WebCore::BreakingContext::handleReplaced):
2366         When we encounter an anonymous inline block, lay it out when it is seen. We have to delay the layout, since we have
2367         to be able to perform it mid-line-layout when the containing block's logical height is at the correct value and all previous
2368         lines are placed. Margin info also has to be current.
2369
2370         * rendering/line/LineBreaker.cpp:
2371         * rendering/line/LineBreaker.h:
2372         Patched to pass LineLayoutState through so that the stuff we need to perform block layout is available (margin info and float vars).
2373
2374         * rendering/line/LineLayoutState.h:
2375         Add the block layout margin and float bottom information to the line layout state so that we have it available when performing
2376         layouts and margin collapses on anonymous inline block children.
2377
2378 2015-09-15  Brady Eidson  <beidson@apple.com>
2379
2380         Make the IDBAny::Type enum into an enum class.
2381         https://bugs.webkit.org/show_bug.cgi?id=149169.
2382
2383         Reviewed by Oliver Hunt.
2384
2385         No new tests (Cleanup, no behavior change).
2386
2387         * Modules/indexeddb/IDBAny.h:
2388         * Modules/indexeddb/legacy/LegacyAny.cpp:
2389         (WebCore::LegacyAny::createInvalid):
2390         (WebCore::LegacyAny::createNull):
2391         (WebCore::LegacyAny::LegacyAny):
2392         (WebCore::LegacyAny::domStringList):
2393         (WebCore::LegacyAny::idbCursor):
2394         (WebCore::LegacyAny::idbCursorWithValue):
2395         (WebCore::LegacyAny::idbDatabase):
2396         (WebCore::LegacyAny::idbFactory):
2397         (WebCore::LegacyAny::idbIndex):
2398         (WebCore::LegacyAny::idbObjectStore):
2399         (WebCore::LegacyAny::idbTransaction):
2400         (WebCore::LegacyAny::scriptValue):
2401         (WebCore::LegacyAny::string):
2402         (WebCore::LegacyAny::integer):
2403         (WebCore::LegacyAny::legacyCursor):
2404         (WebCore::LegacyAny::legacyCursorWithValue):
2405         (WebCore::LegacyAny::legacyDatabase):
2406         (WebCore::LegacyAny::legacyFactory):
2407         (WebCore::LegacyAny::legacyIndex):
2408         (WebCore::LegacyAny::legacyObjectStore):
2409         (WebCore::LegacyAny::legacyTransaction):
2410         * Modules/indexeddb/legacy/LegacyCursor.cpp:
2411         (WebCore::LegacyCursor::LegacyCursor):
2412         (WebCore::LegacyCursor::effectiveObjectStore):
2413         * Modules/indexeddb/legacy/LegacyObjectStore.cpp:
2414         * Modules/indexeddb/legacy/LegacyOpenDBRequest.cpp:
2415         (WebCore::LegacyOpenDBRequest::dispatchEvent):
2416         * Modules/indexeddb/legacy/LegacyRequest.cpp:
2417         (WebCore::LegacyRequest::getResultCursor):
2418         (WebCore::effectiveObjectStore):
2419         * bindings/js/JSIDBAnyCustom.cpp:
2420         (WebCore::toJS):
2421         * inspector/InspectorIndexedDBAgent.cpp:
2422         * page/DatabaseProvider.h:
2423
2424 2015-09-15  Brady Eidson  <beidson@apple.com>
2425
2426         Move most IDB object encoding/decoding from WebKit2 to WebCore.
2427         https://bugs.webkit.org/show_bug.cgi?id=149152
2428
2429         Reviewed by Alex Christensen.
2430
2431         No new tests (Cleanup, no behavior change).
2432
2433         * Modules/indexeddb/IDBDatabaseMetadata.h:
2434         (WebCore::IDBDatabaseMetadata::encode):
2435         (WebCore::IDBDatabaseMetadata::decode):
2436         * Modules/indexeddb/IDBIndexMetadata.h:
2437         (WebCore::IDBIndexMetadata::encode):
2438         (WebCore::IDBIndexMetadata::decode):
2439         * Modules/indexeddb/IDBKeyData.h:
2440         (WebCore::IDBKeyData::encode):
2441         (WebCore::IDBKeyData::decode):
2442         * Modules/indexeddb/IDBKeyPath.h:
2443         (WebCore::IDBKeyPath::encode):
2444         (WebCore::IDBKeyPath::decode):
2445         * Modules/indexeddb/IDBKeyRangeData.h:
2446         (WebCore::IDBKeyRangeData::encode):
2447         (WebCore::IDBKeyRangeData::decode):
2448         * Modules/indexeddb/IDBObjectStoreMetadata.h:
2449         (WebCore::IDBObjectStoreMetadata::encode):
2450         (WebCore::IDBObjectStoreMetadata::decode):
2451
2452 2015-09-14  Brady Eidson  <beidson@apple.com>
2453
2454         Make the enum IDBKey::Type into a utility enum class.
2455         https://bugs.webkit.org/show_bug.cgi?id=149149
2456
2457         Reviewed by Alex Christensen.
2458
2459         No new tests (Cleanup, no behavior change).
2460
2461         * Modules/indexeddb/IDBKey.cpp:
2462         (WebCore::IDBKey::isValid):
2463         (WebCore::IDBKey::compare):
2464         * Modules/indexeddb/IDBKey.h:
2465         (WebCore::IDBKey::createNumber):
2466         (WebCore::IDBKey::createDate):
2467         (WebCore::IDBKey::createMultiEntryArray):
2468         (WebCore::IDBKey::createArray):
2469         (WebCore::IDBKey::type):
2470         (WebCore::IDBKey::array):
2471         (WebCore::IDBKey::string):
2472         (WebCore::IDBKey::date):
2473         (WebCore::IDBKey::number):
2474         (WebCore::IDBKey::compareTypes):
2475         (WebCore::IDBKey::IDBKey):
2476         * Modules/indexeddb/IDBKeyData.cpp:
2477         (WebCore::IDBKeyData::IDBKeyData):
2478         (WebCore::IDBKeyData::maybeCreateIDBKey):
2479         (WebCore::IDBKeyData::isolatedCopy):
2480         (WebCore::IDBKeyData::encode):
2481         (WebCore::IDBKeyData::decode):
2482         (WebCore::IDBKeyData::compare):
2483         (WebCore::IDBKeyData::loggingString):
2484         (WebCore::IDBKeyData::setArrayValue):
2485         (WebCore::IDBKeyData::setStringValue):
2486         (WebCore::IDBKeyData::setDateValue):
2487         (WebCore::IDBKeyData::setNumberValue):
2488         * Modules/indexeddb/IDBKeyData.h:
2489         (WebCore::IDBKeyData::IDBKeyData):
2490         (WebCore::IDBKeyData::minimum):
2491         (WebCore::IDBKeyData::maximum):
2492         * Modules/indexeddb/IndexedDB.h:
2493         * bindings/js/IDBBindingUtilities.cpp:
2494         (WebCore::idbKeyToJSValue):
2495         (WebCore::createIDBKeyFromValue):
2496         (WebCore::createIDBKeyFromScriptValueAndKeyPath):
2497         (WebCore::generateIndexKeysForValue):
2498         * inspector/InspectorIndexedDBAgent.cpp:
2499
2500 2015-09-15  Javier Fernandez  <jfernandez@igalia.com>
2501
2502         [CSS Grid Layout] Using {row, column}-axis terms in alignment related logic
2503         https://bugs.webkit.org/show_bug.cgi?id=148942
2504
2505         Reviewed by Sergio Villar Senin.
2506
2507         This patch changes the names of several functions and variables
2508         defined to implement the alignment logic. We want to use from now
2509         on the terms row-axis and column-axis when referring to the
2510         alignment direction the logic is applied to.
2511
2512         No new tests, no new functionality.
2513
2514         * rendering/RenderGrid.cpp:
2515         (WebCore::RenderGrid::columnAxisOffsetForChild):
2516         (WebCore::RenderGrid::rowAxisOffsetForChild):
2517         (WebCore::RenderGrid::findChildLogicalPosition):
2518         * rendering/RenderGrid.h:
2519
2520 2015-09-14  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2521
2522         Remove all uses of PassRefPtr in WebCore/xml
2523         https://bugs.webkit.org/show_bug.cgi?id=149114
2524
2525         Reviewed by Darin Adler.
2526
2527         * dom/DecodedDataDocumentParser.h:
2528         * dom/DocumentParser.h:
2529         * dom/RawDataDocumentParser.h:
2530         * html/FTPDirectoryDocument.cpp:
2531         (WebCore::FTPDirectoryDocumentParser::append):
2532         * html/parser/HTMLDocumentParser.cpp:
2533         (WebCore::HTMLDocumentParser::append):
2534         * html/parser/HTMLDocumentParser.h:
2535         * html/parser/TextDocumentParser.cpp:
2536         (WebCore::TextDocumentParser::append):
2537         * html/parser/TextDocumentParser.h:
2538         * xml/NativeXPathNSResolver.cpp:
2539         (WebCore::NativeXPathNSResolver::NativeXPathNSResolver):
2540         * xml/NativeXPathNSResolver.h:
2541         (WebCore::NativeXPathNSResolver::create):
2542         * xml/XMLErrors.cpp:
2543         (WebCore::createXHTMLParserErrorHeader):
2544         * xml/XMLHttpRequestProgressEventThrottle.cpp:
2545         (WebCore::XMLHttpRequestProgressEventThrottle::dispatchReadyStateChangeEvent):
2546         (WebCore::XMLHttpRequestProgressEventThrottle::dispatchEvent):
2547         (WebCore::XMLHttpRequestProgressEventThrottle::dispatchDeferredEvents):
2548         * xml/XMLHttpRequestProgressEventThrottle.h:
2549         * xml/XMLSerializer.h:
2550         * xml/XPathEvaluator.cpp:
2551         (WebCore::XPathEvaluator::createExpression):
2552         (WebCore::XPathEvaluator::createNSResolver):
2553         (WebCore::XPathEvaluator::evaluate):
2554         * xml/XPathEvaluator.h:
2555         * xml/XPathNodeSet.h: Fix style errors.
2556         (WebCore::XPath::NodeSet::NodeSet):
2557         (WebCore::XPath::NodeSet::append):
2558         * xml/XPathPath.cpp:
2559         (WebCore::XPath::Filter::evaluate):
2560         (WebCore::XPath::LocationPath::evaluate):
2561         * xml/XPathValue.h: ditto.
2562         (WebCore::XPath::Value::Value):
2563         (WebCore::XPath::Value::Data::create):
2564         (WebCore::XPath::Value::Data::Data):
2565         * xml/XSLTProcessor.cpp:
2566         (WebCore::XSLTProcessor::transformToDocument):
2567         (WebCore::XSLTProcessor::transformToFragment):
2568         * xml/XSLTProcessor.h:
2569         (WebCore::XSLTProcessor::setXSLStyleSheet):
2570         (WebCore::XSLTProcessor::importStylesheet):
2571         * xml/parser/XMLDocumentParser.cpp:
2572         (WebCore::XMLDocumentParser::append):
2573         * xml/parser/XMLDocumentParser.h:
2574
2575 2015-09-14  Dewei Zhu  <dewei_zhu@apple.com>
2576
2577         Polish code for r189579.
2578         https://bugs.webkit.org/show_bug.cgi?id=149131
2579
2580         Reviewed by Chris Dumez.
2581
2582         Use more self-explaining function name "characterSetWithUTF8Fallback" instead of
2583         "characterSetForBindings". Optimize the way to get text encoding.
2584
2585         * dom/Document.cpp:
2586         (WebCore::Document::characterSetWithUTF8Fallback):
2587         (WebCore::Document::encoding): Deleted.
2588         (WebCore::Document::characterSetForBindings): Deleted.
2589         * dom/Document.h:
2590         (WebCore::Document::encoding):
2591         (WebCore::Document::textEncoding):
2592         * dom/Document.idl:
2593         * loader/DocumentWriter.cpp:
2594         (WebCore::DocumentWriter::createDecoderIfNeeded):
2595         * loader/FormSubmission.cpp:
2596         (WebCore::encodingFromAcceptCharset):
2597
2598 2015-09-14  Chris Dumez  <cdumez@apple.com>
2599
2600         Drop non-standard [IsIndex] WebKit IDL extended attribute
2601         https://bugs.webkit.org/show_bug.cgi?id=149122
2602         <rdar://problem/22547139>
2603
2604         Reviewed by Darin Adler.
2605
2606         Drop non-standard [IsIndex] WebKit IDL extended attribute. This attribute
2607         causes us to throw an IndexSizeError if the input value is negative. Web
2608         IDL supports no such thing. Instead Web IDL supports:
2609         1. Default behavior: the input value wraps around if it does not fit.
2610         2. [EnforceRange]: A TypeError is thrown if the input value does not fit [1].
2611         3. [Clamp]: The input value will be clamped if it does not fit [2].
2612
2613         Our bindings generator supports all three. We don't need the non-standard
2614         [IsIndex].
2615
2616         We previously used [IsIndex] in places where we're supposed to wrap around
2617         as per Web IDL. Therefore, we threw for negative values but other browsers
2618         don't. For e.g., CharacterData.substringData(offset, -1) is supposed to
2619         return the substring from offset to the end of the string. It does so in
2620         Firefox and Chrome. However, WebKit was throwing an Exception.
2621
2622         This change impacts the CharacterData and the SVGTextContentElement
2623         API. The compatibility risk is low because we were throwing an exception
2624         for negative values and we now wrap the value around instead, as other
2625         browsers do.
2626
2627         No new tests, already covered by existing tests.
2628
2629         [1] https://heycam.github.io/webidl/#EnforceRange
2630         [2] https://heycam.github.io/webidl/#Clamp
2631
2632         * bindings/scripts/CodeGeneratorJS.pm:
2633         (GenerateParametersCheck): Deleted.
2634         * bindings/scripts/IDLAttributes.txt:
2635         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2636         (WebCore::jsTestEventTargetPrototypeFunctionItem):
2637         * bindings/scripts/test/TestEventTarget.idl:
2638         * dom/CharacterData.cpp:
2639         (WebCore::CharacterData::deleteData):
2640         (WebCore::CharacterData::replaceData):
2641         * dom/CharacterData.idl:
2642         * dom/ClientRectList.idl:
2643         * svg/SVGTextContentElement.cpp:
2644         (WebCore::SVGTextContentElement::getSubStringLength):
2645         (WebCore::SVGTextContentElement::selectSubString):
2646         * svg/SVGTextContentElement.idl:
2647
2648 2015-09-14  Chris Dumez  <cdumez@apple.com>
2649
2650         Document.createNodeIterator(null) / Document.createTreeWalker(null) should throw a TypeError
2651         https://bugs.webkit.org/show_bug.cgi?id=149126
2652         <rdar://problem/22564891>
2653
2654         Reviewed by Ryosuke Niwa.
2655
2656         Document.createNodeIterator(null) / Document.createTreeWalker(null)
2657         should throw a TypeError:
2658         https://dom.spec.whatwg.org/#interface-document
2659
2660         This is because the parameter is not nullable and Web IDL says we
2661         should throw a TypeError in this case.
2662
2663         Firefox and Chrome throw an exception in this case. This patch
2664         aligns our behavior with the specification and other major browsers.
2665
2666         No new tests, already covered by existing W3C test.
2667
2668         * dom/Document.cpp:
2669         (WebCore::Document::createNodeIterator):
2670         (WebCore::Document::createTreeWalker):
2671         * dom/Document.h:
2672         * dom/Document.idl:
2673         * dom/NodeIterator.cpp:
2674         (WebCore::NodeIterator::NodeIterator):
2675         * dom/NodeIterator.h:
2676         (WebCore::NodeIterator::create):
2677         * dom/Traversal.cpp:
2678         (WebCore::NodeIteratorBase::NodeIteratorBase):
2679         * dom/Traversal.h:
2680         * dom/TreeWalker.cpp:
2681         (WebCore::TreeWalker::TreeWalker):
2682         * dom/TreeWalker.h:
2683         (WebCore::TreeWalker::create):
2684
2685 2015-09-14  Alex Christensen  <achristensen@webkit.org>
2686
2687         Fix Windows clean build after r189746
2688
2689         * WebCore.vcxproj/copyForwardingHeaders.cmd:
2690         Copy headers from new legacy directory.
2691
2692 2015-09-14  Chris Dumez  <cdumez@apple.com>
2693
2694         window.HTMLDetailsElement should exist
2695         https://bugs.webkit.org/show_bug.cgi?id=149139
2696
2697         Reviewed by Ryosuke Niwa.
2698
2699         window.HTMLDetailsElement should exist:
2700         https://html.spec.whatwg.org/multipage/forms.html#the-details-element
2701
2702         Drop the [NoInterfaceObject] IDL extended attribute in WebKit to
2703         address the problem.
2704
2705         No new tests, already covered by existing tests.
2706
2707         * html/HTMLDetailsElement.idl:
2708
2709 2015-09-14  Alex Christensen  <achristensen@webkit.org>
2710
2711         Fix AppleWin CMake build
2712         https://bugs.webkit.org/show_bug.cgi?id=149137
2713
2714         Reviewed by Brent Fulgham.
2715
2716         * PlatformAppleWin.cmake:
2717         Spell Inband correctly.
2718         * css/makegrammar.pl:
2719         Add quotes so bison can be in a directory with spaces in it.        
2720
2721 2015-09-14  Alex Christensen  <achristensen@webkit.org>
2722
2723         [Win] Unreviewed build fix after r189746
2724
2725         * WebCore.vcxproj/WebCoreIncludeCommon.props:
2726         Include new legacy directory.
2727
2728 2015-09-14  Alex Christensen  <achristensen@webkit.org>
2729
2730         Progress towards CMake on Mac.
2731         https://bugs.webkit.org/show_bug.cgi?id=149123
2732
2733         Reviewed by Chris Dumez.
2734
2735         * CMakeLists.txt:
2736         Added some more files.
2737         * PlatformMac.cmake:
2738         Added more files and listed the strange ObjC bindings.
2739         * contentextensions/DFACombiner.cpp:
2740         * contentextensions/DFACombiner.h:
2741         Added preprocessor protection.
2742         * platform/FileSystem.h:
2743         Include utility.  It's needed to compile the different configurations.
2744         * platform/ScrollAnimator.cpp:
2745         ScrollAnimator is an abstract class on Mac.  Don't compile it.
2746         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
2747         FontAntialiasingStateSaver.h is only used on iOS.
2748         * rendering/RenderThemeMac.mm:
2749         config.h needs to be outside the #if !PLATFORM(IOS) to compile correctly without precompiled headers.
2750
2751 2015-09-14  Brady Eidson  <beidson@apple.com>
2752
2753         Rename current concrete IDB implementation to "Legacy".
2754         https://bugs.webkit.org/show_bug.cgi?id=149118
2755
2756         Reviewed by Alex Christensen.
2757
2758         No new tests (No change in behavior).
2759
2760         This patch makes IDL bindings abstract.
2761         It then renames the current concrete implementations of the bindings from "IDB" to "Legacy".
2762         Finally it moves those files and their support classes to a "legacy" subfolder.
2763
2764         * CMakeLists.txt:
2765         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
2766         * Modules/indexeddb/IDBAny.cpp:
2767         * Modules/indexeddb/IDBAny.h:
2768         * Modules/indexeddb/IDBCursor.cpp:
2769         * Modules/indexeddb/IDBCursor.h:
2770         * Modules/indexeddb/IDBCursor.idl:
2771         * Modules/indexeddb/IDBCursorWithValue.cpp:
2772         * Modules/indexeddb/IDBCursorWithValue.h:
2773         * Modules/indexeddb/IDBCursorWithValue.idl:
2774         * Modules/indexeddb/IDBDatabase.cpp:
2775         * Modules/indexeddb/IDBDatabase.h:
2776         * Modules/indexeddb/IDBDatabase.idl:
2777         * Modules/indexeddb/IDBFactory.cpp:
2778         * Modules/indexeddb/IDBFactory.h:
2779         * Modules/indexeddb/IDBFactory.idl:
2780         * Modules/indexeddb/IDBIndex.cpp:
2781         * Modules/indexeddb/IDBIndex.h:
2782         * Modules/indexeddb/IDBIndex.idl:
2783         * Modules/indexeddb/IDBObjectStore.cpp:
2784         * Modules/indexeddb/IDBObjectStore.h:
2785         * Modules/indexeddb/IDBObjectStore.idl:
2786         * Modules/indexeddb/IDBOpenDBRequest.cpp:
2787         * Modules/indexeddb/IDBOpenDBRequest.h:
2788         * Modules/indexeddb/IDBOpenDBRequest.idl:
2789         * Modules/indexeddb/IDBRequest.cpp:
2790         * Modules/indexeddb/IDBRequest.h:
2791         * Modules/indexeddb/IDBRequest.idl:
2792         * Modules/indexeddb/IDBTransaction.cpp:
2793         * Modules/indexeddb/IDBTransaction.h:
2794         * Modules/indexeddb/IDBTransaction.idl:
2795         * Modules/indexeddb/IDBVersionChangeEvent.cpp:
2796         * Modules/indexeddb/IDBVersionChangeEvent.h:
2797         * Modules/indexeddb/legacy/IDBCallbacks.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCallbacks.h.
2798         * Modules/indexeddb/legacy/IDBCursorBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackend.cpp.
2799         * Modules/indexeddb/legacy/IDBCursorBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackend.h.
2800         * Modules/indexeddb/legacy/IDBCursorBackendOperations.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendOperations.cpp.
2801         * Modules/indexeddb/legacy/IDBCursorBackendOperations.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendOperations.h.
2802         * Modules/indexeddb/legacy/IDBDatabaseBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.cpp.
2803         * Modules/indexeddb/legacy/IDBDatabaseBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.h.
2804         * Modules/indexeddb/legacy/IDBDatabaseCallbacks.h: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacks.h.
2805         * Modules/indexeddb/legacy/IDBDatabaseCallbacksImpl.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp.
2806         * Modules/indexeddb/legacy/IDBDatabaseCallbacksImpl.h: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacksImpl.h.
2807         * Modules/indexeddb/legacy/IDBFactoryBackendInterface.h: Renamed from Source/WebCore/Modules/indexeddb/IDBFactoryBackendInterface.h.
2808         * Modules/indexeddb/legacy/IDBPendingDeleteCall.h: Renamed from Source/WebCore/Modules/indexeddb/IDBPendingDeleteCall.h.
2809         * Modules/indexeddb/legacy/IDBPendingOpenCall.h: Renamed from Source/WebCore/Modules/indexeddb/IDBPendingOpenCall.h.
2810         * Modules/indexeddb/legacy/IDBPendingTransactionMonitor.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBPendingTransactionMonitor.cpp.
2811         * Modules/indexeddb/legacy/IDBPendingTransactionMonitor.h: Renamed from Source/WebCore/Modules/indexeddb/IDBPendingTransactionMonitor.h.
2812         * Modules/indexeddb/legacy/IDBTransactionBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackend.cpp.
2813         * Modules/indexeddb/legacy/IDBTransactionBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackend.h.
2814         * Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.cpp.
2815         * Modules/indexeddb/legacy/IDBTransactionBackendOperations.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.h.
2816         * Modules/indexeddb/legacy/IDBTransactionCoordinator.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.cpp.
2817         * Modules/indexeddb/legacy/IDBTransactionCoordinator.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.h.
2818         * Modules/indexeddb/legacy/LegacyAny.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBAny.cpp.
2819         * Modules/indexeddb/legacy/LegacyAny.h: Added.
2820         * Modules/indexeddb/legacy/LegacyCursor.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBCursor.cpp.
2821         * Modules/indexeddb/legacy/LegacyCursor.h: Copied from Source/WebCore/Modules/indexeddb/IDBCursor.h.
2822         * Modules/indexeddb/legacy/LegacyCursorWithValue.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBCursorWithValue.cpp.
2823         * Modules/indexeddb/legacy/LegacyCursorWithValue.h: Copied from Source/WebCore/Modules/indexeddb/IDBCursorWithValue.h.
2824         * Modules/indexeddb/legacy/LegacyDatabase.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBDatabase.cpp.
2825         * Modules/indexeddb/legacy/LegacyDatabase.h: Copied from Source/WebCore/Modules/indexeddb/IDBDatabase.h.
2826         * Modules/indexeddb/legacy/LegacyFactory.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBFactory.cpp.
2827         * Modules/indexeddb/legacy/LegacyFactory.h: Copied from Source/WebCore/Modules/indexeddb/IDBFactory.h.
2828         * Modules/indexeddb/legacy/LegacyIndex.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBIndex.cpp.
2829         * Modules/indexeddb/legacy/LegacyIndex.h: Added.
2830         * Modules/indexeddb/legacy/LegacyObjectStore.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp.
2831         * Modules/indexeddb/legacy/LegacyObjectStore.h: Copied from Source/WebCore/Modules/indexeddb/IDBObjectStore.h.
2832         * Modules/indexeddb/legacy/LegacyOpenDBRequest.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp.
2833         * Modules/indexeddb/legacy/LegacyOpenDBRequest.h: Copied from Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.h.
2834         * Modules/indexeddb/legacy/LegacyRequest.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBRequest.cpp.
2835         * Modules/indexeddb/legacy/LegacyRequest.h: Copied from Source/WebCore/Modules/indexeddb/IDBRequest.h.
2836         * Modules/indexeddb/legacy/LegacyTransaction.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBTransaction.cpp.
2837         * Modules/indexeddb/legacy/LegacyTransaction.h: Copied from Source/WebCore/Modules/indexeddb/IDBTransaction.h.
2838         * Modules/indexeddb/legacy/LegacyVersionChangeEvent.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.cpp.
2839         * Modules/indexeddb/legacy/LegacyVersionChangeEvent.h: Copied from Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.h.
2840         * WebCore.xcodeproj/project.pbxproj:
2841         * WebCore.vcxproj/WebCore.vcxproj:
2842
2843 2015-09-14  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2844
2845         [EFL] Remove create() factory function in EvasGLContext and EvasGLSurface
2846         https://bugs.webkit.org/show_bug.cgi?id=149110
2847
2848         Reviewed by Csaba Osztrogonác.
2849
2850         It is not good implementation we support both create() factory function and public constructor.
2851         In EvasGLContext and EvasGLSurface cases, those have supported both. However create() factory is only
2852         used by EwkView. Thus let's remove the create() function, then EwkView creates EvasGLContext using
2853         std::make_unique<> directly.
2854
2855         * platform/graphics/efl/EvasGLContext.h:
2856         (WebCore::EvasGLContext::create): Deleted.
2857         * platform/graphics/efl/EvasGLSurface.h:
2858         (WebCore::EvasGLSurface::create): Deleted.
2859
2860 2015-09-09  Sergio Villar Senin  <svillar@igalia.com>
2861
2862         min-width/height should default to auto for grid items
2863         https://bugs.webkit.org/show_bug.cgi?id=146021
2864
2865         Reviewed by Darin Adler.
2866
2867         Based on Blink's r194408, r194863 and r194887 by <rego@igalia.com>.
2868
2869         From the spec (http://dev.w3.org/csswg/css-grid/#grid-items):
2870         "The auto value of min-width and min-height behaves on grid
2871         items in the relevant axis analogously to its behavior on flex
2872         items in the main axis."
2873
2874         From now on the default value for min-width and min-height for
2875         grid items is auto, meaning that in general, grid items won't
2876         shrink bellow their content.
2877
2878         The change is not exactly the same as the one in Blink because
2879         this one takes into account vertical writting modes, something
2880         that was not well handled in the original one.
2881
2882         Tests: fast/css-grid-layout/min-width-height-auto-overflow.html
2883                fast/css-grid-layout/min-width-height-auto.html
2884
2885         * rendering/RenderBox.cpp:
2886         (WebCore::RenderBox::computeLogicalWidthInRegion):
2887         (WebCore::RenderBox::computeLogicalHeight):
2888
2889 2015-09-14  Manuel Rego Casasnovas  <rego@igalia.com>
2890
2891         [css-grid] Percentage columns should remove scrollbar's width
2892         https://bugs.webkit.org/show_bug.cgi?id=149116
2893
2894         Reviewed by Sergio Villar Senin.
2895
2896         Currently the calculation of percentage columns was not subtracting the
2897         scrollbar's size.
2898         Fixed RenderGrid::computeUsedBreadthOfSpecifiedLength()
2899         to avoid this problem.
2900
2901         Test: fast/css-grid-layout/grid-percent-track-scrollbar.html
2902
2903         * rendering/RenderGrid.cpp:
2904         (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
2905
2906 2015-09-13  Chris Dumez  <cdumez@apple.com>
2907
2908         Improve Node pre-insertion validation when the parent is a Document
2909         https://bugs.webkit.org/show_bug.cgi?id=149109
2910         <rdar://problem/22560436>
2911
2912         Reviewed by Ryosuke Niwa.
2913
2914         Improve Node pre-insertion validation when the parent is a Document to
2915         match the specification:
2916         https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity
2917         https://dom.spec.whatwg.org/#concept-node-replace
2918
2919         This affects the following API: Node.insertBefore(), Node.appendChild(),
2920         Node.replaceChild().
2921
2922         WebKit current fails to do the following checks whenever the parent is a
2923         Document from pre-insertion validation:
2924         1. If the inserted Node is a DocumentFragment, we should make sure it
2925           contains only one Element.
2926         -> This is because a Document can have only one child that is an
2927            Element [1].
2928         2.a. If an Element is inserted, we should make sure it is not inserted
2929              before a DocumentType.
2930         2.b. If a DocumentType is inserted, we should make sure it is not
2931              inserted after an Element.
2932         -> This is because the DocType must come before the optional Element
2933            child [1].
2934
2935         Firefox and Chrome already match the specification here. This patch
2936         aligns WebKit's behavior with those browsers and the specification.
2937
2938         [1] https://dom.spec.whatwg.org/#node-trees
2939
2940         No new tests, already covered by existing W3C tests.
2941
2942         * dom/ContainerNode.cpp:
2943         (WebCore::checkAcceptChild):
2944         (WebCore::checkAddChild):
2945         (WebCore::checkReplaceChild):
2946         (WebCore::ContainerNode::insertBefore):
2947         (WebCore::ContainerNode::appendChild):
2948         (WebCore::containsConsideringHostElements): Deleted.
2949         (WebCore::checkAcceptChildGuaranteedNodeTypes): Deleted.
2950         * dom/Document.cpp:
2951         (WebCore::Document::canAcceptChild):
2952         (WebCore::Document::cloneNodeInternal): Deleted.
2953         * dom/Document.h:
2954
2955 2015-09-13  Chris Dumez  <cdumez@apple.com>
2956
2957         Document.adoptNode() should be able to explicitly adopt a DocumentType node
2958         https://bugs.webkit.org/show_bug.cgi?id=149097
2959         <rdar://problem/22549345>
2960
2961         Reviewed by Ryosuke Niwa.
2962
2963         Document.adoptNode() should be able to explicitly adopt a DocumentType
2964         node as per the latest DOM specification:
2965         https://dom.spec.whatwg.org/#dom-document-adoptnode
2966
2967         Chrome and Firefox match the specidicaiton but WebKit was throwing a
2968         NotSupportedError.
2969
2970         No new tests, already covered by existing test.
2971
2972         * dom/Document.cpp:
2973         (WebCore::Document::adoptNode): Deleted.
2974
2975 2015-09-13  Chris Dumez  <cdumez@apple.com>
2976
2977         Document.title does not behave according to specification
2978         https://bugs.webkit.org/show_bug.cgi?id=149098
2979
2980         Reviewed by Ryosuke Niwa.
2981
2982         Update Document.title to behave according to the latest DOM specification:
2983         https://html.spec.whatwg.org/multipage/dom.html#document.title
2984
2985         In particular, the following Web-Exposed changes were made:
2986         1. The title Element should be the first title element in the document
2987            (in tree order) [1]. Previously, WebKit would use the first title
2988            Element *added* to the Document. Document.title returns the text
2989            content of the title Element so this change is web-exposed.
2990         2. If the title Element is replaced after the title has been set by the
2991            JS (via the document.title setter), we should update the value
2992            returned by the document.title getter. Previously, WebKit would set
2993            a flag if the title was explicitly set by JS via document.title
2994            setter and later title element changes would not override the title
2995            set by the JS. This behavior isn't specified and does not match the
2996            behavior of other browsers.
2997
2998         The new behavior is also consistent with the behavior of Firefox and
2999         Chrome.
3000
3001         Some refactoring was made for the sake of clarity now that our
3002         implementation has changed. See details below.
3003
3004         [1] https://html.spec.whatwg.org/multipage/dom.html#the-title-element-2
3005
3006         No new tests, already covered by existing tests.
3007
3008         * dom/Document.cpp:
3009         (WebCore::Document::updateTitleFromTitleElement):
3010         New convenience method that calls updateTitle() with the text of the
3011         document's current title Element. If there is no title Element, it
3012         clears the title.
3013
3014         (WebCore::Document::updateTitleElement):
3015         Method which updates the Document's title Element whenever a title
3016         Element is added or removed from the Document. Once the title Element
3017         is updated, it takes care of calling updateTitleFromTitleElement() to
3018         update the Document's title.
3019
3020         (WebCore::Document::titleElementAdded):
3021         (WebCore::Document::titleElementRemoved):
3022         (WebCore::Document::titleElementTextChanged):
3023         New Document public API called by HTMLTitleElement / SVGTitleElement
3024         whenever a title Element is added / removed from the Document or
3025         whenever the title element's text has changed. These methods will
3026         take care of calling updateTitleElement() / updateTitleFromTitleElement()
3027         as necessary.
3028         Previously, we would only have 2 methods:
3029         - setTitleElement() which would be called whenever a title Element was
3030           added to the document or when its text had changed. The name was
3031           confusing because it would not necessarily set the document's title
3032           Element and it would be used both for title element update and a
3033           simple title update. This method has been split into 2:
3034           titleElementAdded() and titleElementTextChanged().
3035         - removeTitle() which would be called whenever a title Element was
3036           removed. The naming was confusing because it would not necessarily
3037           remove the Document's title Element. This is now called
3038           titleElementRemoved().
3039
3040         * html/HTMLTitleElement.cpp:
3041         (WebCore::HTMLTitleElement::insertedInto):
3042         Call the new titleElementAdded() instead of setTitleElement().
3043
3044         (WebCore::HTMLTitleElement::removedFrom):
3045         Call the new titleElementRemoved() instead of removeTitle().
3046
3047         (WebCore::HTMLTitleElement::childrenChanged):
3048         Call the new titleElementTextChanged() instead of
3049         setTitleElement() / removeTitle() as we don't really want
3050         to remove or add a title Element. We merely want to notify
3051         the document that the title element text has changed in
3052         case it is the current title Element of the Document.
3053
3054         (WebCore::HTMLTitleElement::computedTextWithDirection):
3055         Rename textWithDirection() to computedTextWithDirection() to
3056         make it clear it is not a simple getter and make it private
3057         as it is only used to set the m_title member which caches the
3058         computed text.
3059
3060         * html/HTMLTitleElement.h:
3061         Add new textWithDirection() getter which returns m_title. This
3062         is needed so that Document can query the title of the Element.
3063         Previously, HTMLTitleElement would pass directly m_title to
3064         the Document when calling Document::setTitleElement().
3065
3066         * svg/SVGTitleElement.cpp:
3067         (WebCore::SVGTitleElement::insertedInto):
3068         Call the new titleElementAdded() instead of setTitleElement().
3069
3070         (WebCore::SVGTitleElement::removedFrom):
3071         Call the new titleElementRemoved() instead of removeTitle().
3072
3073         (WebCore::SVGTitleElement::childrenChanged):
3074         Call the new titleElementTextChanged() instead of
3075         setTitleElement().
3076
3077 2015-09-13  Chris Dumez  <cdumez@apple.com>
3078
3079         document.lastModified should use the user's local time zone
3080         https://bugs.webkit.org/show_bug.cgi?id=149092
3081         <rdar://problem/22567705>
3082
3083         Reviewed by Ryosuke Niwa.
3084
3085         document.lastModified should use the user's local time zone:
3086         https://html.spec.whatwg.org/multipage/dom.html#dom-document-lastmodified
3087
3088         Chrome and Firefox comply with the specification but WebKit was using
3089         UTC. This patch aligns WebKit's behavior with the specification and
3090         other browsers.
3091
3092         No new tests, already covered by existing tests.
3093
3094         * dom/Document.cpp:
3095         (WebCore::Document::lastModified):
3096         (WebCore::Document::setCookieURL): Deleted.
3097
3098 2015-09-13  Chris Dumez  <cdumez@apple.com>
3099
3100         Node.baseURI should not return null for detached nodes
3101         https://bugs.webkit.org/show_bug.cgi?id=149104
3102         <rdar://problem/22559535>
3103
3104         Reviewed by Sam Weinig.
3105
3106         Node.baseURI should not return null for detached nodes. It should return
3107         the node document's base URL. The node document is set when the node is
3108         created so it is valid even if the node is detached [1]:
3109         https://dom.spec.whatwg.org/#dom-node-baseuri
3110
3111         WebKit was traversing the ancestors to find the base URL, which only
3112         works if the node is attached. Also, WebKit was taking into account
3113         the xml:base attribute when computing the baseURI.
3114
3115         Both Chrome and Firefox already dropped support for xml:base:
3116         https://code.google.com/p/chromium/issues/detail?id=341854
3117         https://bugzilla.mozilla.org/show_bug.cgi?id=903372
3118
3119         Firefox complies with the specification. Chrome's baseURI still only
3120         works for attached Nodes as their implementation still traverses the
3121         DOM tree, despite dropping support for xml:base.
3122
3123         This patch drops support xml:base when computing Node.baseURI, as
3124         Firefox, Chrome and the latest DOM specification do. It also makes
3125         Node.baseURI work for detached Nodes by returning the base URL of the
3126         node Document. This means we no longer have to traverse the Node's
3127         ancestors in the DOM tree. This is consistent with the behavior of
3128         Firefox and the latest DOM specification.
3129
3130         This patch does not drop the SVGElement.xmlbase attribute yet. However,
3131         we should probably consider making this change as well given that:
3132         - The SVG2 specification dropped it
3133         - Chrome dropped it.
3134         - It no longers impacts Node.baseURI
3135
3136         [1] https://www.w3.org/Bugs/Public/show_bug.cgi?id=20976
3137
3138         No new tests, already covered by existing test.
3139
3140         * dom/Document.cpp:
3141         (WebCore::Document::setContent): Deleted.
3142         * dom/Document.h:
3143         (WebCore::Document::inputCursor): Deleted.
3144         * dom/DocumentType.cpp:
3145         (WebCore::DocumentType::nodeName): Deleted.
3146         * dom/DocumentType.h:
3147         * dom/Element.cpp:
3148         (WebCore::Element::imageSourceURL): Deleted.
3149         (WebCore::Element::rendererIsNeeded): Deleted.
3150         (WebCore::Element::createElementRenderer): Deleted.
3151         (WebCore::Element::insertedInto): Deleted.
3152         * dom/Element.h:
3153         * dom/Node.cpp:
3154         (WebCore::Node::baseURI):
3155         * dom/Node.h:
3156         * svg/SVGElement.idl:
3157
3158 2015-09-13  Chris Dumez  <cdumez@apple.com>
3159
3160         CharacterData API parameters should not be optional
3161         https://bugs.webkit.org/show_bug.cgi?id=149101
3162         <rdar://problem/22546954>
3163
3164         Reviewed by Sam Weinig.
3165
3166         CharacterData API parameters should not be optional as per the DOM
3167         specification:
3168         https://dom.spec.whatwg.org/#characterdata
3169
3170         The parameters are also mandatory in Firefox and Chrome. However,
3171         those parameters are optional in WebKit. When DOMString parameters
3172         were omitted, we would use the "undefined" string instead. When
3173         unsigned long parameters were omitted, we would use 0 instead.
3174         This patch aligns our behavior with the specification and other
3175         major browsers.
3176
3177         No new tests, already covered by existing tests.
3178
3179         * dom/CharacterData.cpp:
3180         (WebCore::CharacterData::appendData):
3181         * dom/CharacterData.h:
3182         * dom/CharacterData.idl:
3183         * dom/Element.cpp:
3184         (WebCore::Element::mergeWithNextTextNode):
3185         * dom/Node.cpp:
3186         (WebCore::Node::normalize):
3187         * xml/parser/XMLDocumentParser.cpp:
3188         (WebCore::XMLDocumentParser::exitText):
3189
3190 2015-09-13  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3191
3192         Remove all uses of PassRefPtr in crypto, storage, and history
3193         https://bugs.webkit.org/show_bug.cgi?id=149091
3194
3195         Reviewed by Andreas Kling.
3196
3197         * crypto/CryptoKeyPair.cpp:
3198         (WebCore::CryptoKeyPair::CryptoKeyPair):
3199         * crypto/CryptoKeyPair.h:
3200         (WebCore::CryptoKeyPair::create):
3201         * crypto/SubtleCrypto.h:
3202         (WebCore::SubtleCrypto::create):
3203         * crypto/gnutls/CryptoKeyRSAGnuTLS.cpp:
3204         (WebCore::CryptoKeyRSA::create):
3205         * crypto/keys/CryptoKeyAES.cpp:
3206         (WebCore::CryptoKeyAES::generate):
3207         * crypto/keys/CryptoKeyAES.h:
3208         * crypto/keys/CryptoKeyHMAC.cpp:
3209         (WebCore::CryptoKeyHMAC::generate):
3210         * crypto/keys/CryptoKeyHMAC.h:
3211         * crypto/keys/CryptoKeyRSA.h:
3212         * crypto/mac/CryptoKeyRSAMac.cpp:
3213         (WebCore::CryptoKeyRSA::create):
3214         * history/BackForwardController.cpp:
3215         (WebCore::BackForwardController::BackForwardController):
3216         * history/BackForwardController.h:
3217         * history/HistoryItem.cpp:
3218         (WebCore::HistoryItem::setStateObject):
3219         (WebCore::HistoryItem::setFormData):
3220         * history/HistoryItem.h:
3221         (WebCore::HistoryItem::stateObject):
3222         * loader/EmptyClients.cpp:
3223         * page/Page.cpp:
3224         (WebCore::Page::Page):
3225         * storage/Storage.cpp:
3226         (WebCore::Storage::create):
3227         (WebCore::Storage::Storage):
3228         * storage/Storage.h:
3229         * storage/StorageArea.h:
3230         * storage/StorageMap.cpp:
3231         (WebCore::StorageMap::copy):
3232         (WebCore::StorageMap::setItem):
3233         (WebCore::StorageMap::setItemIgnoringQuota):
3234         (WebCore::StorageMap::removeItem):
3235         * storage/StorageMap.h:
3236         * storage/StorageNamespace.h:
3237
3238 2015-09-12  Chris Dumez  <cdumez@apple.com>
3239
3240         window.EventTarget should exist
3241         https://bugs.webkit.org/show_bug.cgi?id=149085
3242         <rdar://problem/22546774>
3243
3244         Reviewed by Sam Weinig.
3245
3246         Drop [NoInterfaceObject] for the EventTarget interface to match Chrome,
3247         Firefox and the specification:
3248         https://dom.spec.whatwg.org/#interface-eventtarget
3249
3250         No new tests, already covered by existing tests.
3251
3252         * dom/EventTarget.idl:
3253
3254 2015-09-12  Brian Burg  <bburg@apple.com>
3255
3256         Web Inspector: disambiguate inspected/frontend controllers and pages in backend code
3257         https://bugs.webkit.org/show_bug.cgi?id=149071
3258
3259         Reviewed by Joseph Pecoraro.
3260
3261         Be consistent about prefixing pages, inspector controllers, and window controllers
3262         with either "frontend" or "inspected", as appropriate. This change makes obvious some bugs
3263         in the frontend connection code, which are tracked by https://webkit.org/b/149006.
3264
3265         No new tests, no behavior change.
3266
3267         * WebCore.order:
3268         * inspector/InspectorClient.h:
3269         * inspector/InspectorController.cpp:
3270         (WebCore::InspectorController::inspectedPageDestroyed):
3271         (WebCore::InspectorController::show):
3272         (WebCore::InspectorController::close):
3273         * inspector/InspectorFrontendClientLocal.cpp:
3274         (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
3275         (WebCore::InspectorFrontendClientLocal::~InspectorFrontendClientLocal):
3276         (WebCore::InspectorFrontendClientLocal::canAttachWindow):
3277         (WebCore::InspectorFrontendClientLocal::changeAttachedWindowHeight):
3278         (WebCore::InspectorFrontendClientLocal::changeAttachedWindowWidth):
3279         (WebCore::InspectorFrontendClientLocal::openInNewTab):
3280         (WebCore::InspectorFrontendClientLocal::restoreAttachedWindowHeight):
3281         (WebCore::InspectorFrontendClientLocal::showMainResourceForFrame):
3282         (WebCore::InspectorFrontendClientLocal::isUnderTest):
3283         * inspector/InspectorFrontendClientLocal.h:
3284         * inspector/InspectorOverlay.cpp:
3285         (WebCore::InspectorOverlay::freePage):
3286         * loader/EmptyClients.h:
3287
3288 2015-09-12  Chris Dumez  <cdumez@apple.com>
3289
3290         ChildNode.replaceWith() without argument should replace the node with an empty DocumentFragment
3291         https://bugs.webkit.org/show_bug.cgi?id=149073
3292         <rdar://problem/22547801>
3293
3294         Reviewed by Ryosuke Niwa.
3295
3296         ChildNode.replaceWith() without argument should replace the node with 
3297         an empty DocumentFragment, as per the specification:
3298         https://dom.spec.whatwg.org/#dom-childnode-replacewith
3299         https://dom.spec.whatwg.org/#converting-nodes-into-a-node
3300
3301         Previously, WebKit did not do anything in this case. This patch fixes
3302         it.
3303
3304         No new tests, already covered by existing test.
3305
3306         * dom/Node.cpp:
3307         (WebCore::Node::replaceWith):
3308
3309 2015-09-12  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3310
3311         Remove all uses of PassRefPtr in WebCore/plugins
3312         https://bugs.webkit.org/show_bug.cgi?id=149055
3313
3314         Reviewed by Darin Adler.
3315
3316         * plugins/DOMMimeType.cpp:
3317         (WebCore::DOMMimeType::DOMMimeType):
3318         (WebCore::DOMMimeType::enabledPlugin):
3319         * plugins/DOMMimeType.h:
3320         (WebCore::DOMMimeType::create):
3321         * plugins/DOMMimeTypeArray.cpp:
3322         (WebCore::DOMMimeTypeArray::item):
3323         * plugins/DOMMimeTypeArray.h:
3324         * plugins/DOMPlugin.cpp:
3325         (WebCore::DOMPlugin::item):
3326         * plugins/DOMPlugin.h:
3327         * plugins/DOMPluginArray.cpp:
3328         (WebCore::DOMPluginArray::item):
3329         * plugins/DOMPluginArray.h:
3330         * plugins/PluginViewBase.h:
3331         (WebCore::PluginViewBase::bindingInstance):
3332
3333 2015-09-12  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3334
3335         Remove all uses of PassRefPtr in WebCore/accessibility and WebCore/fileapi
3336         https://bugs.webkit.org/show_bug.cgi?id=149059
3337
3338         Reviewed by Darin Adler.
3339
3340         * accessibility/AXObjectCache.cpp:
3341         * accessibility/AccessibilityObject.cpp:
3342         (WebCore::rangeClosestToRange):
3343         (WebCore::AccessibilityObject::rangeOfStringClosestToRangeInDirection):
3344         (WebCore::AccessibilityObject::selectionRange):
3345         (WebCore::AccessibilityObject::selectText):
3346         * accessibility/AccessibilityObject.h:
3347         * accessibility/ios/AXObjectCacheIOS.mm:
3348         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3349         (-[WebAccessibilityObjectWrapper _convertToDOMRange:]):
3350         (-[WebAccessibilityObjectWrapper textMarkerForPosition:]):
3351         * accessibility/mac/AXObjectCacheMac.mm:
3352         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3353         (-[WebAccessibilityObjectWrapper _textMarkerForIndex:]):
3354         * fileapi/FileList.h:
3355         (WebCore::FileList::append):
3356         * fileapi/WebKitBlobBuilder.cpp:
3357         (WebCore::BlobBuilder::append):
3358         * fileapi/WebKitBlobBuilder.h:
3359
3360 2015-09-11  Said Abou-Hallawa  <sabouhallawa@apple.com>
3361
3362         SVGColor custom text format is different from the CSS color custom text format
3363         https://bugs.webkit.org/show_bug.cgi?id=148879
3364
3365         Reviewed by Daniel Bates.
3366
3367         Implement the serialization of a CSS color value as it is described in
3368         <https://drafts.csswg.org/cssom/#serializing-css-values>. Add the new
3369         function Color::cssText() which is refactored from the existing function
3370         Color::serialized(). Use the new function for serializing the SVGColor
3371         always and also for Color but only when the alpha component is not 1.
3372
3373         Test: svg/css/computed-style-rgb-color.html
3374
3375         * css/CSSPrimitiveValue.cpp:
3376         (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText): Move the code
3377         for serializing the color from this function to Color::cssText().
3378         
3379         * platform/graphics/Color.cpp:
3380         (WebCore::Color::serialized): Call Color::cssText() if the alpha component
3381         is not 1 and delete the repeated code. 
3382         
3383         (WebCore::Color::cssText):
3384         * platform/graphics/Color.h: Add the new function to the header file.
3385         
3386         * svg/SVGColor.cpp:
3387         (WebCore::SVGColor::customCSSText): Call Color::cssText() always instead
3388         of calling Color::serialized() for serializing the SVGColor.
3389
3390 2015-09-11  Nan Wang  <n_wang@apple.com>
3391
3392         AX: ARIA 1.1 @aria-current
3393         https://bugs.webkit.org/show_bug.cgi?id=146012
3394
3395         Reviewed by Chris Fleizach.
3396
3397         Tests: accessibility/aria-current.html
3398                inspector/dom/getAccessibilityPropertiesForNode_ariaCurrent.html
3399