[Win] Implement CryptoDigest
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-03-09  Daniel Bates  <dabates@apple.com>
2
3         [Win] Implement CryptoDigest
4         https://bugs.webkit.org/show_bug.cgi?id=155247
5         <rdar://problem/25065843>
6
7         Reviewed by Brent Fulgham.
8
9         Implement the CryptoDigest abstraction for Windows so that we can compute cryptographically
10         secure hashes. This will allow us to support Content Security Policy inline script and inline
11         stylesheet hashes on Windows.
12
13         * PlatformWin.cmake: Add file CryptoDigestWin.cpp.
14         * PlatformWinCairo.cmake: Ditto.
15         * platform/crypto/win/CryptoDigestWin.cpp: Added.
16         (WebCore::CryptoDigest::CryptoDigest): Instantiate a CryptoDigestContext object.
17         (WebCore::CryptoDigest::~CryptoDigest): Destroy the cryptographic service provider and hash
18         object if non-null.
19         (WebCore::CryptoDigest::create): Acquire a handle to a cryptographic service provider (HCRYPTPROV)
20         and a handle to a hash object (HCRYPTHASH).
21         (WebCore::CryptoDigest::addBytes): Add the contents of the specified buffer to the hash object.
22         (WebCore::CryptoDigest::computeHash): Compute and return a Vector of bytes that represent the digest.
23
24 2016-03-09  David Kilzer  <ddkilzer@apple.com>
25
26         REGRESSION (r197149): Missing availability checks when soft-linking DataDetectors.framework
27         <http://webkit.org/b/155258>
28
29         Reviewed by Andy Estes.
30
31         * page/mac/ServicesOverlayController.mm:
32         (WebCore::ServicesOverlayController::Highlight::setDDHighlight):
33         (WebCore::ServicesOverlayController::Highlight::paintContents):
34         (WebCore::ServicesOverlayController::mouseIsOverHighlight):
35         - Add check that returns early if DataDetectors.framework is not
36           available.
37
38         * platform/spi/mac/DataDetectorsSPI.h:
39         - Mark Objective-C classses as optional.
40
41 2016-03-09  Jer Noble  <jer.noble@apple.com>
42
43         Add heuristic for "main content" videos which override user gesture requirements
44         https://bugs.webkit.org/show_bug.cgi?id=155224
45
46         Reviewed by Eric Carlson.
47
48         Tests: media/video-main-content-allow-then-deny.html
49                media/video-main-content-allow.html
50                media/video-main-content-deny-display-none.html
51                media/video-main-content-deny-not-in-dom.html
52                media/video-main-content-deny-not-visible.html
53                media/video-main-content-deny-obscured.html
54                media/video-main-content-deny-too-small.html
55
56         Add a new behavior "restriction" to MediaElementSession that allows media elements
57         to optionally overriding their own user gesture requirements if the session determines
58         that the media element is the page's "main content".
59
60         * html/HTMLMediaElement.cpp:
61         (WebCore::HTMLMediaElement::didAttachRenderers):
62         (WebCore::HTMLMediaElement::updateShouldPlay):
63         * html/HTMLMediaElement.h:
64         * html/MediaElementSession.cpp:
65         (WebCore::restrictionName):
66         (WebCore::MediaElementSession::MediaElementSession):
67         (WebCore::MediaElementSession::addBehaviorRestriction):
68         (WebCore::MediaElementSession::playbackPermitted):
69         (WebCore::MediaElementSession::dataLoadingPermitted):
70         (WebCore::isMainContent):
71         (WebCore::MediaElementSession::mainContentCheckTimerFired):
72         (WebCore::MediaElementSession::updateIsMainContent):
73         * html/MediaElementSession.h:
74         * testing/Internals.cpp:
75         (WebCore::Internals::setMediaElementRestrictions):
76
77 2016-03-09  Konstantin Tokarev  <annulen@yandex.ru>
78
79         Added missing #if(SOUP) after r197591.
80         https://bugs.webkit.org/show_bug.cgi?id=155259
81
82         Reviewed by Alex Christensen.
83
84         No new tests needed.
85
86         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
87
88 2016-03-09  Ada Chan  <adachan@apple.com>
89
90         Add a getter for WebVideoFullscreenInterfaceObjC and update its rate property
91         https://bugs.webkit.org/show_bug.cgi?id=155239
92
93         Reviewed by Eric Carlson.
94
95         * platform/mac/WebVideoFullscreenInterfaceMac.h:
96         Move the stub implementation of setVideoDimensions() to the mm file.
97         Declare a getter to WebVideoFullscreenInterfaceMacObjC.
98         * platform/mac/WebVideoFullscreenInterfaceMac.mm:
99         (WebCore::WebVideoFullscreenInterfaceMac::setRate):
100         Also update the rate property of WebVideoFullscreenInterfaceMacObjC.
101         (WebCore::WebVideoFullscreenInterfaceMac::setVideoDimensions):
102         Stub implementation of setVideoDimensions() has been moved to here.
103
104 2016-03-09  Alex Christensen  <achristensen@webkit.org>
105
106         Fix Mac build without video enabled after r197633.
107
108         * bindings/objc/DOM.mm:
109
110 2016-03-09  Ryosuke Niwa  <rniwa@webkit.org>
111
112         Rename Node.treeRoot to rootNode and turn it on by default
113         https://bugs.webkit.org/show_bug.cgi?id=155226
114
115         Reviewed by Antonio Gomes.
116
117         Node.prototype.treeRoot has been merged into DOM spec from Shadow DOM spec and renamed to rootNode:
118         https://dom.spec.whatwg.org/#dom-node-rootnode
119
120         Rename the method and expose it unconditionally on Node.prototype.
121
122         Tests: fast/dom/Node/rootNode.html
123                fast/shadow-dom/Node-interface-rootNode.html
124
125         * dom/ContainerNode.h:
126         (WebCore::Node::highestAncestor): Deleted. There is no need for this function to be inlined.
127         * dom/Document.h: Now that both TreeScope and Node defines rootNode, we need to pick either.
128         Here, we pick TreeScope's definition since Document is by definition always in a document so there is
129         no need to even check inTreeScope().
130         * dom/Node.cpp:
131         (WebCore::Node::rootNode): Moved here. Also added a fast path for when "this" node is in a document
132         or a shadow root since TreeScope stores its root node as a member variable (m_rootNode).
133         * dom/Node.h:
134         * dom/Node.idl: Renamed the method and removed Conditional=SHADOW_DOM.
135         * dom/ShadowRoot.h: Similar to the change in Document.h. See above.
136         * editing/Editor.cpp:
137         (WebCore::correctSpellcheckingPreservingTextCheckingParagraph): Use rootNode instead of free function
138         defined in htmlediting.cpp, which was removed in this patch.
139         * editing/htmlediting.cpp:
140         (WebCore::highestAncestor): Deleted.
141         * editing/htmlediting.h:
142         * html/FormAssociatedElement.cpp:
143         (WebCore::computeRootNode): Added.
144         (WebCore::FormAssociatedElement::removedFrom): We can't use Node::rootNode here because this function
145         is called in the middle of removing a subtree, and some associated form element's inDocument flag may
146         not have been updated yet. So use computeRootNode to manually find the highest ancestor.
147         (WebCore::FormAssociatedElement::formRemovedFromTree): Ditto.
148         * xml/XPathPath.cpp:
149         (WebCore::XPath::LocationPath::evaluate):
150
151 2016-03-09  Konstantin Tokarev  <annulen@yandex.ru>
152
153         [cmake] Fixed All-in-One build.
154         https://bugs.webkit.org/show_bug.cgi?id=155241
155
156         Reviewed by Csaba Osztrogonác.
157
158         No new tests needed.
159
160         * bindings/js/JSBindingsAllInOne.cpp: Should not include generated
161         file.
162
163 2016-03-09  Chris Dumez  <cdumez@apple.com>
164
165         Unreviewed, rebaseline bindings tests after r197874.
166
167         * bindings/scripts/test/JS/JSattribute.cpp:
168         (WebCore::JSattribute::getOwnPropertySlot):
169         * bindings/scripts/test/JS/JSattribute.h:
170
171 2016-03-09  Chris Dumez  <cdumez@apple.com>
172
173         focus() / blur() should be on HTMLElement / SVGElement, not Element
174         https://bugs.webkit.org/show_bug.cgi?id=155216
175
176         Reviewed by Darin Adler.
177
178         focus() / blur() should be on HTMLElement / SVGElement, not Element:
179         - https://html.spec.whatwg.org/multipage/dom.html#htmlelement
180         - https://www.w3.org/TR/SVG2/types.html#InterfaceSVGElement
181
182         Chrome and Firefox match the specification.
183
184         Note that after this change, focus() / blur() is no longer exposed
185         on MathMLElement. This matches the MathML specification and is
186         consistent with Firefox and Chrome.
187
188         * dom/Element.idl:
189         * html/HTMLElement.idl:
190         * svg/SVGElement.idl:
191
192 2016-03-09  Chris Dumez  <cdumez@apple.com>
193
194         Move attributes to the instance for most interfaces that have "Error" in their name
195         https://bugs.webkit.org/show_bug.cgi?id=155231
196
197         Reviewed by Darin Adler.
198
199         Our bindings generator was keeping attributes on the instances for
200         interfaces having "Error" or "Exception" in their name. The reason is
201         that interfaces that have "Error" in their prototype would not behave
202         correctly otherwise because "Error" incorrectly has its attributes on
203         the instance at the moment. However, in our bindings generator, the
204         condition to decide if an interface's prototype should be "Error" is
205         if $interface->isException. Therefore, we should use the same condition
206         to decide if we should keep attributes on the instance until "Error"
207         is updated to have its attributes on the prototype. Doing this for any
208         interface having "Error" or "Exception" in their name is overkill.
209
210         No new tests, already covered by existing test.
211
212         * bindings/scripts/CodeGeneratorJS.pm:
213         (InterfaceRequiresAttributesOnInstance):
214
215 2016-03-09  Daniel Bates  <dabates@apple.com>
216
217         Rename WebCore/platform/crypto/mac/CryptoDigestMac.cpp to WebCore/platform/crypto/commoncrypto/CryptoDigestCommonCrypto.cpp
218         https://bugs.webkit.org/show_bug.cgi?id=155244
219
220         Reviewed by Alexey Proskuryakov.
221
222         The file WebCore/platform/crypto/mac/CryptoDigestMac.cpp is applicable to both iOS and OS X.
223         We should move and rename this file to reflect that is applicable to both of these platforms.
224
225         * PlatformMac.cmake:
226         * WebCore.xcodeproj/project.pbxproj:
227         * platform/crypto/commoncrypto/CryptoDigestCommonCrypto.cpp: Renamed from Source/WebCore/platform/crypto/mac/CryptoDigestMac.cpp.
228
229 2016-03-09  Tim Horton  <timothy_horton@apple.com>
230
231         Removing and re-adding a script message handler with the same name results in an unusable message handler
232         https://bugs.webkit.org/show_bug.cgi?id=155223
233
234         Reviewed by Sam Weinig.
235         Patch by Geoff Garen and myself.
236
237         New API test: WKUserContentController.ScriptMessageHandlerReplaceWithSameName.
238
239         * page/UserMessageHandler.h:
240         (WebCore::UserMessageHandler::descriptor):
241         * page/UserMessageHandlersNamespace.cpp:
242         (WebCore::UserMessageHandlersNamespace::handler):
243         This lazy removal mechanism combined with the fact that we only compare
244         handler name and world makes it such that m_messageHandlers could have
245         a stale UserMessageHandler with a UserMessageHandlerDescriptor that differed
246         only in client.
247
248         It is safe to compare the descriptors by pointer instead because m_messageHandler
249         holds a strong reference to its UserMessageHandlerDescriptors, and this will ensure
250         that the add-remove-add path (with identical name and world) causes a new
251         UserContentController to be created.
252
253         We also now clean up any stale UserMessageHandlers whenever we're about to
254         add a new one, by removing any which the UserContentController no longer knows about.
255
256 2016-03-09  Chris Dumez  <cdumez@apple.com>
257
258         Align HTMLKeygenElement.keytype with the specification
259         https://bugs.webkit.org/show_bug.cgi?id=155214
260
261         Reviewed by Darin Adler.
262
263         Align HTMLKeygenElement.keytype with the specification:
264         - https://html.spec.whatwg.org/#dom-keygen-keytype
265         - https://html.spec.whatwg.org/#attr-keygen-keytype
266
267         In particular, the following changes were made:
268         1. Return "rsa" by default (i.e. when the corresponding content attribute is missing)
269         2. Only return known values
270
271         Test: fast/dom/HTMLKeygenElement/keygen-keytype.html
272
273         * html/HTMLKeygenElement.cpp:
274         (WebCore::HTMLKeygenElement::setKeytype):
275         (WebCore::HTMLKeygenElement::keytype):
276         (WebCore::HTMLKeygenElement::appendFormData):
277         * html/HTMLKeygenElement.h:
278         * html/HTMLKeygenElement.idl:
279
280 2016-03-09  Philippe Normand  <pnormand@igalia.com>
281
282         [GStreamer] Fix MediaPlayerPrivate conflicts
283         https://bugs.webkit.org/show_bug.cgi?id=155236
284
285         Reviewed by Martin Robinson.
286
287         In some cases the mediastream player would be used to play
288         non-mediastream videos or MSE streams. The OWR player should be
289         used only for mediastreams and the MediaPlayerPrivateGStreamer
290         player should be used only for normal <video> elements and
291         MediaSource support.
292
293         This patch intends to fix the massive tests timeouts currently
294         happening on the GTK bots after r197752.
295
296         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
297         (WebCore::MediaPlayerPrivateGStreamer::supportsType): Bail out if
298         the type checked represents a mediastream.
299         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
300         Prevent signal disconnection on possible NULL GObjects.
301         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
302         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:
303         (WebCore::MediaPlayerPrivateGStreamerOwr::MediaPlayerPrivateGStreamerOwr):
304         Simplify constructor to the bare minimum.
305         (WebCore::MediaPlayerPrivateGStreamerOwr::load): Create sinks only
306         if needed from the load method.
307         (WebCore::MediaPlayerPrivateGStreamerOwr::getSupportedTypes):
308         Initialize the type cache to an empty static hashset.
309         (WebCore::MediaPlayerPrivateGStreamerOwr::supportsType): This
310         player does support mediastreams and nothing else.
311         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.h:
312
313 2016-03-08  Brent Fulgham  <bfulgham@apple.com>
314
315         Local HTML should be blocked from localStorage access unless "Disable Local File Restrictions" is checked..
316         https://bugs.webkit.org/show_bug.cgi?id=155185
317         <rdar://problem/11101440>
318
319         Reviewed by Zalan Bujtas.
320
321         Tested by storage/domstorage/localstorage/blocked-file-access.html.
322
323         * page/SecurityOrigin.cpp:
324         (WebCore::SecurityOrigin::canAccessStorage): If the origin is a local file, and we have not been granted
325         universal file access, prevent access to DOM localStorage.
326
327 2016-03-09  Manuel Rego Casasnovas  <rego@igalia.com>
328
329         [css-grid] Allow to place positioned grid items on the padding
330         https://bugs.webkit.org/show_bug.cgi?id=155199
331
332         Reviewed by Sergio Villar Senin.
333
334         According to the following discussion on the CSS WG mailing list,
335         we should be able to place positioned grid items on the padding directly:
336         https://lists.w3.org/Archives/Public/www-style/2015Nov/0070.html
337
338         This means that a positioned grid item can be placed on the padding itself.
339         The "auto" value resolves to the padding edges (0th and -0th lines).
340         So if a positioned item is placed with: grid-column: auto / 1;
341         it'd be placed on the padding, from line 0th to 1st line.
342
343         On top of that, we've to detect properly the first and last explicit
344         grid lines during the layout of positioned grid items.
345         We have to consider that the grid can have implicit tracks created
346         previously by regular grid items.
347
348         Tests: fast/css-grid-layout/grid-positioned-items-padding.html
349                fast/css-grid-layout/grid-positioned-items-within-grid-implicit-track.html
350
351         * rendering/RenderGrid.cpp:
352         (WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
353
354 2016-03-09  Andreas Kling  <akling@apple.com>
355
356         ImageDocuments leak their world.
357         <https://webkit.org/b/155167>
358         <rdar://problem/24987363>
359
360         Reviewed by Antti Koivisto.
361
362         ImageDocument uses a special code path in ImageLoader in order to manually
363         control how the image is loaded. It has to do this because the ImageDocument
364         is really just a synthetic wrapper around a main resource that's an image.
365
366         This custom loading code had a bug where it would create a new CachedImage
367         and neglect to set its CachedResource::m_state flag to Pending (which is
368         normally set by CachedResource::load(), but we don't call that for these.)
369
370         This meant that when ImageDocument called CachedImage::finishLoading() to
371         trigger the notifyFinished() callback path, the image would look at its
372         loading state and see that it was Unknown (not Pending), and conclude that
373         it hadn't loaded yet. So we never got the notifyFinished() signal.
374
375         The world leaks here because ImageLoader slaps a ref on its <img> element
376         while it waits for the loading operation to complete. Once finished, whether
377         successfully or with an error, it derefs the <img>.
378
379         Since we never fired notifyFinished(), we ended up with an extra ref on
380         these <img> forever, and then the element kept its document alive too.
381
382         Test: fast/dom/ImageDocument-world-leak.html
383
384         * loader/ImageLoader.cpp:
385         (WebCore::ImageLoader::updateFromElement):
386
387 2016-03-08  Sergio Villar Senin  <svillar@igalia.com>
388
389         [css-grid] Fix auto-track sizing with min-size:auto and specific sizes
390         https://bugs.webkit.org/show_bug.cgi?id=155165
391
392         Reviewed by Darin Adler.
393
394         Specs recently changed the way auto tracks are sized. In the
395         previous versions, when sizing auto minimums, only the
396         min-width|height of the items spanning through the auto tracks
397         were used to size them. The new text specifies that for items
398         with a specified minimum size of auto, the behavior is
399         equivalent to a min-content minimum.
400
401         This means that from now on, auto tracks with min-size:auto
402         will no longer be smaller than min-content tracks (which was
403         pretty weird from the user POV).
404
405         * rendering/RenderGrid.cpp:
406         (WebCore::RenderGrid::minSizeForChild): use grid items
407         min-content contributions whenever the specified size is not
408         auto or when min-size is auto.
409
410 2016-03-09  Manuel Rego Casasnovas  <rego@igalia.com>
411
412         [css-grid] Initial support for implicit grid before explicit grid
413         https://bugs.webkit.org/show_bug.cgi?id=155014
414
415         Reviewed by Darin Adler.
416
417         Change GridSpan to store int instead of unsigned. This allows us to
418         resolve positions before the explicit grid with negative values.
419
420         This patch adds a new type of GridSpan called "Untranslated".
421         This type is only used in populateExplicitGridAndOrderIterator().
422         Where we store the smallest negative position in both axis.
423
424         Then the GridSpans are translated into positive values, using the offset
425         calculated before. This is done in placeItemsOnGrid() and from that
426         moment the rest of the code uses "Definite" GridSpans, which returns
427         only positive positions (unsigned instead of int).
428         This allows us to don't have to modify the rest of the code, as it keeps
429         using GridSpans as before.
430
431         Let's use an example to explain how it works. Imagine that we've a 2
432         columns grid and 2 items placed like:
433         * Item A: grid-column: -5;
434         * Item B: grid-column: 1;
435
436         Initially we'll use "Unstranslated" GridSpans with the following values:
437         * Item A: GridSpan(-2, -1)
438         * Item B: GridSpan(0, 1)
439
440         Then we'll translate them using the smallest position as offset (-2)
441         so we've "Definite" GridSpans:
442         * Item A: GridSpan(0, 1)
443         * Item B: GridSpan(2, 3)
444
445         Test: fast/css-grid-layout/implicit-tracks-before-explicit.html
446
447         * css/CSSParser.cpp:
448         (WebCore::CSSParser::parseGridTemplateAreasRow):
449         * rendering/RenderGrid.cpp:
450         (WebCore::RenderGrid::GridIterator::nextEmptyGridArea):
451         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
452         (WebCore::RenderGrid::gridTrackSize):
453         (WebCore::RenderGrid::insertItemIntoGrid):
454         (WebCore::RenderGrid::placeItemsOnGrid):
455         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
456         (WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid):
457         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
458         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
459         (WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
460         (WebCore::RenderGrid::placeAutoMajorAxisItemsOnGrid): Deleted.
461         (WebCore::RenderGrid::layoutPositionedObject): Deleted.
462         * rendering/RenderGrid.h:
463         * rendering/style/GridCoordinate.h:
464         (WebCore::GridSpan::untranslatedDefiniteGridSpan):
465         (WebCore::GridSpan::translatedDefiniteGridSpan):
466         (WebCore::GridSpan::integerSpan):
467         (WebCore::GridSpan::untranslatedResolvedInitialPosition):
468         (WebCore::GridSpan::untranslatedResolvedFinalPosition):
469         (WebCore::GridSpan::resolvedInitialPosition):
470         (WebCore::GridSpan::resolvedFinalPosition):
471         (WebCore::GridSpan::begin):
472         (WebCore::GridSpan::end):
473         (WebCore::GridSpan::isTranslatedDefinite):
474         (WebCore::GridSpan::isIndefinite):
475         (WebCore::GridSpan::translate):
476         (WebCore::GridSpan::GridSpan):
477         (WebCore::GridSpan::operator==): Deleted.
478         (WebCore::GridSpan::GridSpanIterator::GridSpanIterator): Deleted.
479         (WebCore::GridSpan::GridSpanIterator::operator unsigned&): Deleted.
480         * rendering/style/GridResolvedPosition.cpp:
481         (WebCore::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition):
482         (WebCore::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):
483         (WebCore::resolveNamedGridLinePositionAgainstOppositePosition):
484         (WebCore::resolveGridPositionAgainstOppositePosition):
485         (WebCore::resolveGridPositionFromStyle):
486         (WebCore::GridResolvedPosition::resolveGridPositionsFromStyle):
487         (WebCore::GridResolvedPosition::spanSizeForAutoPlacedItem): Deleted.
488
489 2016-03-09  Myles C. Maxfield  <mmaxfield@apple.com>
490
491         [iOS] Arabic text on Wikipedia is shown as boxes
492         https://bugs.webkit.org/show_bug.cgi?id=155129
493         <rdar://problem/24919902>
494
495         Reviewed by Darin Adler.
496
497         GeezaPro is the PostScript name, not the family name.
498
499         Test: fast/text/arabic-blacklisted.html
500
501         * platform/graphics/ios/FontCacheIOS.mm:
502         (WebCore::platformLookupFallbackFont):
503
504 2016-03-08  Commit Queue  <commit-queue@webkit.org>
505
506         Unreviewed, rolling out r197825.
507         https://bugs.webkit.org/show_bug.cgi?id=155222
508
509         It broke the EFL build. It is not dead code. (Requested by
510         gyuyoung on #webkit).
511
512         Reverted changeset:
513
514         "Delete dead scrolling code"
515         https://bugs.webkit.org/show_bug.cgi?id=155210
516         http://trac.webkit.org/changeset/197825
517
518 2016-03-08  Chris Dumez  <cdumez@apple.com>
519
520         Element with maximum tabIndex cannot be returned by nextElementWithGreaterTabIndex()
521         https://bugs.webkit.org/show_bug.cgi?id=155215
522
523         Reviewed by Ryosuke Niwa.
524
525         Element with maximum tabIndex cannot be returned by nextElementWithGreaterTabIndex()
526         due to a bug in r197726. This patch fixes the issue by only comparing
527         candidate.tabIndex to winningTabIndex if winner is non-null.
528
529         Test: fast/events/max-tabindex-focus.html
530
531         * page/FocusController.cpp:
532         (WebCore::nextElementWithGreaterTabIndex):
533
534 2016-03-08  Sam Weinig  <sam@webkit.org>
535
536         Stop using the UserContentController for injecting the override style sheet from CaptionUserPreferences
537         https://bugs.webkit.org/show_bug.cgi?id=155211
538
539         Reviewed by Dan Bernstein.
540
541         The UserContentController is going to become read only from WebCore's perspective. The CaptionUserPreferences
542         was relying on being able to set a UserStyleSheet on it, but this was really unnecessary complexity. Simplify
543         things by storing the style sheet's source directly on the Page and teaching ExtensionStyleSheets about it
544         explicitly.
545
546         * dom/ExtensionStyleSheets.cpp:
547         (WebCore::ExtensionStyleSheets::updateInjectedStyleSheetCache):
548         If there is a captionUserPreferencesStyleSheet on the page, inject it.
549
550         * page/CaptionUserPreferences.cpp:
551         (WebCore::CaptionUserPreferences::updateCaptionStyleSheetOveride):
552         Greatly simplify the code. Now, all this does is set the style sheet on each page.
553
554         * page/Page.cpp:
555         (WebCore::Page::invalidateInjectedStyleSheetCacheInAllFrames):
556         Extract this out from UserContentController.
557
558         (WebCore::Page::setUserContentController):
559         Call the newly extracted invalidateInjectedStyleSheetCacheInAllFrames().
560
561         (WebCore::Page::captionUserPreferencesStyleSheet):
562         (WebCore::Page::setCaptionUserPreferencesStyleSheet):
563         Add getter/setter. When setting, invalidate the style sheet cache.
564
565         * page/Page.h:
566         Add new members and functions.
567
568         * page/UserContentController.cpp:
569         (WebCore::UserContentController::addUserStyleSheet):
570         (WebCore::UserContentController::removeUserStyleSheet):
571         (WebCore::UserContentController::removeUserStyleSheets):
572         (WebCore::UserContentController::removeAllUserContent):
573         Switch to calling invalidateInjectedStyleSheetCacheInAllFramesInAllPages().
574
575         (WebCore::UserContentController::invalidateInjectedStyleSheetCacheInAllFramesInAllPages):
576         Rename and implement in terms of Page::invalidateInjectedStyleSheetCacheInAllFrames().
577
578         * page/UserContentController.h:
579         Rename function.
580
581 2016-03-08  Joseph Pecoraro  <pecoraro@apple.com>
582
583         Web Inspector: Memory Timeline should show MemoryPressure events
584         https://bugs.webkit.org/show_bug.cgi?id=155158
585         <rdar://problem/25026610>
586
587         Reviewed by Brian Burg.
588
589         * platform/MemoryPressureHandler.cpp:
590         (WebCore::MemoryPressureHandler::releaseMemory):
591         When responding to memory pressure, notify page inspectors.
592
593         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
594         Remove unused includes.
595
596         * inspector/InspectorInstrumentation.cpp:
597         (WebCore::InspectorInstrumentation::didHandleMemoryPressureImpl):
598         * inspector/InspectorInstrumentation.h:
599         (WebCore::InspectorInstrumentation::playbackStarted):
600         (WebCore::InspectorInstrumentation::playbackPaused):
601         (WebCore::InspectorInstrumentation::playbackFinished):
602         (WebCore::InspectorInstrumentation::playbackHitPosition):
603         (WebCore::InspectorInstrumentation::didHandleMemoryPressure):
604         * inspector/InspectorMemoryAgent.cpp:
605         (WebCore::InspectorMemoryAgent::didCreateFrontendAndBackend):
606         (WebCore::InspectorMemoryAgent::willDestroyFrontendAndBackend):
607         (WebCore::InspectorMemoryAgent::enable):
608         (WebCore::InspectorMemoryAgent::disable):
609         (WebCore::InspectorMemoryAgent::didHandleMemoryPressure):
610         * inspector/InspectorMemoryAgent.h:
611         * inspector/InstrumentingAgents.cpp:
612         (WebCore::InstrumentingAgents::reset):
613         * inspector/InstrumentingAgents.h:
614         (WebCore::InstrumentingAgents::inspectorMemoryAgent):
615         (WebCore::InstrumentingAgents::setInspectorMemoryAgent):
616         Plumbing to notify the right active inspector.
617
618 2016-03-08  Myles C. Maxfield  <mmaxfield@apple.com>
619
620         Delete dead scrolling code
621         https://bugs.webkit.org/show_bug.cgi?id=155210
622
623         Reviewed by Simon Fraser.
624
625         No new tests because there is no behavior change.
626
627         * page/FrameView.cpp:
628         (WebCore::FrameView::layerForScrolling): Deleted.
629         * page/FrameView.h:
630         * page/scrolling/ScrollingCoordinator.cpp:
631         (WebCore::ScrollingCoordinator::scrollLayerForScrollableArea): Deleted.
632         * page/scrolling/ScrollingCoordinator.h:
633         * platform/ScrollableArea.h:
634         (WebCore::ScrollableArea::horizontalScrollbar):
635         (WebCore::ScrollableArea::verticalScrollbar):
636         (WebCore::ScrollableArea::tiledBacking):
637         (WebCore::ScrollableArea::layerForHorizontalScrollbar):
638         (WebCore::ScrollableArea::layerForVerticalScrollbar):
639         (WebCore::ScrollableArea::layerForScrollCorner):
640         (WebCore::ScrollableArea::layerForOverhangAreas):
641         (WebCore::ScrollableArea::layerForScrolling): Deleted.
642         * rendering/RenderLayer.cpp:
643         (WebCore::RenderLayer::calculateClipRects): Deleted.
644         * rendering/RenderLayer.h:
645
646 2016-03-08  Oliver Hunt  <oliver@apple.com>
647
648         Start moving to separated writable and executable mappings in the JIT
649         https://bugs.webkit.org/show_bug.cgi?id=155178
650
651         Reviewed by Fil Pizlo.
652
653         Update feature defines.
654
655         * Configurations/FeatureDefines.xcconfig:
656
657 2016-03-08  Myles C. Maxfield  <mmaxfield@apple.com>
658
659         Font size computed style is innaccurate
660         https://bugs.webkit.org/show_bug.cgi?id=154705
661         <rdar://problem/23474068>
662
663         Reviewed by Timothy Hatcher.
664
665         Safari rounds the font size value reported to getComputedStyle(). Neither Firefox
666         nor Chrome do this.
667
668         Covered by existing tests.
669
670         * css/CSSComputedStyleDeclaration.cpp:
671         (WebCore::ComputedStyleExtractor::getFontSizeCSSValuePreferringKeyword):
672         (WebCore::fontSizeFromStyle):
673
674 2016-03-08  Ada Chan  <adachan@apple.com>
675
676         Enable API related to the video fullscreen layer in MediaPlayerPrivateMediaStreamAVFObjC for Mac.
677         https://bugs.webkit.org/show_bug.cgi?id=153239
678
679         Reviewed by Eric Carlson.
680
681         Reuse VideoFullscreenLayerManager to manage moving the video layer between the fullscreen
682         layer and the inline layer depending on the current presentation mode.
683
684         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
685         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
686         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC):
687         Create m_videoFullscreenLayerManager.
688         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformLayer):
689         Return the video inline layer from the VideoFullscreenLayerManager.
690         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createPreviewLayers):
691         Call VideoFullscreenLayerManager::setVideoLayer() with the m_videoBackgroundLayer. To make sure
692         the preview layer (a sublayer of m_videoBackgroundLayer) resize according to aspect ratio, set
693         its contents gravity to kCAGravityResizeAspect. Also, set its autoresizing mask so it'll resize
694         with its superlayer.
695         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVideoFullscreenLayer):
696         Call VideoFullscreenLayerManager::setVideoFullscreenLayer().
697         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVideoFullscreenFrame):
698         Call VideoFullscreenLayerManager::setVideoFullscreenFrame().
699
700 2016-03-08  Myles C. Maxfield  <mmaxfield@apple.com>
701
702         [Font Loading] Crash when a single load request causes multiple fonts to fail loading
703         https://bugs.webkit.org/show_bug.cgi?id=155009
704
705         Reviewed by Simon Fraser.
706
707         In JavaScript, the first promise fulfillment/failure wins. However, in C++, any
708         subsequent fulfillments/failures cause a crash.
709
710         Test: fast/text/font-face-set-document-multiple-failure.html
711
712         * css/CSSFontFace.cpp:
713         (WebCore::iterateClients): Notifying a client may cause some other client
714         to be destroyed, thereby modifying the clients set. This function allows
715         for notifying clients in a resilient manner.
716         (WebCore::CSSFontFace::setStyle): Update to use iterateClients().
717         (WebCore::CSSFontFace::setWeight): Ditto.
718         (WebCore::CSSFontFace::setUnicodeRange): Ditto.
719         (WebCore::CSSFontFace::setVariantLigatures): Ditto.
720         (WebCore::CSSFontFace::setVariantPosition): Ditto.
721         (WebCore::CSSFontFace::setVariantCaps): Ditto.
722         (WebCore::CSSFontFace::setVariantNumeric): Ditto.
723         (WebCore::CSSFontFace::setVariantAlternates): Ditto.
724         (WebCore::CSSFontFace::setVariantEastAsian): Ditto.
725         (WebCore::CSSFontFace::setFeatureSettings): Ditto.
726         (WebCore::CSSFontFace::setStatus): Ditto.
727         (WebCore::CSSFontFace::notifyClientsOfFontPropertyChange): Deleted.
728         * css/CSSFontFace.h: Adding a way for clients to make sure they don't register
729         or deregister another client.
730         * css/CSSFontFaceSet.cpp:
731         (WebCore::CSSFontFaceSet::guardAgainstClientRegistrationChanges): Simple
732         ref()/deref() pair.
733         (WebCore::CSSFontFaceSet::stopGuardingAgainstClientRegistrationChanges):
734         * css/CSSFontFaceSet.h:
735         * css/FontFace.cpp: Ditto.
736         (WebCore::FontFace::guardAgainstClientRegistrationChanges):
737         (WebCore::FontFace::stopGuardingAgainstClientRegistrationChanges):
738         * css/FontFace.h:
739         * css/FontFaceSet.cpp:
740         (WebCore::FontFaceSet::faceFinished): Make sure that we only fulfil or reject
741         a promise once.
742         * css/FontFaceSet.h:
743         * dom/Document.cpp:
744         (WebCore::Document::fonts): The CSSFontFaces inside the CSSFontSelector get
745         created during style recalc. We may be in a state where there is a style
746         recalc pending. In order to make sure the Javascript API sees the current
747         state of the world, force a style recalc here (but only if one is pending).
748
749 2016-03-08  Commit Queue  <commit-queue@webkit.org>
750
751         Unreviewed, rolling out r197793 and r197799.
752         https://bugs.webkit.org/show_bug.cgi?id=155195
753
754         something weird happened while landing this and everything
755         broke (Requested by olliej on #webkit).
756
757         Reverted changesets:
758
759         "Start moving to separated writable and executable mappings in
760         the JIT"
761         https://bugs.webkit.org/show_bug.cgi?id=155178
762         http://trac.webkit.org/changeset/197793
763
764         "arm64 build fix after r197793."
765         http://trac.webkit.org/changeset/197799
766
767 2016-03-08  Mark Lam  <mark.lam@apple.com>
768
769         synthesizePrototype() and friends need to be followed by exception checks (or equivalent).
770         https://bugs.webkit.org/show_bug.cgi?id=155169
771
772         Reviewed by Geoffrey Garen.
773
774         No new tests because this issue is covered by existing tests when the fix for
775         https://bugs.webkit.org/show_bug.cgi?id=154865 lands.  That patch is waiting for
776         this patch to land first so as to not introduce test failures.
777
778         * Modules/plugins/QuickTimePluginReplacement.mm:
779         (WebCore::QuickTimePluginReplacement::installReplacement):
780         * bindings/js/JSDeviceMotionEventCustom.cpp:
781         (WebCore::readAccelerationArgument):
782         (WebCore::readRotationRateArgument):
783         * bindings/js/JSGeolocationCustom.cpp:
784         (WebCore::createPositionOptions):
785         * bindings/js/JSHTMLCanvasElementCustom.cpp:
786         (WebCore::get3DContextAttributes):
787         * bindings/scripts/CodeGeneratorJS.pm:
788         (GenerateConstructorDefinition):
789         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
790         (WebCore::JSTestEventConstructorConstructor::construct):
791         * contentextensions/ContentExtensionParser.cpp:
792         (WebCore::ContentExtensions::getTypeFlags):
793         * html/HTMLMediaElement.cpp:
794         (WebCore::setPageScaleFactorProperty):
795         (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
796         (WebCore::HTMLMediaElement::getCurrentMediaControlsStatus):
797         * html/HTMLPlugInImageElement.cpp:
798         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
799
800 2016-03-08  Oliver Hunt  <oliver@apple.com>
801
802         Start moving to separated writable and executable mappings in the JIT
803         https://bugs.webkit.org/show_bug.cgi?id=155178
804
805         Reviewed by Filip Pizlo.
806
807         Update feature defines.
808
809         * Configurations/FeatureDefines.xcconfig:
810
811 2016-03-08  Commit Queue  <commit-queue@webkit.org>
812
813         Unreviewed, rolling out r197766.
814         https://bugs.webkit.org/show_bug.cgi?id=155183
815
816         Has platform-specific code in non-platform files (Requested by
817         smfr on #webkit).
818
819         Reverted changeset:
820
821         "AX: Force allow user zoom"
822         https://bugs.webkit.org/show_bug.cgi?id=155056
823         http://trac.webkit.org/changeset/197766
824
825 2016-03-08  Beth Dakin  <bdakin@apple.com>
826
827         Add an event for when touch force changes
828         https://bugs.webkit.org/show_bug.cgi?id=155143
829         -and corresponding-
830         rdar://problem/24068726
831
832         Reviewed by Darin Adler.
833
834         We will be able to test this once we fix the iOS touch tests. 
835
836         This patch adds touchforcechange which is a lot like the iOS equivalent of 
837         webkitmouseforcechanged. We had originally hoped to use touchmove to dispatch 
838         force changes, but that turned out to be a compatibility nightmare.
839
840         * dom/EventNames.h:
841         (WebCore::EventNames::isTouchEventType):
842         (WebCore::EventNames::isWheelEventType):
843         (WebCore::EventNames::touchEventNames):
844         * dom/GlobalEventHandlers.idl:
845         * html/HTMLAttributeNames.in:
846         * html/HTMLElement.cpp:
847         (WebCore::HTMLElement::createEventHandlerNameMap):
848         * platform/PlatformEvent.h:
849
850 2016-03-08  Anders Carlsson  <andersca@apple.com>
851
852         Ignore deprecation warnings.
853
854         * editing/cocoa/HTMLConverter.mm:
855         (HTMLConverter::computedAttributesForElement):
856         (HTMLConverter::_addMarkersToList):
857         * page/mac/EventHandlerMac.mm:
858         (WebCore::EventHandler::keyEvent):
859         (WebCore::lastEventIsMouseUp):
860         (WebCore::EventHandler::passSubframeEventToSubframe):
861         (WebCore::EventHandler::passWheelEventToWidget):
862         (WebCore::EventHandler::sendFakeEventsAfterWidgetTracking):
863         * page/mac/TextIndicatorWindow.mm:
864         (WebCore::TextIndicatorWindow::setTextIndicator):
865         * platform/graphics/mac/IconMac.mm:
866         (WebCore::Icon::paint):
867         * platform/mac/CursorMac.mm:
868         (WebCore::createCustomCursor):
869         * platform/mac/DragImageMac.mm:
870         (WebCore::dissolveDragImageToFraction):
871         (WebCore::createDragImageFromImage):
872         * platform/mac/EventLoopMac.mm:
873         (WebCore::EventLoop::cycle):
874         * platform/mac/PasteboardMac.mm:
875         (WebCore::Pasteboard::setDragImage):
876         * platform/mac/PlatformEventFactoryMac.mm:
877         (WebCore::globalPointForEvent):
878         (WebCore::pointForEvent):
879         (WebCore::mouseButtonForEvent):
880         (WebCore::mouseEventTypeForEvent):
881         (WebCore::clickCountForEvent):
882         (WebCore::textFromEvent):
883         (WebCore::unmodifiedTextFromEvent):
884         (WebCore::keyIdentifierForKeyEvent):
885         (WebCore::isKeypadEvent):
886         (WebCore::windowsKeyCodeForKeyEvent):
887         (WebCore::isKeyUpEvent):
888         (WebCore::modifiersForEvent):
889         (WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder):
890         * platform/mac/ScrollbarThemeMac.mm:
891         (WebCore::scrollbarControlSizeToNSControlSize):
892         * platform/mac/ThemeMac.mm:
893         (-[WebCoreThemeView window]):
894         (WebCore::controlSizeForFont):
895         (WebCore::controlSizeFromPixelSize):
896         (WebCore::setUpButtonCell):
897         (WebCore::stepperControlSizeForFont):
898         (WebCore::paintStepper):
899         (WebCore::ThemeMac::minimumControlSize):
900         * platform/mac/WebVideoFullscreenHUDWindowController.mm:
901         (-[WebVideoFullscreenHUDWindow initWithContentRect:styleMask:backing:defer:]):
902         (-[WebVideoFullscreenHUDWindow performKeyEquivalent:]):
903         (-[WebVideoFullscreenHUDWindowController init]):
904         (-[WebVideoFullscreenHUDWindowController keyDown:]):
905         (-[WebVideoFullscreenHUDWindowController windowDidLoad]):
906         * platform/mac/WebWindowAnimation.mm:
907         (WebWindowAnimationDurationFromDuration):
908         * rendering/RenderThemeMac.mm:
909         (WebCore::RenderThemeMac::updateCachedSystemFontDescription):
910         (WebCore::RenderThemeMac::controlSizeForFont):
911         (WebCore::RenderThemeMac::controlSizeForCell):
912         (WebCore::RenderThemeMac::controlSizeForSystemFont):
913         (WebCore::RenderThemeMac::paintProgressBar):
914         (WebCore::RenderThemeMac::popupMenuSize):
915         (WebCore::RenderThemeMac::sliderThumbHorizontal):
916         (WebCore::RenderThemeMac::sliderThumbVertical):
917
918 2016-03-08  Chris Dumez  <cdumez@apple.com>
919
920         Unreviewed attempt to fix the 32bit build after r197782.
921
922         * platform/MemoryPressureHandler.cpp:
923         (WebCore::MemoryPressureHandler::ReliefLogger::logMemoryUsageChange):
924
925 2016-03-08  Antonio Gomes  <tonikitoo@webkit.org>
926
927         Scrolling does not work when the mouse down is handled by a node
928         https://bugs.webkit.org/show_bug.cgi?id=19033
929
930         Reviewed by Simon Fraser.
931
932         Test: fast/events/prevent-default-prevents-interaction-with-scrollbars-.html
933
934         When a mouse press/down event happens on a scrollbar area, but event
935         is default prevented in the document level**, for example, event does not get
936         properly passed to scrollbars, although it should.
937
938         Problem started long ago with r17770, and was improved with r19596.
939         However, years later, the way Scrollbar* is obtained is still currently different
940         weither event is default prevented or not.
941
942         Patch uniforms the logic for both cases, and fixes the bug.
943
944         Note: code before used to look like
945
946         if (swallowEvent) {
947             <code>
948         } else {
949             <bleh>
950             <foo>
951         }
952
953         .. and now looks like
954
955         if (!swallowEvent)
956             <bleh>
957
958         <code>
959
960         if (!swallowEvent)
961             <foo>
962
963         ** e.g. document.addEventListener('mousedown', function (e) { e.preventDefault(); });
964
965         * page/EventHandler.cpp:
966         (WebCore::scrollbarForMouseEvent):
967         (WebCore::EventHandler::handleMousePressEvent):
968
969 2016-03-08  Chris Dumez  <cdumez@apple.com>
970
971         Unreviewed Windows build fix after r197728.
972
973         * platform/MemoryPressureHandler.cpp:
974         (WebCore::MemoryPressureHandler::ReliefLogger::logMemoryUsageChange):
975
976 2016-03-08  Commit Queue  <commit-queue@webkit.org>
977
978         Unreviewed, rolling out r197765.
979         https://bugs.webkit.org/show_bug.cgi?id=155172
980
981         The test added with this change is failing on all platforms.
982         (Requested by ryanhaddad on #webkit).
983
984         Reverted changeset:
985
986         "ImageDocuments leak their world."
987         https://bugs.webkit.org/show_bug.cgi?id=155167
988         http://trac.webkit.org/changeset/197765
989
990 2016-03-08  Antti Koivisto  <antti@apple.com>
991
992         Make Element const in ElementRuleCollector
993         https://bugs.webkit.org/show_bug.cgi?id=155170
994
995         Reviewed by Andreas Kling.
996
997         More const.
998
999         * css/ElementRuleCollector.cpp:
1000         (WebCore::ElementRuleCollector::ElementRuleCollector):
1001         (WebCore::ElementRuleCollector::matchAllRules):
1002         * css/ElementRuleCollector.h:
1003         * css/SelectorChecker.cpp:
1004         (WebCore::SelectorChecker::checkOne):
1005         (WebCore::SelectorChecker::matchesFocusPseudoClass):
1006         * cssjit/SelectorCompiler.cpp:
1007         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAddStyleRelationIfResolvingStyle):
1008         (WebCore::SelectorCompiler::addStyleRelationFunction):
1009         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateContextFunctionCallTest):
1010         (WebCore::SelectorCompiler::elementIsActive):
1011         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
1012         (WebCore::SelectorCompiler::elementIsHovered):
1013         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
1014         (WebCore::SelectorCompiler::makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
1015         (WebCore::SelectorCompiler::isPlaceholderShown):
1016         * cssjit/SelectorCompiler.h:
1017         * dom/StyledElement.h:
1018         (WebCore::StyledElement::additionalPresentationAttributeStyle):
1019         (WebCore::StyledElement::inlineStyle):
1020         (WebCore::StyledElement::collectStyleForPresentationAttribute):
1021         (WebCore::StyledElement::invalidateStyleAttribute):
1022         (WebCore::StyledElement::presentationAttributeStyle):
1023         * html/HTMLTableCellElement.cpp:
1024         (WebCore::HTMLTableCellElement::parseAttribute):
1025         (WebCore::HTMLTableCellElement::additionalPresentationAttributeStyle):
1026         * html/HTMLTableCellElement.h:
1027         * html/HTMLTableColElement.cpp:
1028         (WebCore::HTMLTableColElement::parseAttribute):
1029         (WebCore::HTMLTableColElement::additionalPresentationAttributeStyle):
1030         * html/HTMLTableColElement.h:
1031         * html/HTMLTableElement.cpp:
1032         (WebCore::leakBorderStyle):
1033         (WebCore::HTMLTableElement::additionalPresentationAttributeStyle):
1034         * html/HTMLTableElement.h:
1035         * html/HTMLTableSectionElement.cpp:
1036         (WebCore::HTMLTableSectionElement::create):
1037         (WebCore::HTMLTableSectionElement::additionalPresentationAttributeStyle):
1038         * html/HTMLTableSectionElement.h:
1039         * inspector/InspectorCSSAgent.cpp:
1040         (WebCore::InspectorCSSAgent::didUnregisterNamedFlowContentElement):
1041         (WebCore::InspectorCSSAgent::forcePseudoState):
1042         * inspector/InspectorCSSAgent.h:
1043         * inspector/InspectorDOMAgent.cpp:
1044         (WebCore::InspectorDOMAgent::pushNodePathToFrontend):
1045         (WebCore::InspectorDOMAgent::boundNodeId):
1046         (WebCore::InspectorDOMAgent::backendNodeIdForNode):
1047         * inspector/InspectorDOMAgent.h:
1048         * inspector/InspectorInstrumentation.cpp:
1049         (WebCore::InspectorInstrumentation::handleMousePressImpl):
1050         (WebCore::InspectorInstrumentation::forcePseudoStateImpl):
1051         * inspector/InspectorInstrumentation.h:
1052         (WebCore::InspectorInstrumentation::handleMousePress):
1053         (WebCore::InspectorInstrumentation::forcePseudoState):
1054
1055 2016-03-08  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1056
1057         [Fetch API] Commonalize handling of FetchBody by FetchRequest and FetchResponse
1058         https://bugs.webkit.org/show_bug.cgi?id=154959
1059
1060         Reviewed by Darin Adler.
1061
1062         Introducing FetchBodyOwner class as base class of FetchRequest and FetchResponse.
1063         This class is an ActiveDOMObject and is responsible of handling the Body API implemented by Request and Response.
1064
1065         Covered by existing tests.
1066
1067         * Modules/fetch/FetchBodyOwner.h: Added.
1068         (WebCore::FetchBodyOwner::isDisturbed):
1069         (WebCore::FetchBodyOwner::arrayBuffer):
1070         (WebCore::FetchBodyOwner::formData):
1071         (WebCore::FetchBodyOwner::blob):
1072         (WebCore::FetchBodyOwner::json):
1073         (WebCore::FetchBodyOwner::text):
1074         (WebCore::FetchBodyOwner::body):
1075         (WebCore::FetchBodyOwner::FetchBodyOwner):
1076         * Modules/fetch/FetchRequest.h:
1077         (WebCore::FetchRequest::FetchRequest):
1078         * Modules/fetch/FetchResponse.cpp:
1079         (WebCore::FetchResponse::FetchResponse):
1080         * Modules/fetch/FetchResponse.h:
1081         * WebCore.xcodeproj/project.pbxproj:
1082
1083 2016-03-08  Chris Dumez  <cdumez@apple.com>
1084
1085         Unreviewed, fix 32-bit build after r197726.
1086
1087         Also, re-enable static_assert to check the ElementRareData size.
1088
1089         * dom/ElementRareData.cpp:
1090
1091 2016-03-08  Brent Fulgham  <bfulgham@apple.com>
1092
1093         Unreviewed test fix after r197721.
1094         https://bugs.webkit.org/show_bug.cgi?id=155120
1095         <rdar://problem/25010167>
1096
1097         If a WK1 client turns on the "Resource Load Statistics" debug flag, but
1098         does not supply a data modification handler, we dereference a null function.
1099
1100         * loader/ResourceLoadStatisticsStore.cpp:
1101         (WebCore::ResourceLoadStatisticsStore::fireDataModificationHandler): Check
1102         for nullptr function before invoking it.
1103
1104 2016-03-08  Chris Dumez  <cdumez@apple.com>
1105
1106         Unreviewed, temporarily comment out static_assert while I investigate.
1107
1108         It still did not build on some platforms.
1109
1110         * dom/ElementRareData.cpp:
1111
1112 2016-03-08  Chris Dumez  <cdumez@apple.com>
1113
1114         Unreviewed, another build fix after r197726.
1115
1116         * dom/ElementRareData.cpp:
1117
1118 2016-03-08  Chris Dumez  <cdumez@apple.com>
1119
1120         Unreviewed Windows build fix after r197728.
1121
1122         * platform/MemoryPressureHandler.cpp:
1123
1124 2016-03-08  Chris Dumez  <cdumez@apple.com>
1125
1126         Unreviewed build fix after r197726.
1127
1128         * dom/ElementRareData.cpp:
1129
1130 2016-03-08  Nan Wang  <n_wang@apple.com>
1131
1132         AX: Force allow user zoom
1133         https://bugs.webkit.org/show_bug.cgi?id=155056
1134
1135         Reviewed by Chris Fleizach.
1136
1137         Override the maximum scale factor when forceAlwaysUserScalable is true.
1138
1139         Test: accessibility/ios-simulator/force-user-scalable.html
1140
1141         * page/ViewportConfiguration.h:
1142         (WebCore::ViewportConfiguration::maximumScale):
1143         * testing/Internals.cpp:
1144         (WebCore::Internals::composedTreeAsText):
1145         (WebCore::Internals::setViewportForceAlwaysUserScalable):
1146         (WebCore::Internals::viewportConfigurationMaximumScale):
1147         * testing/Internals.h:
1148         * testing/Internals.idl:
1149
1150 2016-03-08  Andreas Kling  <akling@apple.com>
1151
1152         ImageDocuments leak their world.
1153         <https://webkit.org/b/155167>
1154         <rdar://problem/24987363>
1155
1156         Reviewed by Antti Koivisto.
1157
1158         ImageDocument uses a special code path in ImageLoader in order to manually
1159         control how the image is loaded. It has to do this because the ImageDocument
1160         is really just a synthetic wrapper around a main resource that's an image.
1161
1162         This custom loading code had a bug where it would create a new CachedImage
1163         and neglect to set its CachedResource::m_state flag to Pending (which is
1164         normally set by CachedResource::load(), but we don't call that for these.)
1165
1166         This meant that when ImageDocument called CachedImage::finishLoading() to
1167         trigger the notifyFinished() callback path, the image would look at its
1168         loading state and see that it was Unknown (not Pending), and conclude that
1169         it hadn't loaded yet. So we never got the notifyFinished() signal.
1170
1171         The world leaks here because ImageLoader slaps a ref on its <img> element
1172         while it waits for the loading operation to complete. Once finished, whether
1173         successfully or with an error, it derefs the <img>.
1174
1175         Since we never fired notifyFinished(), we ended up with an extra ref on
1176         these <img> forever, and then the element kept its document alive too.
1177
1178         Test: fast/dom/ImageDocument-world-leak.html
1179
1180         * loader/ImageLoader.cpp:
1181         (WebCore::ImageLoader::updateFromElement):
1182
1183 2016-03-07  Antti Koivisto  <antti@apple.com>
1184
1185         ElementRuleCollector should not mutate document and style
1186         https://bugs.webkit.org/show_bug.cgi?id=155113
1187
1188         Reviewed by Andreas Kling.
1189
1190         Move applying of style relations out of ElementRuleCollector and StyleResolver.
1191         This gets us closer to making StyleResolver const for Element.
1192
1193         * CMakeLists.txt:
1194         * WebCore.xcodeproj/project.pbxproj:
1195         * css/ElementRuleCollector.cpp:
1196         (WebCore::ElementRuleCollector::ElementRuleCollector):
1197
1198             No need for style parameter anymore.
1199
1200         (WebCore::ElementRuleCollector::collectMatchingRules):
1201         (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
1202         (WebCore::ElementRuleCollector::ruleMatches):
1203
1204             Client will now do the style and element mutations. Just collect the data here.
1205
1206         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
1207         (WebCore::ElementRuleCollector::commitStyleRelations): Deleted.
1208
1209             Moves to StyleRelations.cpp
1210
1211         * css/ElementRuleCollector.h:
1212         (WebCore::ElementRuleCollector::hasMatchedRules):
1213         (WebCore::ElementRuleCollector::matchedPseudoElementIds):
1214         (WebCore::ElementRuleCollector::styleRelations):
1215         (WebCore::ElementRuleCollector::didMatchUncommonAttributeSelector):
1216         * css/MediaQueryMatcher.cpp:
1217         (WebCore::MediaQueryMatcher::prepareEvaluator):
1218         (WebCore::MediaQueryMatcher::evaluate):
1219         * css/SelectorChecker.cpp:
1220         (WebCore::addStyleRelation):
1221         (WebCore::isFirstChildElement):
1222         (WebCore::isFirstOfType):
1223         (WebCore::countElementsBefore):
1224         (WebCore::countElementsOfTypeBefore):
1225         (WebCore::SelectorChecker::matchRecursively):
1226         (WebCore::SelectorChecker::checkOne):
1227         * css/SelectorChecker.h:
1228         (WebCore::SelectorChecker::CheckingContext::CheckingContext):
1229         * css/StyleMedia.cpp:
1230         (WebCore::StyleMedia::matchMedium):
1231         * css/StyleResolver.cpp:
1232         (WebCore::StyleResolver::StyleResolver):
1233         (WebCore::isAtShadowBoundary):
1234         (WebCore::StyleResolver::styleForElement):
1235
1236             Apply the style relations affecting current style immediately.
1237             Pass the rest to the client.
1238
1239         (WebCore::StyleResolver::styleForKeyframe):
1240         (WebCore::StyleResolver::pseudoStyleForElement):
1241         (WebCore::StyleResolver::pseudoStyleRulesForElement):
1242         * css/StyleResolver.h:
1243         (WebCore::ElementStyle::ElementStyle):
1244         * cssjit/SelectorCompiler.cpp:
1245         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAddStyleRelationIfResolvingStyle):
1246         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAddStyleRelation):
1247         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorCheckerExcludingPseudoElements):
1248         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
1249         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateIndirectAdjacentTreeWalker):
1250         (WebCore::SelectorCompiler::addStyleRelationFunction):
1251         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsActive):
1252         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsEmpty):
1253         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
1254         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsHovered):
1255         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild):
1256         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
1257         (WebCore::SelectorCompiler::makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
1258         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
1259         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):
1260         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChild):
1261         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChildOf):
1262         * dom/Document.cpp:
1263         (WebCore::Document::styleForElementIgnoringPendingStylesheets):
1264
1265             Apply style relations.
1266
1267         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
1268         * dom/Element.cpp:
1269         (WebCore::Element::styleResolver):
1270         (WebCore::Element::resolveStyle):
1271         (WebCore::Element::didDetachRenderers):
1272         (WebCore::Element::resolveCustomStyle):
1273
1274             Return ElementStyle (which contains style relations along with the render style).
1275             Rename for consistency.
1276
1277         (WebCore::Element::cloneAttributesFromElement):
1278         (WebCore::Element::customStyleForRenderer): Deleted.
1279         * dom/Element.h:
1280         (WebCore::Element::isVisibleInViewportChanged):
1281         * dom/PseudoElement.cpp:
1282         (WebCore::PseudoElement::clearHostElement):
1283         (WebCore::PseudoElement::resolveCustomStyle):
1284         (WebCore::PseudoElement::didAttachRenderers):
1285         (WebCore::PseudoElement::customStyleForRenderer): Deleted.
1286         * dom/PseudoElement.h:
1287         * html/HTMLTitleElement.cpp:
1288         (WebCore::HTMLTitleElement::computedTextWithDirection):
1289         * html/shadow/SliderThumbElement.cpp:
1290         (WebCore::SliderThumbElement::hostInput):
1291         (WebCore::SliderThumbElement::resolveCustomStyle):
1292         (WebCore::SliderThumbElement::shadowPseudoId):
1293         (WebCore::SliderContainerElement::createElementRenderer):
1294         (WebCore::SliderContainerElement::resolveCustomStyle):
1295         (WebCore::SliderContainerElement::shadowPseudoId):
1296         (WebCore::SliderThumbElement::customStyleForRenderer): Deleted.
1297         (WebCore::SliderContainerElement::customStyleForRenderer): Deleted.
1298         * html/shadow/SliderThumbElement.h:
1299         * html/shadow/TextControlInnerElements.cpp:
1300         (WebCore::TextControlInnerElement::create):
1301         (WebCore::TextControlInnerElement::resolveCustomStyle):
1302         (WebCore::TextControlInnerTextElement::renderer):
1303         (WebCore::TextControlInnerTextElement::resolveCustomStyle):
1304         (WebCore::TextControlPlaceholderElement::TextControlPlaceholderElement):
1305         (WebCore::TextControlPlaceholderElement::resolveCustomStyle):
1306         (WebCore::TextControlInnerElement::customStyleForRenderer): Deleted.
1307         (WebCore::TextControlInnerTextElement::customStyleForRenderer): Deleted.
1308         (WebCore::TextControlPlaceholderElement::customStyleForRenderer): Deleted.
1309         * html/shadow/TextControlInnerElements.h:
1310         * rendering/RenderElement.cpp:
1311         (WebCore::RenderElement::getUncachedPseudoStyle):
1312         * rendering/RenderNamedFlowFragment.cpp:
1313         (WebCore::RenderNamedFlowFragment::computeStyleInRegion):
1314         (WebCore::RenderNamedFlowFragment::computeChildrenStyleInRegion):
1315         * style/StyleRelations.cpp: Added.
1316         (WebCore::Style::commitRelationsToRenderStyle):
1317
1318             Commit relations affecting style that is being computed.
1319
1320         (WebCore::Style::commitRelationsToDocument):
1321
1322             Commit relations that mutate document.
1323
1324         * style/StyleRelations.h: Added.
1325
1326             Factor style relation data structures and functions to a file of their own.
1327
1328         (WebCore::Style::Relation::Relation):
1329         * style/StyleSharingResolver.cpp:
1330         (WebCore::Style::SharingResolver::styleSharingCandidateMatchesRuleSet):
1331         * style/StyleTreeResolver.cpp:
1332         (WebCore::Style::TreeResolver::styleForElement):
1333
1334             Apply style relations.
1335
1336         * style/StyleTreeResolver.h:
1337         * svg/SVGElement.cpp:
1338         (WebCore::SVGElement::synchronizeSystemLanguage):
1339         (WebCore::SVGElement::resolveCustomStyle):
1340         (WebCore::SVGElement::customStyleForRenderer): Deleted.
1341         * svg/SVGElement.h:
1342         * svg/SVGElementRareData.h:
1343         (WebCore::SVGElementRareData::overrideComputedStyle):
1344
1345 2016-03-08  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1346
1347         [Fetch API] Implement fetch skeleton
1348         https://bugs.webkit.org/show_bug.cgi?id=155111
1349
1350         Reviewed by Darin Adler.
1351
1352         Adding skeleton code to call fetch API from normal and worker scopes.
1353         Fetch API implementation is limited to reject the promise.
1354
1355         Updating the binding generator to fix the case of overloaded promise-returning functions.
1356         Made overloaded utility functions "static inline".
1357
1358         Tests: imported/w3c/web-platform-tests/fetch/api/basic/accept-header-worker.html
1359                imported/w3c/web-platform-tests/fetch/api/basic/accept-header.html
1360                imported/w3c/web-platform-tests/fetch/api/basic/integrity-worker.html
1361                imported/w3c/web-platform-tests/fetch/api/basic/integrity.html
1362                imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-worker.html
1363                imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.html
1364                imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin-worker.html
1365                imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin.html
1366                imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers-worker.html
1367                imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers.html
1368                imported/w3c/web-platform-tests/fetch/api/basic/request-headers-worker.html
1369                imported/w3c/web-platform-tests/fetch/api/basic/request-headers.html
1370                imported/w3c/web-platform-tests/fetch/api/basic/scheme-about-worker.html
1371                imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.html
1372                imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-worker.html
1373                imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.html
1374                imported/w3c/web-platform-tests/fetch/api/basic/scheme-data-worker.html
1375                imported/w3c/web-platform-tests/fetch/api/basic/scheme-data.html
1376                imported/w3c/web-platform-tests/fetch/api/basic/scheme-others-worker.html
1377                imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.html
1378                imported/w3c/web-platform-tests/fetch/api/basic/stream-response-worker.html
1379                imported/w3c/web-platform-tests/fetch/api/basic/stream-response.html
1380
1381         * CMakeLists.txt:
1382         * DerivedSources.make:
1383         * Modules/fetch/DOMWindowFetch.cpp: Added.
1384         (WebCore::DOMWindowFetch::fetch):
1385         * Modules/fetch/DOMWindowFetch.h: Added.
1386         * Modules/fetch/DOMWindowFetch.idl: Added.
1387         * Modules/fetch/WorkerGlobalScopeFetch.cpp: Added.
1388         (WebCore::WorkerGlobalScopeFetch::fetch):
1389         * Modules/fetch/WorkerGlobalScopeFetch.h: Added.
1390         * Modules/fetch/WorkerGlobalScopeFetch.idl: Added.
1391         * WebCore.xcodeproj/project.pbxproj:
1392         * bindings/scripts/CodeGeneratorJS.pm:
1393         (GenerateImplementation): Fixing the case of overloaded promise-returning functions.
1394         * bindings/scripts/test/JS/JSTestObj.cpp:
1395         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
1396         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
1397         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
1398         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
1399         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
1400         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
1401         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
1402         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
1403         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9):
1404         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
1405         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
1406         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod12):
1407         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1):
1408         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2):
1409         (WebCore::jsTestObjConstructorFunctionOverloadedMethod11):
1410         (WebCore::jsTestObjConstructorFunctionOverloadedMethod12):
1411         (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1):
1412         (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Promise):
1413         (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2):
1414         (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Promise):
1415         (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction):
1416         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod): Deleted.
1417         (WebCore::jsTestObjConstructorFunctionClassMethod2): Deleted.
1418         (WebCore::jsTestObjPrototypeFunctionAny): Deleted.
1419         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionPromise): Deleted.
1420         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise): Deleted.
1421         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise): Deleted.
1422         * bindings/scripts/test/TestObj.idl:
1423
1424 2016-03-08  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1425
1426         [Fetch API] Make FetchRequest and FetchResponse ActiveDOMObject
1427         https://bugs.webkit.org/show_bug.cgi?id=154729
1428
1429         Reviewed by Darin Adler.
1430
1431         Covered by existing tests.
1432
1433         Making FetchRequest and FetchResponse ActiveDOMObject.
1434         Both objects can always be suspended now.
1435         This might be updated when blob conversion is added or when fetching data to fill in FetchResponse.
1436
1437         * Modules/fetch/FetchRequest.cpp:
1438         (WebCore::FetchRequest::create):
1439         (WebCore::FetchRequest::clone):
1440         (WebCore::FetchRequest::activeDOMObjectName):
1441         (WebCore::FetchRequest::canSuspendForDocumentSuspension):
1442         * Modules/fetch/FetchRequest.h:
1443         (WebCore::FetchRequest::FetchRequest):
1444         * Modules/fetch/FetchRequest.idl:
1445         * Modules/fetch/FetchResponse.cpp:
1446         (WebCore::FetchResponse::error):
1447         (WebCore::FetchResponse::redirect):
1448         (WebCore::FetchResponse::FetchResponse):
1449         (WebCore::FetchResponse::clone):
1450         (WebCore::FetchResponse::activeDOMObjectName):
1451         (WebCore::FetchResponse::canSuspendForDocumentSuspension):
1452         * Modules/fetch/FetchResponse.h:
1453         (WebCore::FetchResponse::create):
1454         * Modules/fetch/FetchResponse.idl:
1455
1456 2016-03-08  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>
1457
1458         [SVG2] Implement marker orient='auto-start-reverse'
1459         https://bugs.webkit.org/show_bug.cgi?id=138456
1460
1461         Reviewed by Darin Adler.
1462
1463         https://www.w3.org/TR/SVG2/painting.html#OrientAttribute
1464         marker-start markers must be oriented at 180 degrees to the direction of the path when
1465         the orient attribute of the marker is set to 'auto-start-reverse'.
1466
1467         To acheive this the SVGMarkerData class which calculates the angles for each marker on
1468         a path must know whether the orient type is set to reverse the start marker. 
1469
1470         Tests: svg/animations/animate-marker-orient-from-angle-to-autostartreverse.html
1471                svg/animations/animate-marker-orienttype-4.html
1472                svg/custom/marker-auto-start-reverse.html
1473
1474         * rendering/svg/RenderSVGShape.cpp:
1475         (WebCore::RenderSVGShape::processMarkerPositions):
1476           Create marker data, using animated value of orient to determine
1477           if first marker should be reversed.
1478         * rendering/svg/SVGMarkerData.h:
1479         (WebCore::SVGMarkerData::SVGMarkerData):
1480           Constructor now requires boolean indicating if start marker is 
1481           reversed.
1482         (WebCore::SVGMarkerData::currentAngle):
1483           Take into account whether start marker should be reversed.
1484         * rendering/svg/SVGResources.cpp:
1485         (WebCore::SVGResources::markerReverseStart):
1486           New function to query whether start marker should be reversed.
1487         * rendering/svg/SVGResources.h:
1488           Add declaration for new function.
1489         * svg/SVGAnimatedAngle.cpp:
1490         (WebCore::SVGAnimatedAngleAnimator::calculateAnimatedValue):
1491           Support animation including the value auto-start-reverse.
1492         * svg/SVGMarkerElement.cpp:
1493         (WebCore::SVGMarkerElement::setOrient):
1494           Combine duplicated functionality into one private method
1495         (WebCore::SVGMarkerElement::setOrientToAuto):
1496           Set orient type and angle correctly for orient=auto. Uses setOrient.
1497         (WebCore::SVGMarkerElement::setOrientToAngle):
1498           Set orient type and angle correctly for orient=<angle>. Uses setOrient.
1499         (WebCore::SVGMarkerElement::synchronizeOrientType):
1500           Support auto-start-reverse as a possible case.
1501         * svg/SVGMarkerElement.h:
1502         (WebCore::SVGIDLEnumLimits<SVGMarkerOrientType>::highestExposedEnumValue):
1503           Limit the orient DOM property so that the new enum value
1504           required for auto-start-reverse is not exposed.
1505         (WebCore::SVGPropertyTraits<SVGMarkerOrientType>::highestEnumValue):
1506           Support auto-start-reverse.
1507         (WebCore::SVGPropertyTraits<SVGMarkerOrientType>::fromString):
1508           Support auto-start-reverse.
1509
1510 2016-03-07  Keith Rollin  <krollin@apple.com>
1511
1512         Enhance logging: Use "always on" macros
1513         https://bugs.webkit.org/show_bug.cgi?id=154499
1514         <rdar://problem/24757730>
1515
1516         Reviewed by Chris Dumez.
1517
1518         Make use of new logging macros by reporting on frame and resource
1519         load activity.
1520
1521         Add new logging to memory pressure handler to show when it's called
1522         and its effectiveness. As part of this change, the various
1523         platform-specific implementations have been unified.
1524
1525         No new tests. No new basic functionality has been added. Only new
1526         logging has been added in release mode or has been enabled to execute
1527         in release mode as well as debug mode.
1528
1529         * loader/FrameLoader.cpp:
1530         (WebCore::FrameLoader::prepareForLoadStart):
1531         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
1532         (WebCore::FrameLoader::isAlwaysOnLoggingAllowed):
1533         * loader/FrameLoader.h:
1534         * loader/ResourceLoader.cpp:
1535         (WebCore::ResourceLoader::isAlwaysOnLoggingAllowed):
1536         * loader/ResourceLoader.h:
1537         * page/Frame.cpp:
1538         (WebCore::Frame::isAlwaysOnLoggingAllowed):
1539         * page/Frame.h:
1540         * page/Page.cpp:
1541         (WebCore::Page::isAlwaysOnLoggingAllowed):
1542         * page/Page.h:
1543         * page/SessionID.h:
1544         (WebCore::SessionID::isAlwaysOnLoggingAllowed):
1545         * platform/MemoryPressureHandler.cpp:
1546         (WebCore::MemoryPressureHandler::ReliefLogger::logMemoryUsageChange):
1547         (WebCore::MemoryPressureHandler::ReliefLogger::platformLog): Deleted.
1548         * platform/MemoryPressureHandler.h:
1549         (WebCore::MemoryPressureHandler::ReliefLogger::ReliefLogger):
1550         (WebCore::MemoryPressureHandler::ReliefLogger::~ReliefLogger):
1551         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1552         (WebCore::MemoryPressureHandler::ReliefLogger::platformLog): Deleted.
1553         * platform/linux/MemoryPressureHandlerLinux.cpp:
1554         (WebCore::MemoryPressureHandler::ReliefLogger::platformLog): Deleted.
1555         * platform/win/MemoryPressureHandlerWin.cpp:
1556         (WebCore::MemoryPressureHandler::ReliefLogger::platformLog): Deleted.
1557
1558 2016-03-07  Chris Dumez  <cdumez@apple.com>
1559
1560         Align HTMLCanvasElement.width / height with the specification
1561         https://bugs.webkit.org/show_bug.cgi?id=155156
1562
1563         Reviewed by Ryosuke Niwa.
1564
1565         Align HTMLCanvasElement.width / height with the specification:
1566         - https://html.spec.whatwg.org/multipage/scripting.html#dom-canvas-width
1567         - https://html.spec.whatwg.org/multipage/scripting.html#attr-canvas-width
1568
1569         In particular, the following changes were made:
1570         1. The attributes are now 'unsigned long' instead of 'long'
1571         2. The corresponding content attributes are parsed as per the HTML rules
1572            for passing non-negative integers.
1573         3. Upon setting, if the value is out-of-range, the content attributes is
1574            set to its default value.
1575
1576         No new tests, already covered by existing test.
1577
1578         * html/HTMLCanvasElement.cpp:
1579         (WebCore::HTMLCanvasElement::setHeight):
1580         (WebCore::HTMLCanvasElement::setWidth):
1581         (WebCore::HTMLCanvasElement::reset):
1582         * html/HTMLCanvasElement.h:
1583         * html/HTMLCanvasElement.idl:
1584
1585 2016-03-07  Chris Dumez  <cdumez@apple.com>
1586
1587         Stop clamping HTMLElement.tabIndex to the range of a short
1588         https://bugs.webkit.org/show_bug.cgi?id=155159
1589
1590         Reviewed by Ryosuke Niwa.
1591
1592         Stop clamping HTMLElement.tabIndex to the range of a short. We
1593         apparently did this to match Firefox. However, this no longer matches
1594         Firefox's behavior nor the HTML specification:
1595         - https://html.spec.whatwg.org/multipage/interaction.html#dom-tabindex
1596
1597         No new tests, already covered by existing test.
1598
1599         * dom/Element.cpp:
1600         (WebCore::Element::setTabIndexExplicitly):
1601         (WebCore::Element::tabIndex):
1602         * dom/Element.h:
1603         * dom/ElementRareData.h:
1604         (WebCore::ElementRareData::tabIndex):
1605         (WebCore::ElementRareData::setTabIndexExplicitly):
1606         * html/HTMLAnchorElement.cpp:
1607         (WebCore::HTMLAnchorElement::tabIndex):
1608         * html/HTMLAnchorElement.h:
1609         * html/HTMLElement.cpp:
1610         (WebCore::HTMLElement::parseAttribute):
1611         (WebCore::HTMLElement::tabIndex):
1612         * html/HTMLElement.h:
1613         * html/HTMLFormControlElement.cpp:
1614         (WebCore::HTMLFormControlElement::tabIndex):
1615         * html/HTMLFormControlElement.h:
1616         * page/FocusController.cpp:
1617         (WebCore::nextElementWithGreaterTabIndex):
1618         (WebCore::FocusController::previousFocusableElement):
1619         * svg/SVGAElement.cpp:
1620         (WebCore::SVGAElement::tabIndex):
1621         * svg/SVGAElement.h:
1622         * svg/SVGElement.cpp:
1623         (WebCore::SVGElement::tabIndex):
1624         (WebCore::SVGElement::parseAttribute):
1625         * svg/SVGElement.h:
1626
1627 2016-03-07  Daniel Bates  <dabates@apple.com>
1628
1629         CSP: Source '*' should not match URLs with schemes blob, data, or filesystem
1630         https://bugs.webkit.org/show_bug.cgi?id=154122
1631         <rdar://problem/24613336>
1632
1633         Reviewed by Brent Fulgham.
1634
1635         Restrict matching of source expression * to HTTP or HTTPS URLs for all directives except
1636         img-src and media-src. This policy is more restrictive than the policy described in section
1637         Matching Source Expressions of the Content Security Policy 2.0 spec., <https://www.w3.org/TR/2015/CR-CSP2-20150721>,
1638         which restricts matching * to schemes that are not blob, data, or filesystem.
1639
1640         For directive img-src we restrict matching of * to HTTP, HTTPS, and data URLs. For directive
1641         media-src we restrict matching of * to HTTP, HTTPS, data URLs and blob URLs. We use a
1642         more lenient interpretation of * for directives img-src and media-src than required by
1643         the spec. to mitigate web compatibility issues.
1644
1645         Tests: fast/dom/HTMLImageElement/image-with-blob-url-blocked-by-csp-img-src-star.html
1646                fast/dom/HTMLImageElement/image-with-data-url-allowed-by-csp-img-src-star.html
1647                fast/dom/HTMLImageElement/image-with-file-url-blocked-by-csp-img-src-star.html
1648                fast/dom/HTMLLinkElement/link-with-blob-url-blocked-by-csp-style-src-star.html
1649                fast/dom/HTMLLinkElement/link-with-data-url-blocked-by-csp-style-src-star.html
1650                fast/dom/HTMLLinkElement/link-with-file-url-blocked-by-csp-style-src-star.html
1651                http/tests/security/contentSecurityPolicy/image-with-http-url-allowed-by-csp-img-src-star.html
1652                http/tests/security/contentSecurityPolicy/image-with-https-url-allowed-by-csp-img-src-star.html
1653                http/tests/security/contentSecurityPolicy/javascript-url-blocked-by-default-src-star.html
1654                http/tests/security/contentSecurityPolicy/link-with-http-url-allowed-by-csp-style-src-star.html
1655                http/tests/security/contentSecurityPolicy/link-with-https-url-allowed-by-csp-style-src-star.html
1656                http/tests/security/contentSecurityPolicy/video-with-http-url-allowed-by-csp-media-src-star.html
1657                http/tests/security/contentSecurityPolicy/video-with-https-url-allowed-by-csp-media-src-star.html
1658                media/video-with-blob-url-allowed-by-csp-media-src-star.html
1659                media/video-with-data-url-allowed-by-csp-media-src-star.html
1660                media/video-with-file-url-blocked-by-csp-media-src-star.html
1661
1662         * page/csp/ContentSecurityPolicySourceList.cpp:
1663         (WebCore::ContentSecurityPolicySourceList::isProtocolAllowedByStar): Added.
1664         (WebCore::ContentSecurityPolicySourceList::matches): Modified to only match * if ContentSecurityPolicySourceList::isProtocolAllowedByStar().
1665         evaluates to true.
1666         * page/csp/ContentSecurityPolicySourceList.h:
1667
1668 2016-03-07  Brent Fulgham  <bfulgham@apple.com>
1669
1670         Reduce startup and shutdown cost of resource load statistics
1671         https://bugs.webkit.org/show_bug.cgi?id=155120
1672         <rdar://problem/25010167>
1673
1674         Reviewed by Andy Estes.
1675
1676         Move all file-related code out of WebCore.
1677
1678         * loader/ResourceLoadStatisticsStore.cpp:
1679         (WebCore::ResourceLoadStatisticsStore::create): Deleted path overload.
1680         (WebCore::ResourceLoadStatisticsStore::createEncoderFromData): Added.
1681         (WebCore::ResourceLoadStatisticsStore::readDataFromDecoder): Added.
1682         (WebCore::ResourceLoadStatisticsStore::ResourceLoadStatisticsStore): Deleted.
1683         (WebCore::ResourceLoadStatisticsStore::writeDataToDisk): Deleted.
1684         (WebCore::ResourceLoadStatisticsStore::setStatisticsStorageDirectory): Deleted.
1685         (WebCore::ResourceLoadStatisticsStore::persistentStoragePath): Deleted.
1686         (WebCore::ResourceLoadStatisticsStore::readDataFromDiskIfNeeded): Deleted.
1687         (WebCore::ResourceLoadStatisticsStore::createDecoderFromDisk): Deleted.
1688         (WebCore::ResourceLoadStatisticsStore::writeEncoderToDisk): Deleted.
1689         * loader/ResourceLoadStatisticsStore.h:
1690         (WebCore::ResourceLoadStatisticsStore::clear): Added.
1691
1692 2016-03-07  Zalan Bujtas  <zalan@apple.com>
1693
1694         Crash in WebCore::RenderElement::containingBlockForObjectInFlow
1695         https://bugs.webkit.org/show_bug.cgi?id=155109
1696
1697         Reviewed by Simon Fraser.
1698
1699         It's unsafe to call containingBlock() on RenderView.
1700
1701         Unable to reproduce.
1702
1703         * rendering/RenderBlock.cpp:
1704         (WebCore::RenderBlock::styleWillChange):
1705         (WebCore::RenderBlock::isSelfCollapsingBlock):
1706         (WebCore::RenderBlock::selectionGaps):
1707         * rendering/RenderBox.cpp:
1708         (WebCore::RenderBox::borderBoxRectInRegion):
1709         (WebCore::RenderBox::computePercentageLogicalHeight):
1710         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
1711         (WebCore::logicalWidthIsResolvable):
1712         (WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock):
1713         * rendering/RenderBoxModelObject.cpp:
1714         (WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight):
1715         * rendering/RenderFlowThread.cpp:
1716         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
1717         (WebCore::RenderFlowThread::offsetFromLogicalTopOfFirstRegion):
1718         * rendering/RenderLayer.cpp:
1719         (WebCore::RenderLayer::hasCompositedLayerInEnclosingPaginationChain):
1720         (WebCore::RenderLayer::updatePagination):
1721         (WebCore::inContainingBlockChain):
1722         * rendering/RenderMultiColumnFlowThread.cpp:
1723         (WebCore::isValidColumnSpanner):
1724         * rendering/RenderNamedFlowThread.cpp:
1725         (WebCore::RenderNamedFlowThread::decorationsClipRectForBoxInNamedFlowFragment):
1726         * rendering/RenderObject.cpp:
1727         (WebCore::hasFixedPosInNamedFlowContainingBlock):
1728         * rendering/RenderReplaced.cpp:
1729         (WebCore::firstContainingBlockWithLogicalWidth):
1730         * rendering/RenderView.cpp:
1731         (WebCore::RenderView::subtreeSelectionBounds):
1732         (WebCore::RenderView::repaintSubtreeSelection):
1733         (WebCore::RenderView::clearSubtreeSelection):
1734         (WebCore::RenderView::applySubtreeSelection):
1735
1736 2016-03-07  Daniel Bates  <dabates@apple.com>
1737
1738         Cleanup: Add convenience function URL::procotolIsBlob()
1739         https://bugs.webkit.org/show_bug.cgi?id=155127
1740         <rdar://problem/25016829>
1741
1742         Reviewed by Brent Fulgham.
1743
1744         Similar to the class member function URL::protocolIsData(), add a class member function to
1745         class URL to determine if a URL is a blob URL.
1746
1747         No functionality was changed. So, no new tests.
1748
1749         * page/SecurityOrigin.cpp:
1750         (WebCore::SecurityOrigin::shouldUseInnerURL): Modified to use URL::protocolIsBlob().
1751         (WebCore::getCachedOrigin): Ditto.
1752         * platform/URL.h:
1753         (WebCore::URL::protocolIsBlob): Added.
1754         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1755         (webKitWebSrcStart): Modified to use URL::protocolIsBlob().
1756         (urlHasSupportedProtocol): Ditto.
1757         * workers/Worker.cpp:
1758         (WebCore::Worker::didReceiveResponse): Ditto.
1759         * xml/XMLHttpRequest.cpp:
1760         (WebCore::XMLHttpRequest::createRequest): Ditto.
1761
1762 2016-03-07  Adam Bergkvist  <adam.bergkvist@ericsson.com>
1763
1764         WebRTC: Implement MediaEndpointPeerConnection::createOffer()
1765         https://bugs.webkit.org/show_bug.cgi?id=154867
1766
1767         Reviewed by Eric Carlson and Jer Noble.
1768
1769         - MediaEndpointPeerConnection: Initial implementation of createOffer()
1770         added. createOffer() is split up into a synchronous part, and a
1771         scheduled task. The task will be deferred until information, requiring
1772         some amount of work, such as the DTLS fingerprint is available. Other
1773         async API functions will also follow this pattern.
1774
1775         - SDPProcessor (added): The SDPProcessors parses SDP to a
1776         MediaEndpointSessionConfiguration object and generates SDP in the
1777         reverse direction. Any SDP string handling is confined to the
1778         SDPProcessor and all configuration of the media session is done via the
1779         MediaEndpointSessionConfiguration object.
1780
1781         The SDP parser and generator logic is implemented in JavaScript and
1782         works with JSON (SDP->JSON, JSON->SDP). The SDPProcessor runs JS in an
1783         isolated scope and converts JSON to a MediaEndpointSessionConfiguration
1784         object and the reverse. Using JSON signaling (nonstandard) can be
1785         helpful during debugging.
1786
1787         - MockMediaEndpoint (added): Mock MediaEndpoint implementation with
1788         support for generating offers. DTLS information, such as fingerprint,
1789         is hard coded to facilitate testing with expected values.
1790
1791         Test: fast/mediastream/RTCPeerConnection-inspect-offer.html
1792
1793         The test is currently skipped on the mac port until support to read the
1794         SDPProcessor JavaScript resource is added.
1795
1796         * CMakeLists.txt:
1797         * Modules/mediastream/MediaEndpointPeerConnection.cpp:
1798         (WebCore::WrappedSessionDescriptionPromise::create):
1799         (WebCore::WrappedSessionDescriptionPromise::promise):
1800         (WebCore::WrappedSessionDescriptionPromise::WrappedSessionDescriptionPromise):
1801         (WebCore::randomString):
1802         (WebCore::MediaEndpointPeerConnection::MediaEndpointPeerConnection):
1803         (WebCore::MediaEndpointPeerConnection::runTask):
1804         (WebCore::MediaEndpointPeerConnection::startRunningTasks):
1805         (WebCore::MediaEndpointPeerConnection::createOffer):
1806         (WebCore::MediaEndpointPeerConnection::createOfferTask):
1807         (WebCore::MediaEndpointPeerConnection::gotDtlsFingerprint):
1808         * Modules/mediastream/MediaEndpointPeerConnection.h:
1809         * Modules/mediastream/SDPProcessor.cpp: Added.
1810         (WebCore::SDPProcessor::SDPProcessor):
1811         (WebCore::createCandidateObject):
1812         (WebCore::createCandidate):
1813         (WebCore::configurationFromJSON):
1814         (WebCore::iceCandidateFromJSON):
1815         (WebCore::configurationToJSON):
1816         (WebCore::iceCandidateToJSON):
1817         (WebCore::SDPProcessor::generate):
1818         (WebCore::SDPProcessor::parse):
1819         (WebCore::SDPProcessor::generateCandidateLine):
1820         (WebCore::SDPProcessor::parseCandidateLine):
1821         (WebCore::SDPProcessor::callScript):
1822         * Modules/mediastream/SDPProcessor.h: Added.
1823         * Modules/mediastream/sdp.js: Added.
1824         (match):
1825         (addDefaults):
1826         (fillTemplate):
1827         (SDP.parse):
1828         (SDP.generate):
1829         (SDP.generateCandidateLine):
1830         (hasAllProperties):
1831         (SDP.verifyObject):
1832         (generate):
1833         (parse):
1834         (generateCandidateLine):
1835         (parseCandidateLine):
1836         * PlatformGTK.cmake:
1837         * WebCore.xcodeproj/project.pbxproj:
1838         * platform/mediastream/MediaEndpoint.cpp:
1839         (WebCore::createMediaEndpoint):
1840         * platform/mediastream/MediaEndpoint.h:
1841         * platform/mediastream/PeerMediaDescription.h:
1842         * platform/mediastream/SDPProcessorScriptResource.cpp: Added.
1843         (WebCore::SDPProcessorScriptResource::scriptString):
1844         * platform/mediastream/SDPProcessorScriptResource.h: Added.
1845         * platform/mediastream/gtk/SDPProcessorScriptResourceGtk.cpp: Added.
1846         (WebCore::SDPProcessorScriptResource::scriptString):
1847         * platform/mock/MockMediaEndpoint.cpp: Added.
1848         (WebCore::MockMediaEndpoint::create):
1849         (WebCore::MockMediaEndpoint::MockMediaEndpoint):
1850         (WebCore::MockMediaEndpoint::~MockMediaEndpoint):
1851         (WebCore::MockMediaEndpoint::setConfiguration):
1852         (WebCore::MockMediaEndpoint::generateDtlsInfo):
1853         (WebCore::MockMediaEndpoint::getDefaultAudioPayloads):
1854         (WebCore::MockMediaEndpoint::getDefaultVideoPayloads):
1855         (WebCore::MockMediaEndpoint::updateReceiveConfiguration):
1856         (WebCore::MockMediaEndpoint::updateSendConfiguration):
1857         (WebCore::MockMediaEndpoint::addRemoteCandidate):
1858         (WebCore::MockMediaEndpoint::replaceSendSource):
1859         (WebCore::MockMediaEndpoint::stop):
1860         * platform/mock/MockMediaEndpoint.h: Added.
1861         * testing/Internals.cpp:
1862         (WebCore::Internals::Internals):
1863         (WebCore::Internals::enableMockMediaEndpoint):
1864         * testing/Internals.h:
1865
1866 2016-03-07  Daniel Bates  <dabates@apple.com>
1867
1868         CSP: object-src directive should prohibit creation of nested browsing context
1869         https://bugs.webkit.org/show_bug.cgi?id=153153
1870         <rdar://problem/24383209>
1871
1872         Reviewed by Brent Fulgham.
1873
1874         Enforce the Content Security Policy object-src directive when fetching a URL for content
1875         that will cause an HTML object or HTML embed element to act as a nested browsing context
1876         (i.e. behave as if the content was loaded in an HTML iframe element). This makes our
1877         enforcement of the object-src directive match the behavior of the object-src directive
1878         in the Content Security Policy 2.0 spec., <http://www.w3.org/TR/2015/CR-CSP2-20150721/>.
1879
1880         Tests: http/tests/security/contentSecurityPolicy/embed-src-url-blocked.html
1881                http/tests/security/contentSecurityPolicy/embed-src-url-blocked2.html
1882                http/tests/security/contentSecurityPolicy/object-src-param-src-blocked2.html
1883                http/tests/security/contentSecurityPolicy/object-src-url-blocked2.html
1884
1885         * loader/SubframeLoader.cpp:
1886         (WebCore::SubframeLoader::isPluginContentAllowedByContentSecurityPolicy): Extracted from SubframeLoader::pluginIsLoadable().
1887         Checks if the plugin element is allowed by the Content Security Policy to load the URL and MIME type.
1888         (WebCore::SubframeLoader::pluginIsLoadable): Extract out the logic for determining if
1889         the plugin content is allowed to load by the Content Security Policy into SubframeLoader::isPluginContentAllowedByContentSecurityPolicy()
1890         and make use of this function.
1891         (WebCore::SubframeLoader::requestObject): Modified to call SubframeLoader::isPluginContentAllowedByContentSecurityPolicy()
1892         before loading plugin content into a sub frame. If the plugin content is not allowed to load then we
1893         mark the plugin as unavailable with the reason being that it was blocked by the Content Security Policy.
1894         * loader/SubframeLoader.h:
1895
1896 2016-03-06  Gavin Barraclough  <barraclough@apple.com>
1897
1898         Convert DOMTimer to std::chrono::milliseconds
1899         https://bugs.webkit.org/show_bug.cgi?id=155085
1900
1901         Reviewed by Andreas Kling.
1902
1903         DOMTimer currently uses a mix of millisecond (was int, now std::chrono) and second (as double)
1904         time values. Constant conversion back and forth is a complete mess. Stop that.
1905
1906         * dom/Document.cpp:
1907         (WebCore::Document::minimumTimerInterval):
1908         (WebCore::Document::timerAlignmentInterval):
1909         * dom/Document.h:
1910             - double -> std::chrono::milliseconds
1911         * dom/ScriptExecutionContext.cpp:
1912         (WebCore::ScriptExecutionContext::adjustMinimumTimerInterval):
1913         (WebCore::ScriptExecutionContext::minimumTimerInterval):
1914         (WebCore::ScriptExecutionContext::timerAlignmentInterval):
1915         * dom/ScriptExecutionContext.h:
1916             - double -> std::chrono::milliseconds
1917         * page/DOMTimer.cpp:
1918         (WebCore::DOMTimer::updateTimerIntervalIfNecessary):
1919         (WebCore::DOMTimer::intervalClampedToMinimum):
1920         (WebCore::DOMTimer::alignedFireTime):
1921         * page/DOMTimer.h:
1922             - double -> std::chrono::milliseconds
1923         * page/Page.cpp:
1924         (WebCore::Page::setTimerThrottlingState):
1925         (WebCore::Page::setTimerAlignmentIntervalIncreaseLimit):
1926         (WebCore::Page::updateDOMTimerAlignmentInterval):
1927         * page/Page.h:
1928             - double -> std::chrono::milliseconds
1929         * page/Settings.cpp:
1930         (WebCore::Settings::setNeedsAdobeFrameReloadingQuirk):
1931         (WebCore::Settings::setMinimumDOMTimerInterval):
1932         * page/Settings.h:
1933             - double -> std::chrono::milliseconds
1934         * page/SuspendableTimer.h:
1935         (WebCore::SuspendableTimer::startRepeating):
1936         (WebCore::SuspendableTimer::startOneShot):
1937         (WebCore::SuspendableTimer::repeatIntervalMS):
1938         (WebCore::SuspendableTimer::augmentFireInterval):
1939         (WebCore::SuspendableTimer::augmentRepeatInterval):
1940             - added std::chrono::milliseconds interface.
1941         * platform/Timer.cpp:
1942         (WebCore::TimerBase::setNextFireTime):
1943             - restructured for new alignedFireTime signatured, moved zero-delay handling to here.
1944               This change made because inside alignedFireTime fireTime will have already been truncated.
1945         * platform/Timer.h:
1946         (WebCore::TimerBase::msToSeconds):
1947         (WebCore::TimerBase::secondsToMS):
1948             - internal helper functions to bridge std::chrono::milliseconds to internal double.
1949         (WebCore::TimerBase::startRepeating):
1950         (WebCore::TimerBase::startOneShot):
1951         (WebCore::TimerBase::repeatIntervalMS):
1952         (WebCore::TimerBase::augmentFireInterval):
1953         (WebCore::TimerBase::augmentRepeatInterval):
1954             - expanded std::chrono::milliseconds interface.
1955         (WebCore::TimerBase::alignedFireTime):
1956             - changed to std::chrono::milliseconds, made return value Optional (null means no alignment).
1957         * testing/InternalSettings.cpp:
1958         (WebCore::InternalSettings::setMinimumTimerInterval):
1959         * testing/InternalSettings.h:
1960             - double -> std::chrono::milliseconds
1961
1962 2016-03-07  Andreas Kling  <akling@apple.com>
1963
1964         Make RenderStyle copy-on-write a bit less.
1965         <https://webkit.org/b/155106>
1966
1967         Reviewed by Antti Koivisto.
1968
1969         Add a cheesy SET_NESTED_VAR macro complement to SET_VAR so we can avoid copy-on-write
1970         detachment of nested RenderStyle substructures when the leaf value doesn't change.
1971
1972         I spotted about 300kB of these mistakes being made during PLT on iOS, most of them
1973         in the transformX setter.
1974
1975         * rendering/style/RenderStyle.h:
1976
1977 2016-03-07  Miguel Gomez  <magomez@igalia.com>
1978
1979         [TextureMapper] [BitmapTexturePool] Use appropriate list size when freeing textures
1980         https://bugs.webkit.org/show_bug.cgi?id=155105
1981
1982         Reviewed by Žan Doberšek.
1983
1984         Use appropriate list size when releasing the textures used as attachment.
1985         This is a fix for the patch to https://bugs.webkit.org/show_bug.cgi?id=154965.
1986
1987         No new tests because no new functionality was added.
1988
1989         * platform/graphics/texmap/BitmapTexturePool.cpp:
1990         (WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired):
1991
1992 2016-03-06  Benjamin Poulain  <bpoulain@apple.com>
1993
1994         [JSC] Improve codegen of Compare and Test
1995         https://bugs.webkit.org/show_bug.cgi?id=155055
1996
1997         Reviewed by Filip Pizlo.
1998
1999         * cssjit/FunctionCall.h:
2000         (WebCore::FunctionCall::callAndBranchOnCondition):
2001
2002 2016-03-06  Saam Barati  <sbarati@apple.com>
2003
2004         [[GetPrototypeOf]] should be a fully virtual method in the method table
2005         https://bugs.webkit.org/show_bug.cgi?id=155002
2006
2007         Reviewed by Filip Pizlo.
2008
2009         Change ::getPrototype(.) to ::prototype(.) in various places to prevent
2010         a naming conflict with JSC.
2011
2012         No new tests because no new functionality was added.
2013
2014         * bindings/js/JSDOMWindowShell.cpp:
2015         (WebCore::JSDOMWindowShell::setWindow):
2016         * bindings/js/JSImageConstructor.cpp:
2017         (WebCore::JSImageConstructor::initializeProperties):
2018         (WebCore::JSImageConstructor::prototypeForStructure):
2019         * bindings/js/WorkerScriptController.cpp:
2020         (WebCore::WorkerScriptController::initScript):
2021         * bindings/scripts/CodeGeneratorJS.pm:
2022         (GenerateHeader):
2023         (GenerateImplementation):
2024         (GenerateConstructorHelperMethods):
2025         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2026         (WebCore::JSTestActiveDOMObjectConstructor::initializeProperties):
2027         (WebCore::JSTestActiveDOMObject::createPrototype):
2028         (WebCore::JSTestActiveDOMObject::prototype):
2029         (WebCore::JSTestActiveDOMObject::getPrototype): Deleted.
2030         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
2031         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
2032         (WebCore::JSTestClassWithJSBuiltinConstructorConstructor::initializeProperties):
2033         (WebCore::JSTestClassWithJSBuiltinConstructor::createPrototype):
2034         (WebCore::JSTestClassWithJSBuiltinConstructor::prototype):
2035         (WebCore::JSTestClassWithJSBuiltinConstructor::getPrototype): Deleted.
2036         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h:
2037         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
2038         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::initializeProperties):
2039         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::createPrototype):
2040         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::prototype):
2041         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::getPrototype): Deleted.
2042         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
2043         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2044         (WebCore::JSTestCustomNamedGetterConstructor::initializeProperties):
2045         (WebCore::JSTestCustomNamedGetter::createPrototype):
2046         (WebCore::JSTestCustomNamedGetter::prototype):
2047         (WebCore::JSTestCustomNamedGetter::getPrototype): Deleted.
2048         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
2049         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2050         (WebCore::JSTestEventConstructorConstructor::initializeProperties):
2051         (WebCore::JSTestEventConstructor::createPrototype):
2052         (WebCore::JSTestEventConstructor::prototype):
2053         (WebCore::JSTestEventConstructor::getPrototype): Deleted.
2054         * bindings/scripts/test/JS/JSTestEventConstructor.h:
2055         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2056         (WebCore::JSTestEventTargetConstructor::initializeProperties):
2057         (WebCore::JSTestEventTarget::createPrototype):
2058         (WebCore::JSTestEventTarget::prototype):
2059         (WebCore::JSTestEventTarget::getPrototype): Deleted.
2060         * bindings/scripts/test/JS/JSTestEventTarget.h:
2061         * bindings/scripts/test/JS/JSTestException.cpp:
2062         (WebCore::JSTestExceptionConstructor::initializeProperties):
2063         (WebCore::JSTestException::createPrototype):
2064         (WebCore::JSTestException::prototype):
2065         (WebCore::JSTestException::getPrototype): Deleted.
2066         * bindings/scripts/test/JS/JSTestException.h:
2067         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2068         (WebCore::JSTestGenerateIsReachableConstructor::initializeProperties):
2069         (WebCore::JSTestGenerateIsReachable::createPrototype):
2070         (WebCore::JSTestGenerateIsReachable::prototype):
2071         (WebCore::JSTestGenerateIsReachable::getPrototype): Deleted.
2072         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
2073         * bindings/scripts/test/JS/JSTestInterface.cpp:
2074         (WebCore::JSTestInterfaceConstructor::initializeProperties):
2075         (WebCore::JSTestInterface::createPrototype):
2076         (WebCore::JSTestInterface::prototype):
2077         (WebCore::JSTestInterface::getPrototype): Deleted.
2078         * bindings/scripts/test/JS/JSTestInterface.h:
2079         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
2080         (WebCore::JSTestJSBuiltinConstructorConstructor::initializeProperties):
2081         (WebCore::JSTestJSBuiltinConstructor::createPrototype):
2082         (WebCore::JSTestJSBuiltinConstructor::prototype):
2083         (WebCore::JSTestJSBuiltinConstructor::getPrototype): Deleted.
2084         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
2085         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2086         (WebCore::JSTestMediaQueryListListenerConstructor::initializeProperties):
2087         (WebCore::JSTestMediaQueryListListener::createPrototype):
2088         (WebCore::JSTestMediaQueryListListener::prototype):
2089         (WebCore::JSTestMediaQueryListListener::getPrototype): Deleted.
2090         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
2091         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2092         (WebCore::JSTestNamedConstructorConstructor::initializeProperties):
2093         (WebCore::JSTestNamedConstructorNamedConstructor::initializeProperties):
2094         (WebCore::JSTestNamedConstructor::createPrototype):
2095         (WebCore::JSTestNamedConstructor::prototype):
2096         (WebCore::JSTestNamedConstructor::getPrototype): Deleted.
2097         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
2098         * bindings/scripts/test/JS/JSTestNode.cpp:
2099         (WebCore::JSTestNodeConstructor::initializeProperties):
2100         (WebCore::JSTestNode::createPrototype):
2101         (WebCore::JSTestNode::prototype):
2102         (WebCore::JSTestNode::getPrototype): Deleted.
2103         * bindings/scripts/test/JS/JSTestNode.h:
2104         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2105         (WebCore::JSTestNondeterministicConstructor::initializeProperties):
2106         (WebCore::JSTestNondeterministic::createPrototype):
2107         (WebCore::JSTestNondeterministic::prototype):
2108         (WebCore::JSTestNondeterministic::getPrototype): Deleted.
2109         * bindings/scripts/test/JS/JSTestNondeterministic.h:
2110         * bindings/scripts/test/JS/JSTestObj.cpp:
2111         (WebCore::JSTestObjConstructor::initializeProperties):
2112         (WebCore::JSTestObj::createPrototype):
2113         (WebCore::JSTestObj::prototype):
2114         (WebCore::JSTestObj::getPrototype): Deleted.
2115         * bindings/scripts/test/JS/JSTestObj.h:
2116         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2117         (WebCore::JSTestOverloadedConstructorsConstructor::initializeProperties):
2118         (WebCore::JSTestOverloadedConstructors::createPrototype):
2119         (WebCore::JSTestOverloadedConstructors::prototype):
2120         (WebCore::JSTestOverloadedConstructors::getPrototype): Deleted.
2121         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
2122         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
2123         (WebCore::JSTestOverrideBuiltinsConstructor::initializeProperties):
2124         (WebCore::JSTestOverrideBuiltins::createPrototype):
2125         (WebCore::JSTestOverrideBuiltins::prototype):
2126         (WebCore::JSTestOverrideBuiltins::getPrototype): Deleted.
2127         * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
2128         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2129         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::initializeProperties):
2130         (WebCore::JSTestSerializedScriptValueInterface::createPrototype):
2131         (WebCore::JSTestSerializedScriptValueInterface::prototype):
2132         (WebCore::JSTestSerializedScriptValueInterface::getPrototype): Deleted.
2133         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
2134         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2135         (WebCore::JSTestTypedefsConstructor::initializeProperties):
2136         (WebCore::JSTestTypedefs::createPrototype):
2137         (WebCore::JSTestTypedefs::prototype):
2138         (WebCore::JSTestTypedefs::getPrototype): Deleted.
2139         * bindings/scripts/test/JS/JSTestTypedefs.h:
2140         * bindings/scripts/test/JS/JSattribute.cpp:
2141         (WebCore::JSattributeConstructor::initializeProperties):
2142         (WebCore::JSattribute::createPrototype):
2143         (WebCore::JSattribute::prototype):
2144         (WebCore::JSattribute::getPrototype): Deleted.
2145         * bindings/scripts/test/JS/JSattribute.h:
2146         * bindings/scripts/test/JS/JSreadonly.cpp:
2147         (WebCore::JSreadonlyConstructor::initializeProperties):
2148         (WebCore::JSreadonly::createPrototype):
2149         (WebCore::JSreadonly::prototype):
2150         (WebCore::JSreadonly::getPrototype): Deleted.
2151         * bindings/scripts/test/JS/JSreadonly.h:
2152
2153 2016-03-06  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2154
2155         Enable DOM class create functions to take parameters in case of JSBuiltinConstructor
2156         https://bugs.webkit.org/show_bug.cgi?id=155022
2157
2158         Reviewed by Darin Adler.
2159
2160         Introducing JSDOMObjectInspector to check whether a given JS class is built-in (no DOM class).
2161         If that is not the case, the JS class wraps a DOM class.
2162         The inspector detects whether the DOM class create static method takes no parameter or some parameters.
2163         This is used in JSDOMConstructor.h to generate correctly the createJSObject functions needed by JSBuiltinConstructor.
2164
2165         Updated binding generator to not generate anymore createJSObject as it is handled directly in JSDOMConstructor.h.
2166
2167         Covered by existing tests.
2168
2169         * bindings/js/JSDOMConstructor.h:
2170         (WebCore::JSBuiltinConstructor<JSClass>::callConstructor):
2171         (WebCore::createJSObject):
2172         (WebCore::JSBuiltinConstructor<JSClass>::construct):
2173         * bindings/js/JSDOMWrapper.h:
2174         * bindings/js/JSKeyValueIterator.h: Taking benefit of JSClass::DOMWrapper type declaration.
2175         * bindings/js/JSReadableStreamPrivateConstructors.cpp:
2176         (WebCore::JSBuiltinReadableStreamReaderPrivateConstructor::initializeExecutable): Deleted.
2177         (WebCore::JSBuiltinReadableStreamControllerPrivateConstructor::initializeExecutable): Deleted.
2178         * bindings/scripts/CodeGeneratorJS.pm:
2179         (GenerateConstructorDefinition): Deleted.
2180         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
2181         (WebCore::JSTestClassWithJSBuiltinConstructorConstructor::prototypeForStructure): Deleted.
2182
2183 2016-03-06  Antti Koivisto  <antti@apple.com>
2184
2185         RenderTextControlSingleLine shouldn't mutate placeholder element inline style
2186         https://bugs.webkit.org/show_bug.cgi?id=155086
2187
2188         Reviewed by Andreas Kling.
2189
2190         Text field placeholder element is currently managed by changing its inline style
2191         from the host renderer based on the host style and state. Rendering poking
2192         into DOM is wrong.
2193
2194         * html/HTMLInputElement.cpp:
2195         (WebCore::HTMLInputElement::setRangeText):
2196         (WebCore::HTMLInputElement::shouldTruncateText):
2197
2198             Add a helper.
2199
2200         (WebCore::HTMLInputElement::createInnerTextStyle):
2201         * html/HTMLInputElement.h:
2202         * html/HTMLTextAreaElement.cpp:
2203         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
2204         (WebCore::HTMLTextAreaElement::placeholderElement):
2205         (WebCore::HTMLTextAreaElement::matchesReadWritePseudoClass):
2206         (WebCore::HTMLTextAreaElement::updatePlaceholderText):
2207
2208             Use the new shadow element.
2209
2210         * html/HTMLTextAreaElement.h:
2211         * html/HTMLTextFormControlElement.cpp:
2212         (WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
2213
2214             No more poking to inline style.
2215
2216         (WebCore::HTMLTextFormControlElement::setSelectionStart):
2217         * html/TextFieldInputType.cpp:
2218         (WebCore::TextFieldInputType::updatePlaceholderText):
2219
2220             Use the new shadow element.
2221
2222         * html/shadow/TextControlInnerElements.cpp:
2223         (WebCore::TextControlPlaceholderElement::TextControlPlaceholderElement):
2224
2225             Add a subclass for the placeholder element instead of just using div.
2226
2227         (WebCore::TextControlPlaceholderElement::customStyleForRenderer):
2228
2229             Compute style base on the host state and style.
2230
2231         (WebCore::SearchFieldResultsButtonElement::SearchFieldResultsButtonElement):
2232         * html/shadow/TextControlInnerElements.h:
2233         * rendering/RenderTextControlSingleLine.cpp:
2234         (WebCore::RenderTextControlSingleLine::styleDidChange):
2235
2236             No more setInlineStyleProperty.
2237             This now needs to trigger layout like it does with other inner elements.
2238
2239         (WebCore::RenderTextControlSingleLine::computeControlLogicalHeight):
2240         (WebCore::RenderTextControlSingleLine::autoscroll):
2241         (WebCore::RenderTextControlSingleLine::textShouldBeTruncated): Deleted.
2242         * rendering/RenderTextControlSingleLine.h:
2243
2244 2016-03-05  Ryosuke Niwa  <rniwa@webkit.org>
2245
2246         Add the support for upgrading custom elements in cloneNode
2247         https://bugs.webkit.org/show_bug.cgi?id=155062
2248
2249         Reviewed by Antti Koivisto.
2250
2251         Implement https://w3c.github.io/webcomponents/spec/custom/#upgrading and steps 6 through 11 in
2252         https://w3c.github.io/webcomponents/spec/custom/#htmlelement-constructor to support upgrading elements
2253         created by Node.prototype.cloneNode.
2254
2255         Tests: fast/custom-elements/lifecycle-callback-timing.html
2256                fast/custom-elements/upgrading/Node-cloneNode.html
2257
2258         * bindings/js/JSCustomElementInterface.cpp:
2259         (WebCore::JSCustomElementInterface::upgradeElement): Added. Implements
2260          https://w3c.github.io/webcomponents/spec/custom/#dfn-upgrade-a-custom-element
2261         (WebCore::JSCustomElementInterface::didUpgradeLastElementInConstructionStack): Added. Implements step 10
2262          "Replace the last entry in definition's construction stacka with an already constructed marker."
2263          in https://w3c.github.io/webcomponents/spec/custom/#dom-htmlelement-constructor
2264         * bindings/js/JSCustomElementInterface.h:
2265         (WebCore::JSCustomElementInterface::isUpgradingElement):
2266         (WebCore::JSCustomElementInterface::lastElementInConstructionStack):
2267         (WebCore::JSCustomElementInterface): Added m_constructionStack. This is the construction stack:
2268          https://w3c.github.io/webcomponents/spec/custom/#dfn-element-definition-construction-stack
2269         * bindings/js/JSDOMBinding.cpp:
2270         (WebCore::throwInvalidStateError): Added.
2271         * bindings/js/JSDOMBinding.h:
2272         * bindings/js/JSHTMLElementCustom.cpp:
2273         (WebCore::constructJSHTMLElement): Implement the upgrading case in:
2274          https://w3c.github.io/webcomponents/spec/custom/#htmlelement-constructor
2275         * dom/Document.cpp:
2276         (WebCore::createFallbackHTMLElement): Added. Enqueues upgrades of custom elements (enqueueElementUpgrade
2277          currently does nothing if there is no InvokesCustomElementLifecycleCallbacks; e.g. in other DOM APIs).
2278          This function implements https://w3c.github.io/webcomponents/spec/custom/#dfn-element-upgrade-algorithm
2279         (WebCore::Document::createElement):
2280         * dom/LifecycleCallbackQueue.cpp:
2281         (WebCore::LifecycleQueueItem::LifecycleQueueItem): Added a generic constructor.
2282         (WebCore::LifecycleQueueItem::invoke): Call upgradeElement when m_type is Type::ElementUpgrade.
2283         (WebCore::LifecycleCallbackQueue::enqueueElementUpgrade): Added.
2284         * dom/LifecycleCallbackQueue.h:
2285         * dom/Node.idl: Added InvokesCustomElementLifecycleCallbacks on cloneNode.
2286         * dom/make_names.pl:
2287         (printFactoryCppFile): Added a variant of createKnownElement which takes QualifiedName. Also directly call
2288          find(HTML|SVG|MathML)ElementConstructorFunction in createElement that takes AtomicString to avoid an extra
2289          function call.
2290         (printFactoryHeaderFile): Added a function declaration for createKnownElement that takes QualifiedName and
2291          outdented class and function declarations to match the modern code style guideline.
2292
2293 2016-03-05  Tim Horton  <timothy_horton@apple.com>
2294
2295         Create a DOMHTMLVideoElement when wrapping <video> elements
2296         https://bugs.webkit.org/show_bug.cgi?id=155084
2297         <rdar://problem/24997193>
2298
2299         Reviewed by Dan Bernstein.
2300
2301         * bindings/objc/DOM.mm:
2302         (WebCore::createElementClassMap):
2303         Add <video> to the mapping.
2304
2305 2016-03-05  Ryosuke Niwa  <rniwa@webkit.org>
2306
2307         Minor cleans up in custom elements' code per Darin's comments
2308         https://bugs.webkit.org/show_bug.cgi?id=155081
2309
2310         Reviewed by Darin Adler.
2311
2312         Cleanup per Darin's comments.
2313
2314         * dom/CustomElementDefinitions.cpp:
2315         (WebCore::CustomElementDefinitions::findInterface): Use get instead of explicitly checking against end().
2316         * dom/LifecycleCallbackQueue.h: Remove unecessary header includes.
2317
2318 2016-03-05  Sam Weinig  <sam@webkit.org>
2319
2320         Fix two minor typos from http://trac.webkit.org/changeset/197626 that were causing some test failures.
2321
2322         * html/Autofill.cpp:
2323         (WebCore::fieldNameMap):
2324         (WebCore::AutofillData::createFromHTMLFormControlElement):
2325
2326 2016-03-05  Chris Dumez  <cdumez@apple.com>
2327
2328         Consolidate RuntimeApplicationChecks and RuntimeApplicationChecksIOS
2329         https://bugs.webkit.org/show_bug.cgi?id=155035
2330
2331         Reviewed by Darin Adler.
2332
2333         Consolidate RuntimeApplicationChecks and RuntimeApplicationChecksIOS into
2334         one file. The following changes were made:
2335         - The checks now all rely on applicationBundleIdentifier(), which has the
2336           benefit of working in WK1 and WK2 UI/WebContent/Networking processes.
2337         - Use namespaces to distinguish Mac and iOS applications instead of relying
2338           on the method name. So, applicationIsIBooksForIOS() becomes
2339           IOSApplication::isIBooks().
2340         - Use NSBundle API on both iOS and Mac instead of using the CF API on Mac
2341           and the NS API on iOS.
2342
2343         * CMakeLists.txt:
2344         * WebCore.xcodeproj/project.pbxproj:
2345         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2346         (-[WebAccessibilityObjectWrapper _accessibilityWebDocumentView]):
2347         * bindings/js/JSDOMWindowBase.cpp:
2348         (WebCore::JSDOMWindowBase::commonVM):
2349         * bindings/js/JSLocationCustom.cpp:
2350         (WebCore::JSLocation::putDelegate):
2351         * html/HTMLMediaElement.cpp:
2352         * html/HTMLObjectElement.cpp:
2353         (WebCore::shouldNotPerformURLAdjustment):
2354         * html/MediaElementSession.cpp:
2355         * inspector/InspectorTimelineAgent.cpp:
2356         (WebCore::currentRunLoop):
2357         * loader/FrameLoader.cpp:
2358         (WebCore::FrameLoader::willLoadMediaElementURL):
2359         * loader/SubresourceLoader.cpp:
2360         (WebCore::SubresourceLoader::create):
2361         (WebCore::SubresourceLoader::startLoading):
2362         * loader/cache/CachedScript.cpp:
2363         (WebCore::CachedScript::shouldIgnoreHTTPStatusCodeErrors):
2364         * platform/RuntimeApplicationChecks.cpp: Removed.
2365         * platform/RuntimeApplicationChecks.h:
2366         * platform/RuntimeApplicationChecks.mm: Added.
2367         (WebCore::applicationBundleIdentifier):
2368         (WebCore::applicationBundleIsEqualTo):
2369         (WebCore::MacApplication::isSafari):
2370         (WebCore::MacApplication::isAppleMail):
2371         (WebCore::MacApplication::isIBooks):
2372         (WebCore::MacApplication::isITunes):
2373         (WebCore::MacApplication::isMicrosoftMessenger):
2374         (WebCore::MacApplication::isAdobeInstaller):
2375         (WebCore::MacApplication::isAOLInstantMessenger):
2376         (WebCore::MacApplication::isMicrosoftMyDay):
2377         (WebCore::MacApplication::isMicrosoftOutlook):
2378         (WebCore::MacApplication::isQuickenEssentials):
2379         (WebCore::MacApplication::isAperture):
2380         (WebCore::MacApplication::isVersions):
2381         (WebCore::MacApplication::isHRBlock):
2382         (WebCore::MacApplication::isSolidStateNetworksDownloader):
2383         (WebCore::MacApplication::isHipChat):
2384         (WebCore::IOSApplication::isMobileMail):
2385         (WebCore::IOSApplication::isMobileSafari):
2386         (WebCore::IOSApplication::isDumpRenderTree):
2387         (WebCore::IOSApplication::isMobileStore):
2388         (WebCore::IOSApplication::isWebApp):
2389         (WebCore::IOSApplication::isOkCupid):
2390         (WebCore::IOSApplication::isFacebook):
2391         (WebCore::IOSApplication::isDaijisenDictionary):
2392         (WebCore::IOSApplication::isNASAHD):
2393         (WebCore::IOSApplication::isTheEconomistOnIphone):
2394         (WebCore::IOSApplication::isWebProcess):
2395         (WebCore::IOSApplication::isIBooks):
2396         (WebCore::setApplicationBundleIdentifier):
2397         * platform/RuntimeApplicationChecksIOS.h: Removed.
2398         * platform/RuntimeApplicationChecksIOS.mm: Removed.
2399         * platform/audio/ios/AudioDestinationIOS.cpp:
2400         * platform/cf/URLCF.cpp:
2401         * platform/graphics/ca/cocoa/LayerFlushSchedulerMac.cpp:
2402         (WebCore::currentRunLoop):
2403         * platform/ios/PasteboardIOS.mm:
2404         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2405         * platform/ios/wak/WebCoreThread.mm:
2406         (WebThreadEnable):
2407         * platform/mac/WidgetMac.mm:
2408         (WebCore::Widget::paint):
2409         * platform/network/ios/QuickLook.mm:
2410         * platform/network/mac/ResourceHandleMac.mm:
2411         * rendering/RenderLayerBacking.cpp:
2412         (WebCore::RenderLayerBacking::needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack):
2413
2414 2016-03-05  Zalan Bujtas  <zalan@apple.com>
2415
2416         Make table collapsed borders subpixel aware.
2417         https://bugs.webkit.org/show_bug.cgi?id=150383
2418
2419         Reviewed by Simon Fraser.
2420
2421         This patch enables authors to 
2422         - set subpixel width on collapsed borders
2423         - and push those borders to subpixel positions.
2424
2425         Test: fast/table/collapsed-border-with-odd-pixel-width.html
2426
2427         * rendering/RenderTable.cpp:
2428         (WebCore::RenderTable::calcBorderStart):
2429         (WebCore::RenderTable::calcBorderEnd):
2430         (WebCore::RenderTable::outerBorderBefore):
2431         (WebCore::RenderTable::outerBorderAfter):
2432         (WebCore::RenderTable::outerBorderStart):
2433         (WebCore::RenderTable::outerBorderEnd):
2434         * rendering/RenderTableCell.cpp:
2435         (WebCore::RenderTableCell::borderHalfStart):
2436         (WebCore::RenderTableCell::borderHalfEnd):
2437         (WebCore::RenderTableCell::borderHalfBefore):
2438         (WebCore::RenderTableCell::borderHalfAfter):
2439         (WebCore::RenderTableCell::paintCollapsedBorders):
2440         * rendering/RenderTableSection.cpp:
2441         (WebCore::RenderTableSection::calcOuterBorderBefore):
2442         (WebCore::RenderTableSection::calcOuterBorderAfter):
2443         (WebCore::RenderTableSection::calcOuterBorderStart):
2444         (WebCore::RenderTableSection::calcOuterBorderEnd):
2445         * rendering/style/CollapsedBorderValue.h:
2446         (WebCore::CollapsedBorderValue::adjustedCollapsedBorderWidth):
2447
2448 2016-03-05  Sam Weinig  <sam@webkit.org>
2449
2450         Add support for processing the autofill field name out of form control elements ultimately to aid input methods
2451         <rdar://problem/23041180>
2452         https://bugs.webkit.org/show_bug.cgi?id=155079
2453
2454         Reviewed by Enrica Casucci.
2455
2456         Added additional cases to fast/forms/autocomplete-tokens.html.
2457
2458         * WebCore.xcodeproj/project.pbxproj:
2459         Add Autofill.h/cpp
2460
2461         * html/Autofill.cpp: Added.
2462         (WebCore::fieldNameMap):
2463         (WebCore::toAutofillFieldName):
2464         (WebCore::isContactToken):
2465         (WebCore::maxTokensForAutofillFieldCategory):
2466         (WebCore::AutofillData::createFromHTMLFormControlElement):
2467         * html/Autofill.h: Added.
2468         (WebCore::AutofillData::AutofillData):
2469         Refactored the autofill data processing algorithm into it's own file and added support
2470         returning not just the IDL-exposed autofill value but also the autofill field name. The
2471         code is structured simply enough that if we find a need for the hint set or scope information
2472         we could return it as well.
2473
2474         * html/HTMLFormControlElement.cpp:
2475         (WebCore::HTMLFormControlElement::autocomplete):
2476         (WebCore::HTMLFormControlElement::setAutocomplete):
2477         (WebCore::HTMLFormControlElement::autofillMantle):
2478         (WebCore::HTMLFormControlElement::autofillData):
2479         Use AutofillData to implement these.
2480
2481         * html/HTMLFormControlElement.h:
2482         Expose accessor for mantle and AutofillData.
2483
2484         * html/HTMLFormElement.cpp:
2485         (WebCore::HTMLFormElement::autocomplete):
2486         * html/HTMLFormElement.h:
2487         Switch to return an AtomicString as it will always
2488         return one of two known values.
2489
2490         * testing/Internals.cpp:
2491         (WebCore::Internals::autofillFieldName):
2492         * testing/Internals.h:
2493         * testing/Internals.idl:
2494         Add accessor of the field name for testing purposes.
2495
2496 2016-03-05  Ryosuke Niwa  <rniwa@webkit.org>
2497
2498         Build fix after r197612 (under ASAN/GuardMalloc).
2499
2500         * dom/CustomElementDefinitions.cpp:
2501         (WebCore::CustomElementDefinitions::findInterface):
2502
2503 2016-03-05  Michael Catanzaro  <mcatanzaro@igalia.com>
2504
2505         Unreviewed, fix GTK/EFL build after r197575 and add mandatory GnuTLS dependency
2506
2507         * PlatformEfl.cmake:
2508         * PlatformGTK.cmake:
2509
2510 2016-03-05  Simon Fraser  <simon.fraser@apple.com>
2511
2512         Add support for the object-position CSS property
2513         https://bugs.webkit.org/show_bug.cgi?id=122811
2514         rdar://problem/15836338
2515
2516         Reviewed by Sam Weinig.
2517
2518         Take object-position into account when rendering replaced elements.
2519         RenderReplaced::replacedContentRect() is the one place where we compute
2520         the content rect for replaced elements.
2521
2522         Also return false from foregroundIsKnownToBeOpaqueInRect() if we have
2523         any non-default object-position, as the foreground may no longer fill the box.
2524
2525         Tests: compositing/video/video-object-position.html
2526                fast/css/object-position/object-position-canvas.html
2527                fast/css/object-position/object-position-embed.html
2528                fast/css/object-position/object-position-img-svg.html
2529                fast/css/object-position/object-position-img.html
2530                fast/css/object-position/object-position-input-image.html
2531                fast/css/object-position/object-position-object.html
2532                fast/css/object-position/object-position-video-poster.html
2533
2534         * rendering/RenderImage.cpp:
2535         (WebCore::RenderImage::foregroundIsKnownToBeOpaqueInRect):
2536         * rendering/RenderReplaced.cpp:
2537         (WebCore::RenderReplaced::replacedContentRect):
2538
2539 2016-03-05  Simon Fraser  <simon.fraser@apple.com>
2540
2541         Add parsing support for object-position
2542         https://bugs.webkit.org/show_bug.cgi?id=155065
2543
2544         Reviewed by Sam Weinig.
2545         
2546         Add parsing support for object-position. This is the first property with
2547         CSS <position> values which does not have equivalent -x and -y shorthands,
2548         so we can store it as a new LengthPoint type.
2549         
2550         Per the CSS Values spec, bottom- and right-relative values are translated
2551         into calc() expressions, which are exposed via computed style. For example,
2552         "right 10px bottom" becomes "calc(100% - 10px) 100%". This also allows transitions
2553         between, say, "left 10px bottom" and "right 10px bottom".
2554
2555         Test: fast/css/object-position/parsing-object-position.html
2556
2557         * CMakeLists.txt:
2558         * WebCore.xcodeproj/project.pbxproj:
2559         * css/CSSComputedStyleDeclaration.cpp:
2560         (WebCore::ComputedStyleExtractor::propertyValue):
2561         * css/CSSParser.cpp:
2562         (WebCore::CSSParser::parseValue):
2563         * css/CSSPrimitiveValue.h:
2564         (WebCore::CSSPrimitiveValue::isPair):
2565         * css/CSSPropertyNames.in:
2566         * css/CSSValue.h:
2567         * css/StyleBuilderConverter.h:
2568         (WebCore::StyleBuilderConverter::convertLength):
2569         (WebCore::StyleBuilderConverter::convertTo100PercentMinusLength):
2570         (WebCore::StyleBuilderConverter::convertPositionComponent):
2571         (WebCore::StyleBuilderConverter::convertObjectPosition):
2572         * platform/LengthPoint.cpp: Added.
2573         (WebCore::operator<<):
2574         * platform/LengthPoint.h: Added.
2575         (WebCore::LengthPoint::LengthPoint):
2576         (WebCore::LengthPoint::operator==):
2577         (WebCore::LengthPoint::setX):
2578         (WebCore::LengthPoint::x):
2579         (WebCore::LengthPoint::setY):
2580         (WebCore::LengthPoint::y):
2581         (WebCore::LengthPoint::blend):
2582         * rendering/style/RenderStyle.cpp:
2583         (WebCore::RenderStyle::changeRequiresRepaint):
2584         * rendering/style/RenderStyle.h:
2585         * rendering/style/StyleRareNonInheritedData.cpp:
2586         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2587         (WebCore::StyleRareNonInheritedData::operator==):
2588         * rendering/style/StyleRareNonInheritedData.h:
2589
2590 2016-03-05  Joanmarie Diggs  <jdiggs@igalia.com>
2591
2592         AX: Implement missing/different accessibility API mappings for SVG
2593         https://bugs.webkit.org/show_bug.cgi?id=155034
2594
2595         Reviewed by Chris Fleizach.
2596
2597         Create an AccessibilitySVGElement class for the SVG-specific mappings;
2598         fix name and description mappings for ATK; add new AccessibilityRole
2599         types (SVGTextRole, SVGTSpanRole, SVGTextPathRole) and map them for
2600         ATK and AX API.
2601
2602         Tests: accessibility/w3c-svg-description-calculation.html
2603                accessibility/w3c-svg-elements-not-exposed.html
2604                accessibility/w3c-svg-name-calculation.html
2605                accessibility/w3c-svg-presentational-role.html
2606                accessibility/w3c-svg-roles.html
2607
2608         * CMakeLists.txt:
2609         * WebCore.xcodeproj/project.pbxproj:
2610         * accessibility/AXObjectCache.cpp:
2611         (WebCore::createFromRenderer):
2612         * accessibility/AccessibilityAllInOne.cpp:
2613         * accessibility/AccessibilityNodeObject.cpp:
2614         (WebCore::AccessibilityNodeObject::alternativeText): Deleted.
2615         (WebCore::AccessibilityNodeObject::accessibilityDescription): Deleted.
2616         * accessibility/AccessibilityObject.h:
2617         (WebCore::AccessibilityObject::isAccessibilitySVGElement):
2618         * accessibility/AccessibilityRenderObject.cpp:
2619         (WebCore::AccessibilityRenderObject::determineAccessibilityRole): Deleted.
2620         * accessibility/AccessibilitySVGElement.cpp: Added.
2621         (WebCore::AccessibilitySVGElement::AccessibilitySVGElement):
2622         (WebCore::AccessibilitySVGElement::~AccessibilitySVGElement):
2623         (WebCore::AccessibilitySVGElement::create):
2624         (WebCore::AccessibilitySVGElement::targetForUseElement):
2625         (WebCore::AccessibilitySVGElement::accessibilityText):
2626         (WebCore::AccessibilitySVGElement::accessibilityDescription):
2627         (WebCore::AccessibilitySVGElement::helpText):
2628         (WebCore::AccessibilitySVGElement::computeAccessibilityIsIgnored):
2629         (WebCore::AccessibilitySVGElement::inheritsPresentationalRole):
2630         (WebCore::AccessibilitySVGElement::determineAriaRoleAttribute):
2631         (WebCore::AccessibilitySVGElement::determineAccessibilityRole):
2632         * accessibility/AccessibilitySVGElement.h: Added.
2633         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2634         (webkitAccessibleGetName):
2635         (webkitAccessibleGetDescription):
2636         (atkRole):
2637         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2638         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
2639         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2640         (createAccessibilityRoleMap):
2641         * rendering/RenderObject.h:
2642         (WebCore::RenderObject::isSVGTSpan):
2643         * rendering/svg/RenderSVGTSpan.h:
2644
2645 2016-03-05  Yusuke Suzuki  <utatane.tea@gmail.com>
2646
2647         [ES6] Support Reflect.construct
2648         https://bugs.webkit.org/show_bug.cgi?id=147330
2649
2650         Reviewed by Saam Barati.
2651
2652         * Modules/plugins/QuickTimePluginReplacement.mm:
2653         (WebCore::QuickTimePluginReplacement::installReplacement):
2654         * bindings/js/CallbackFunction.cpp:
2655         (WebCore::checkFunctionOnlyCallback):
2656         * bindings/js/JSCallbackData.cpp:
2657         (WebCore::JSCallbackData::invokeCallback):
2658         * bindings/js/JSCustomElementInterface.cpp:
2659         (WebCore::JSCustomElementInterface::constructElement):
2660         (WebCore::JSCustomElementInterface::attributeChanged):
2661         * bindings/js/JSCustomXPathNSResolver.cpp:
2662         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
2663         * bindings/js/JSDOMBinding.cpp:
2664         (WebCore::callFunctionWithCurrentArguments):
2665         (WebCore::DOMConstructorObject::getCallData):
2666         * bindings/js/JSDOMConstructor.h:
2667         (WebCore::JSDOMConstructorNotConstructable::getCallData):
2668         (WebCore::JSDOMConstructor<JSClass>::getConstructData):
2669         (WebCore::JSDOMNamedConstructor<JSClass>::getConstructData):
2670         (WebCore::JSBuiltinConstructor<JSClass>::getConstructData):
2671         * bindings/js/JSDOMPromise.cpp:
2672         (WebCore::DeferredWrapper::callFunction):
2673         * bindings/js/JSDocumentCustom.cpp:
2674         (WebCore::JSDocument::defineElement):
2675         * bindings/js/JSErrorHandler.cpp:
2676         (WebCore::JSErrorHandler::handleEvent):
2677         * bindings/js/JSEventListener.cpp:
2678         (WebCore::JSEventListener::handleEvent):
2679         * bindings/js/JSHTMLAllCollectionCustom.cpp:
2680         (WebCore::JSHTMLAllCollection::getCallData):
2681         * bindings/js/JSHTMLDocumentCustom.cpp:
2682         (WebCore::JSHTMLDocument::open):
2683         * bindings/js/JSKeyValueIterator.h:
2684         (WebCore::keyValueIteratorForEach):
2685         * bindings/js/JSMainThreadExecStateInstrumentation.h:
2686         (WebCore::JSMainThreadExecState::instrumentFunctionCall):
2687         (WebCore::JSMainThreadExecState::instrumentFunctionConstruct):
2688         * bindings/js/JSMutationCallback.cpp:
2689         (WebCore::JSMutationCallback::call):
2690         * bindings/js/JSMutationObserverCustom.cpp:
2691         (WebCore::constructJSMutationObserver):
2692         * bindings/js/JSPluginElementFunctions.cpp:
2693         (WebCore::callPlugin):
2694         (WebCore::pluginElementGetCallData):
2695         * bindings/js/ScheduledAction.cpp:
2696         (WebCore::ScheduledAction::create):
2697         (WebCore::ScheduledAction::executeFunctionInContext):
2698         * bindings/objc/WebScriptObject.mm:
2699         (-[WebScriptObject callWebScriptMethod:withArguments:]):
2700         * bindings/scripts/CodeGeneratorJS.pm:
2701         (GenerateConstructorHelperMethods):
2702         * bindings/scripts/test/JS/JSFloat64Array.cpp:
2703         (WebCore::JSFloat64ArrayConstructor::getConstructData):
2704         * bindings/scripts/test/JS/JSTestInterface.cpp:
2705         (WebCore::JSTestInterfaceConstructor::getConstructData):
2706         * bridge/NP_jsobject.cpp:
2707         (_NPN_InvokeDefault):
2708         (_NPN_Invoke):
2709         (_NPN_Construct):
2710         * bridge/objc/objc_runtime.mm:
2711         (JSC::Bindings::ObjcFallbackObjectImp::getCallData):
2712         * bridge/runtime_method.cpp:
2713         (JSC::RuntimeMethod::getCallData):
2714         * bridge/runtime_object.cpp:
2715         (JSC::Bindings::RuntimeObject::getCallData):
2716         (JSC::Bindings::RuntimeObject::getConstructData):
2717         * html/HTMLMediaElement.cpp:
2718         (WebCore::HTMLMediaElement::updateCaptionContainer):
2719         (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
2720         (WebCore::HTMLMediaElement::getCurrentMediaControlsStatus):
2721         * html/HTMLPlugInImageElement.cpp:
2722         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
2723         * testing/Internals.cpp:
2724         (WebCore::Internals::isReadableStreamDisturbed):
2725
2726 2016-03-05  Ryosuke Niwa  <rniwa@webkit.org>
2727
2728         Fix the bindings test after r197611.
2729
2730         * bindings/scripts/test/TestObj.idl:
2731
2732 2016-03-05  Ryosuke Niwa  <rniwa@webkit.org>
2733
2734         Move QualifiedName from CustomElementInfo to JSCustomElementInterface
2735         https://bugs.webkit.org/show_bug.cgi?id=155061
2736
2737         Reviewed by Antti Koivisto.
2738
2739         Store QualifiedName of custom elements in JSCustomElementInterface instead of CustomElementInfo
2740         now that each interface is associated with exactly one custom element as of r197602.
2741
2742         No new tests since this is a refactoring.
2743
2744         * bindings/js/JSCustomElementInterface.cpp:
2745         (WebCore::JSCustomElementInterface::JSCustomElementInterface): Now takes QualifiedName as the
2746         first argument.
2747         * bindings/js/JSCustomElementInterface.h:
2748         (WebCore::JSCustomElementInterface::create):
2749         (WebCore::JSCustomElementInterface::name): Added.
2750         * bindings/js/JSDocumentCustom.cpp:
2751         (WebCore::JSDocument::defineElement):
2752         * bindings/js/JSHTMLElementCustom.cpp:
2753         (WebCore::constructJSHTMLElement): Use findInterface instead of the deleted findName.
2754         * dom/CustomElementDefinitions.cpp:
2755         (WebCore::CustomElementDefinitions::checkName):
2756         (WebCore::CustomElementDefinitions::addElementDefinition): Renamed from defineElement.
2757         (WebCore::CustomElementDefinitions::findInterface): Add a variant that finds the interface object
2758         by a JS constructor.
2759         (WebCore::CustomElementDefinitions::containsConstructor):
2760         (WebCore::CustomElementDefinitions::findName): Deleted.
2761         * dom/CustomElementDefinitions.h:
2762         (WebCore::CustomElementDefinitions::CustomElementInfo::CustomElementInfo): Deleted.
2763
2764 2016-03-04  Ryosuke Niwa  <rniwa@webkit.org>
2765
2766         Add basic support for attributeChanged lifecycle callback
2767         https://bugs.webkit.org/show_bug.cgi?id=155011
2768
2769         Reviewed by Antti Koivisto.
2770
2771         Add basic support for attributeChangedCallback in setAttribute, removeAttribute, setAttributeNS,
2772         remoteAttributeNS, setAttributeNode, and removeAttributeNS. There are many other DOM APIs that
2773         could modify attributes but we would annotate those APIs in a separate patch to limit the scope
2774         of this change.
2775
2776         In order to invoke the lifecycle callback right before returning to the author script, allocate
2777         an instance of CustomElementLifecycleProcessingStack in each of these functions' binding code.
2778         The stack object's destructor invokes all callbacks enqueued by the DOM API if there are any.
2779
2780         Spec: https://w3c.github.io/webcomponents/spec/custom/#dfn-attribute-changed-callback
2781
2782         Tests: fast/custom-elements/attribute-changed-callback.html
2783                fast/custom-elements/lifecycle-callback-timing.html
2784
2785         * CMakeLists.txt:
2786         * WebCore.xcodeproj/project.pbxproj:
2787         * bindings/js/JSCustomElementInterface.cpp:
2788         (WebCore::JSCustomElementInterface::attributeChanged): Added. Invokes attributeChangedCallback.
2789         * bindings/js/JSCustomElementInterface.h:
2790         * bindings/js/JSMainThreadExecState.h:
2791         (JSMainThreadNullState): Allocate an instance of CustomElementLifecycleProcessingStack in GObject
2792         and Objective-C binding code for consistency with JavaScript. We can't do this in JavaScript
2793         because there is no RAII object all functions, getters, and setters allocate (for a good reason).
2794
2795         * bindings/scripts/CodeGeneratorJS.pm:
2796         (GenerateImplementation): Generate an instance of CustomElementLifecycleProcessingStack when
2797         NeedsLifecycleProcessingStack is specified as an extended IDL attribute.
2798         * bindings/scripts/IDLAttributes.txt: Added NeedsLifecycleProcessingStack.
2799         * bindings/scripts/test/JS/JSTestObj.cpp:
2800         (WebCore::jsTestObjPrototypeFunctionMethodWithNeedsLifecycleProcessingStack):
2801         * bindings/scripts/test/TestObj.idl: Added a test for NeedsLifecycleProcessingStack.
2802
2803         * dom/DOMAllInOne.cpp:
2804         * dom/Element.cpp:
2805         (WebCore::Element::attributeChanged): Enqueue attributeChanged callback if the context object
2806         is a custom element and there is a CustomElementLifecycleProcessingStack allocated in the stack.
2807         * dom/Element.idl:
2808
2809         * dom/LifecycleCallbackQueue.cpp: Added.
2810         (WebCore::LifecycleQueueItem): Added.
2811         (WebCore::LifecycleQueueItem::LifecycleQueueItem): Added.
2812         (WebCore::LifecycleQueueItem::invoke): Added.
2813         (WebCore::LifecycleCallbackQueue::LifecycleCallbackQueue): Added.
2814         (WebCore::LifecycleCallbackQueue::~LifecycleCallbackQueue): Added.
2815         (WebCore::LifecycleCallbackQueue::enqueueAttributeChangedCallback): Added.
2816         (WebCore::LifecycleCallbackQueue::invokeAll): Added.
2817         (WebCore::CustomElementLifecycleProcessingStack::ensureCurrentQueue): Added. As noted in FIXME,
2818         the early exit in the code is necessary only because we haven't added NeedsLifecycleProcessingStack
2819         in all places. It should go away in a follow up patch.
2820         (WebCore::CustomElementLifecycleProcessingStack::processQueue): Added.
2821         * dom/LifecycleCallbackQueue.h: Added.
2822         (WebCore::CustomElementLifecycleProcessingStack): This is a light weight RAII object the binding
2823         code will allocate in order to queue up lifecycle callbacks. We don't use Ref or std::unique_ptr
2824         in m_queue to avoid generating the code to destruct LifecycleCallbackQueue everywhere.
2825         (WebCore::CustomElementLifecycleProcessingStack::CustomElementLifecycleProcessingStack): Added.
2826         (WebCore::CustomElementLifecycleProcessingStack::~CustomElementLifecycleProcessingStack): Added.
2827         (WebCore::CustomElementLifecycleProcessingStack::hasCurrentProcessingStack): Added.
2828
2829 2016-03-04  Carlos Garcia Campos  <cgarcia@igalia.com>
2830
2831         [GTK] Scrollbars are broken again with GTK+ >= 3.19.11
2832         https://bugs.webkit.org/show_bug.cgi?id=154890
2833
2834         Reviewed by Michael Catanzaro.
2835
2836         Scrollbar style properties have been deprecated in GTK+, and it
2837         seems that now deprecating means keeping the properties but
2838         ignoring them. So, this reworks the whole scrollbars theme code
2839         again to not cache style properties anymore, but retrieve them
2840         from the GtkStyleContext. Previous GTK+ versions still need to
2841         query the style properties, so I've added helper functions to get
2842         all the style properties with the ifdefs, trying to keep the
2843         common render code free of GTK+ versions ifdefs.
2844
2845         * platform/gtk/ScrollbarThemeGtk.cpp:
2846         (WebCore::ScrollbarThemeGtk::backButtonRect):
2847         (WebCore::ScrollbarThemeGtk::forwardButtonRect):
2848         (WebCore::ScrollbarThemeGtk::trackRect):
2849         (WebCore::ScrollbarThemeGtk::thumbRect):
2850         (WebCore::ScrollbarThemeGtk::paintTrackBackground):
2851         (WebCore::ScrollbarThemeGtk::paintThumb):
2852         (WebCore::ScrollbarThemeGtk::paint):
2853         (WebCore::ScrollbarThemeGtk::scrollbarThickness):
2854         (WebCore::ScrollbarThemeGtk::buttonSize):
2855         (WebCore::ScrollbarThemeGtk::stepperSize):
2856         (WebCore::ScrollbarThemeGtk::getStepperSpacing):
2857         (WebCore::ScrollbarThemeGtk::troughUnderSteppers):
2858         (WebCore::ScrollbarThemeGtk::minimumThumbLength):
2859         (WebCore::ScrollbarThemeGtk::thumbFatness):
2860         (WebCore::ScrollbarThemeGtk::getTroughBorder):
2861         (WebCore::ScrollbarThemeGtk::getOrCreateStyleContext):
2862         (WebCore::ScrollbarThemeGtk::updateThemeProperties):
2863         (WebCore::ScrollbarThemeGtk::handleMousePressEvent):
2864         * platform/gtk/ScrollbarThemeGtk.h:
2865
2866 2016-03-04  Brent Fulgham  <bfulgham@apple.com>
2867
2868         Resource load statistics are not honoring private browsing
2869         https://bugs.webkit.org/show_bug.cgi?id=155054
2870         <rdar://problem/24987873>
2871
2872         Reviewed by Andy Estes.
2873
2874         Modify the points where we capture resource load statistics to ignore
2875         loads made during private browsing. Do this by moving more of the logic
2876         about whether to gather statistics into the logging functions, passing
2877         the raw input types (frame, ResourceRequest, ResourceResponse) internally
2878         so that we don't pay any cost until we decide we want to gather data.s
2879
2880         * loader/DocumentLoader.cpp:
2881         (WebCore::DocumentLoader::willSendRequest): Revise for the new API on
2882         ResourceLoadObserver.
2883         * loader/ResourceLoadObserver.cpp:
2884         (WebCore::ResourceLoadObserver::logFrameNavigation): Revise signature and
2885         check for private browsing.
2886         (WebCore::ResourceLoadObserver::logSubresourceLoading): Ditto.
2887         (WebCore::ResourceLoadObserver::logUserInteraction): Ditto.
2888         * loader/ResourceLoadObserver.h:
2889         * loader/SubresourceLoader.cpp:
2890         (WebCore::SubresourceLoader::willSendRequestInternal): Ditto.
2891
2892 2016-03-04  Alex Christensen  <achristensen@webkit.org>
2893
2894         Fix file mime-types when using NetworkSession
2895         https://bugs.webkit.org/show_bug.cgi?id=155058
2896
2897         Reviewed by Andy Estes.
2898
2899         This fixes platform/mac/fast/loader/file-url-mimetypes-3.html
2900         and platform/mac/fast/loader/file-url-mimetypes.html.
2901
2902         * platform/network/mac/WebCoreURLResponse.h:
2903
2904 2016-03-04  Sam Weinig  <sam@webkit.org>
2905
2906         [WebKit2] Add WebKit2 equivalent of -[WebView _insertNewlineInQuotedContent]
2907         <rdar://problem/24943591>
2908         https://bugs.webkit.org/show_bug.cgi?id=155057
2909
2910         Reviewed by Tim Horton.
2911
2912         Move Editor::insertParagraphSeparatorInQuotedContent() into Editor.cpp
2913         and remove the duplicated code in EditorIOS.mm and EditorMac.mm.
2914
2915         * editing/Editor.cpp:
2916         (WebCore::Editor::insertParagraphSeparatorInQuotedContent):
2917         * editing/Editor.h:
2918         * editing/ios/EditorIOS.mm:
2919         (WebCore::Editor::insertParagraphSeparatorInQuotedContent): Deleted.
2920         * editing/mac/EditorMac.mm:
2921         (WebCore::Editor::insertParagraphSeparatorInQuotedContent): Deleted.
2922
2923 2016-03-04  Gavin Barraclough  <barraclough@apple.com>
2924
2925         Convert DOMTimer interval from int to std::chromo::milliseconds
2926         https://bugs.webkit.org/show_bug.cgi?id=155051
2927
2928         Speculative build fix.
2929
2930         * inspector/TimelineRecordFactory.cpp:
2931         (WebCore::TimelineRecordFactory::createTimerInstallData):
2932
2933 2016-03-04  Gavin Barraclough  <barraclough@apple.com>
2934
2935         Convert DOMTimer interval from int to std::chromo::milliseconds
2936         https://bugs.webkit.org/show_bug.cgi?id=155051
2937
2938         iOS build fix
2939
2940         * page/DOMTimer.cpp:
2941         (WebCore::DOMTimer::install):
2942
2943 2016-03-04  Ryosuke Niwa  <rniwa@webkit.org>
2944
2945         Update defineCustomElement according to the spec rewrite
2946         https://bugs.webkit.org/show_bug.cgi?id=155010
2947         <rdar://problem/24970878>
2948
2949         Reviewed by Chris Dumez.
2950
2951         Updated the implementation of defineCustomElement and HTMLConstructor per recent rewrite of the spec:
2952         https://w3c.github.io/webcomponents/spec/custom/#dom-document-defineelement
2953         https://w3c.github.io/webcomponents/spec/custom/#htmlelement-constructor
2954
2955         defineCustomElement is now called defineElement and we disallow defining multiple custom elements with
2956         a single class and throw an exception in defineElement.
2957
2958         Test: fast/custom-elements/Document-defineElement.html
2959
2960         * bindings/js/JSDocumentCustom.cpp:
2961         (WebCore::JSDocument::defineElement): Renamed from defineCustomElement. Throw an exception when the interface
2962         already defines another custom element. Also added FIXME's for missing steps.
2963
2964         * bindings/js/JSHTMLElementCustom.cpp:
2965         (WebCore::constructJSHTMLElement): Removed the support for specifying a tag name in the first argument when
2966         a single class defines multiple custom elements since that now results in an exception (in defineElement).
2967
2968         * dom/CustomElementDefinitions.cpp:
2969         (WebCore::CustomElementDefinitions::containsConstructor): Added.
2970         * dom/CustomElementDefinitions.h:
2971         * dom/Document.idl: Renamed defineCustomElement to defineElement.
2972         * html/HTMLElement.idl: Removed the optional tag name from the constructor.
2973
2974 2016-03-04  Tim Horton  <timothy_horton@apple.com>
2975
2976         Begin implementing <attachment> painting on iOS
2977         https://bugs.webkit.org/show_bug.cgi?id=155046
2978         <rdar://problem/24805991>
2979
2980         Reviewed by Enrica Casucci.
2981
2982         No new tests; there are existing tests that I will unskip and rebaseline
2983         in the near future.
2984
2985         * rendering/RenderThemeIOS.h:
2986         * rendering/RenderThemeIOS.mm:
2987         (WebCore::AttachmentInfo::addLine):
2988         (WebCore::AttachmentInfo::buildTitleLines):
2989         (WebCore::AttachmentInfo::buildSingleLine):
2990         (WebCore::getAttachmentProgress):
2991         (WebCore::iconForAttachment):
2992         (WebCore::AttachmentInfo::AttachmentInfo):
2993         (WebCore::RenderThemeIOS::attachmentIntrinsicSize):
2994         (WebCore::RenderThemeIOS::attachmentBaseline):
2995         (WebCore::paintAttachmentIcon):
2996         (WebCore::paintAttachmentText):
2997         (WebCore::paintAttachmentProgress):
2998         (WebCore::paintAttachmentBorder):
2999         (WebCore::RenderThemeIOS::paintAttachment):
3000         There are still a few missing pieces, but get <attachment> painting a bit on iOS.
3001         We will paint an icon, action, title, and subtitle - in that order - depending on what we have.
3002         The content is vertically and horizontally centered.
3003
3004 2016-03-04  Gavin Barraclough  <barraclough@apple.com>
3005
3006         Convert DOMTimer interval from int to std::chromo::milliseconds
3007         https://bugs.webkit.org/show_bug.cgi?id=155051
3008
3009         Reviewed by Ryosuke Niwa.
3010
3011         This change is pretty much mechanical, replacing int with std::chrono::milliseconds.
3012
3013         * inspector/InspectorInstrumentation.cpp:
3014         (WebCore::InspectorInstrumentation::willSendXMLHttpRequestImpl):
3015         (WebCore::InspectorInstrumentation::didInstallTimerImpl):
3016         * inspector/InspectorInstrumentation.h:
3017         (WebCore::InspectorInstrumentation::willSendXMLHttpRequest):
3018         (WebCore::InspectorInstrumentation::didInstallTimer):
3019         * inspector/InspectorTimelineAgent.cpp:
3020         (WebCore::InspectorTimelineAgent::didPaint):
3021         (WebCore::InspectorTimelineAgent::didInstallTimer):
3022         * inspector/InspectorTimelineAgent.h:
3023         * inspector/TimelineRecordFactory.cpp:
3024         (WebCore::TimelineRecordFactory::createGenericTimerData):
3025         (WebCore::TimelineRecordFactory::createTimerInstallData):
3026         * inspector/TimelineRecordFactory.h:
3027         * page/DOMTimer.cpp:
3028         (WebCore::shouldForwardUserGesture):
3029         (WebCore::DOMTimer::DOMTimer):
3030         (WebCore::DOMTimer::~DOMTimer):
3031         (WebCore::DOMTimer::install):
3032         (WebCore::DOMTimer::intervalClampedToMinimum):
3033         * page/DOMTimer.h:
3034         * page/DOMWindow.cpp:
3035         (WebCore::DOMWindow::setTimeout):
3036         (WebCore::DOMWindow::clearTimeout):
3037         (WebCore::DOMWindow::setInterval):
3038         (WebCore::DOMWindow::clearInterval):
3039         * workers/WorkerGlobalScope.cpp:
3040         (WebCore::WorkerGlobalScope::setTimeout):
3041         (WebCore::WorkerGlobalScope::clearTimeout):
3042         (WebCore::WorkerGlobalScope::setInterval):
3043         (WebCore::WorkerGlobalScope::clearInterval):
3044
3045 2016-03-03  Enrica Casucci  <enrica@apple.com>
3046
3047         Add a mechanism to customize the long press action.
3048         https://bugs.webkit.org/show_bug.cgi?id=154995
3049         rdar://problem/24823732
3050
3051         Reviewed by Tim Horton.
3052
3053         We want to allow long press on attachment elements as well.
3054
3055         * WebCore.xcodeproj/project.pbxproj: Making HTMLAttachmentElement.h private.
3056         * html/HTMLAttachmentElement.h: Adding exported functions.
3057
3058 2016-03-04  Andreas Kling  <akling@apple.com>
3059
3060         [iOS] Throw away compiled RegExp code when navigating to a new page.
3061         <https://webkit.org/b/155015>
3062
3063         Reviewed by Anders Carlsson.
3064
3065         Discard RegExp code when doing a top-level navigation.
3066         This frees up a couple hundred kilobytes on many pages.
3067
3068         * bindings/js/GCController.cpp:
3069         (WebCore::GCController::deleteAllRegExpCode):
3070         * bindings/js/GCController.h:
3071         * loader/FrameLoader.cpp:
3072         (WebCore::FrameLoader::commitProvisionalLoad):
3073
3074 2016-03-04  Simon Fraser  <simon.fraser@apple.com>
3075
3076         Use larger tiles when possible to reduce per-tile painting overhead
3077         https://bugs.webkit.org/show_bug.cgi?id=154985
3078
3079         Reviewed by Zalan Bujtas.
3080
3081         r197541 inadvertently missed FrameView changes that push scrollability data
3082         onto the TiledBacking, so didn't actually change behavior (hence the 512x512 tiles
3083         in the failing tests).
3084
3085         Also remove m_tileSizeAtLastRevalidate from TileGrid; it's replaced by a simpler test.
3086
3087         * page/FrameView.cpp:
3088         (WebCore::FrameView::addedOrRemovedScrollbar):
3089         * platform/graphics/ca/TileGrid.cpp:
3090         (WebCore::TileGrid::revalidateTiles):
3091         (WebCore::TileGrid::TileGrid): Deleted.
3092         * platform/graphics/ca/TileGrid.h:
3093
3094 2016-03-04  Simon Fraser  <simon.fraser@apple.com>
3095
3096         Use BoxExtent instead of EdgeSet in TileController
3097         https://bugs.webkit.org/show_bug.cgi?id=155040
3098
3099         Reviewed by Zalan Bujtas.
3100
3101         Remove EdgeSet, which was very similar to the existing BoxExtent, and use BoxExtent
3102         in TileController.
3103
3104         * WebCore.xcodeproj/project.pbxproj:
3105         * platform/graphics/EdgeSet.h: Removed.
3106         (WebCore::EdgeSet::EdgeSet): Deleted.
3107         (WebCore::EdgeSet::top): Deleted.
3108         (WebCore::EdgeSet::setTop): Deleted.
3109         (WebCore::EdgeSet::right): Deleted.
3110         (WebCore::EdgeSet::setRight): Deleted.
3111         (WebCore::EdgeSet::bottom): Deleted.
3112         (WebCore::EdgeSet::setBottom): Deleted.
3113         (WebCore::EdgeSet::left): Deleted.
3114         (WebCore::EdgeSet::setLeft): Deleted.
3115         (WebCore::EdgeSet::operator==): Deleted.
3116         (WebCore::EdgeSet::operator!=): Deleted.
3117         * platform/graphics/ca/TileController.cpp:
3118         (WebCore::TileController::setHasMargins):
3119         * platform/graphics/ca/TileController.h:
3120
3121 2016-03-04  Brent Fulgham  <bfulgham@apple.com>
3122
3123         [WK2] Gather resource load statistics
3124         https://bugs.webkit.org/show_bug.cgi?id=154278
3125         <rdar://problem/24702892>
3126
3127         Reviewed by Andy Estes.
3128
3129         Tested (now under WK2) by http/tests/navigation/statistics.html
3130
3131         Split part of the ResourceLoadObserver into a new class (ResourceLoadStatisticsStore)
3132         that manages the collection of ResourceLoadStatistic objects, and that can be used
3133         in the UIProcess without touching various WebProcess-specific WebCore classes.
3134
3135         Have the WebProcess only fire a message to the UIProcess if data has been modified. Otherwise,
3136         no messages should be sent. When new data is encountered, start a 5 second timer. If more
3137         data is found during this delay, just accumulate it. When the timer fires, all data is sent
3138         and the timer stops until a new batch of data arrives.
3139
3140         * CMakeLists.txt: Add the new ResourceLoadStatisticsStore class.
3141         * WebCore.xcodeproj/project.pbxproj: Adjust visibility of ResourceLoadStatistics header,
3142         and add new ResourceLoadStatisticsStore class.
3143         * loader/ResourceLoadObserver.cpp:
3144         (WebCore::ResourceLoadObserver::setResourceLoadStatisticsEnabled): Deleted.
3145         (WebCore::ResourceLoadObserver::resourceLoadStatisticsEnabled): Deleted.
3146         (WebCore::ResourceLoadObserver::setStatisticsStore): Added.
3147         (WebCore::ResourceLoadObserver::logFrameNavigation): Tell the ResourceLoadStatisticsStore to fire its 'data changed'
3148         handler if necessary.
3149         (WebCore::ResourceLoadObserver::logSubresourceLoading): Ditto.
3150         (WebCore::ResourceLoadObserver::logUserInteraction): Ditto.
3151         (WebCore::ResourceLoadObserver::statisticsForOrigin): Use new ResourceLoadStatisticsStore.
3152         (WebCore::ResourceLoadObserver::isPrevalentResource): Deleted.
3153         (WebCore::ResourceLoadObserver::resourceStatisticsForPrimaryDomain): Deleted.
3154         (WebCore::ResourceLoadObserver::writeDataToDisk): Deleted.
3155         (WebCore::ResourceLoadObserver::setStatisticsStorageDirectory): Deleted.
3156         (WebCore::ResourceLoadObserver::persistentStoragePath): Deleted.
3157         (WebCore::ResourceLoadObserver::readDataFromDiskIfNeeded): Deleted.
3158         (WebCore::ResourceLoadObserver::createDecoderFromDisk): Deleted.
3159         (WebCore::ResourceLoadObserver::writeEncoderToDisk): Deleted.
3160         * loader/ResourceLoadObserver.h:
3161         * loader/ResourceLoadStatistics.cpp:
3162         (WebCore::ResourceLoadStatistics::encode): Get rid of unneeded argument.
3163         (WebCore::ResourceLoadStatistics::decode): Ditto.
3164         (WebCore::mergeHashCountedSet): Added helper function.
3165         (WebCore::ResourceLoadStatistics::merge): Added.
3166         * loader/ResourceLoadStatistics.h:
3167         (WebCore::ResourceLoadStatistics::ResourceLoadStatistics):
3168         * loader/ResourceLoadStatisticsStore.cpp: Added.
3169         (WebCore::ResourceLoadStatisticsStore::create):
3170         (WebCore::ResourceLoadStatisticsStore::ResourceLoadStatisticsStore):
3171         (WebCore::ResourceLoadStatisticsStore::isPrevalentResource):
3172         (WebCore::ResourceLoadStatisticsStore::resourceStatisticsForPrimaryDomain):
3173         (WebCore::ResourceLoadStatisticsStore::writeDataToDisk):
3174         (WebCore::ResourceLoadStatisticsStore::setStatisticsStorageDirectory):
3175         (WebCore::ResourceLoadStatisticsStore::persistentStoragePath):
3176         (WebCore::ResourceLoadStatisticsStore::readDataFromDiskIfNeeded):
3177         (WebCore::ResourceLoadStatisticsStore::createDecoderFromDisk):
3178         (WebCore::ResourceLoadStatisticsStore::writeEncoderToDisk):
3179         (WebCore::ResourceLoadStatisticsStore::statisticsForOrigin):
3180         (WebCore::ResourceLoadStatisticsStore::takeStatistics):
3181         (WebCore::ResourceLoadStatisticsStore::mergeStatistics):
3182         (WebCore::ResourceLoadStatisticsStore::setNotificationCallback):
3183         (WebCore::ResourceLoadStatisticsStore::fireDataModificationHandler):
3184         * loader/ResourceLoadStatisticsStore.h: Added.
3185
3186 2016-03-04  Konstantin Tokarev  <annulen@yandex.ru>
3187
3188         Added missing override specifiers under Source/WebCore.
3189         https://bugs.webkit.org/show_bug.cgi?id=155021
3190
3191         Reviewed by Michael Catanzaro.
3192
3193         No new tests needed.
3194
3195         * bridge/NP_jsobject.cpp:
3196         * css/CSSStyleSheet.cpp:
3197         * dom/MutationObserver.cpp:
3198         * editing/DictationCommand.cpp:
3199         * editing/EditingStyle.cpp:
3200         * loader/EmptyClients.cpp:
3201         * loader/SinkDocument.cpp:
3202         * page/DOMWindow.cpp:
3203         * page/animation/CSSPropertyAnimation.cpp:
3204         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3205         Also added #if(SOUP) guard to
3206         ResourceHandleStreamingClient::getOrCreateReadBuffer
3207         because it is not an overridden method otherwise.
3208         * platform/text/LineEnding.cpp:
3209         * xml/parser/XMLDocumentParserLibxml2.cpp:
3210
3211 2016-03-04  Gavin Barraclough  <barraclough@apple.com>
3212
3213         Max out timer throttling immediately for pre-render pages
3214         https://bugs.webkit.org/show_bug.cgi?id=155038
3215
3216         Reviewed by Chris Dumez.
3217
3218         If a hidden page has never been visible, no need to gently ramp into throttling - treat it
3219         the same as a page that has been viewed, but has been in the background for a long time.
3220
3221         Why? The throttling mechanism scales with the amount of background work by shifting the
3222         limit - once all background pages have maxed out the limit, they should no longer be burden
3223         of the system. However the mechanism doesn't currently do anything to accelerate towards
3224         the limit based on the number of pages in the ramp up phase, and ramp up duration is
3225         proportional to limit (so ramping up to a high limit takes a long time). So if you quickly
3226         create a large number of hidden pages the system may be under excessive load for a while,
3227         as we slowly ramp up to a limit that will adequately constrain resource consumption.
3228         In cases where a large number of hidden pages are rapidly generated, many likely remain in
3229         the pre-render state, so this mitigation should typically help.
3230
3231         * page/Page.cpp:
3232         (WebCore::Page::updateDOMTimerAlignmentInterval):
3233             - if m_isPrerender then m_timerAlignmentInterval is set to the limit.
3234         (WebCore::Page::setIsPrerender):
3235             - When this changes updateDOMTimerAlignmentInterval().
3236
3237 2016-03-04  Gavin Barraclough  <barraclough@apple.com>
3238
3239         Unify determination of page timer alignment
3240         https://bugs.webkit.org/show_bug.cgi?id=155031
3241
3242         Reviewed by Chris Dumez.
3243
3244         Currently this is scattered throughout Page - sites that call setDOMTimerAlignmentInterval have
3245         to determine the correct alignment interval. Instead, replace setDOMTimerAlignmentInterval with
3246         updateDOMTimerAlignmentInterval, and unify the policy decision here.
3247
3248         * page/Page.cpp:
3249         (WebCore::Page::setTimerThrottlingState):
3250             - setDOMTimerAlignmentInterval -> updateDOMTimerAlignmentInterval
3251               Also, to simplify always record the timestamp when the state changes.
3252         (WebCore::Page::setTimerAlignmentIntervalIncreaseLimit):
3253             - setDOMTimerAlignmentInterval -> updateDOMTimerAlignmentInterval
3254         (WebCore::Page::updateDOMTimerAlignmentInterval):
3255             - Was setDOMTimerAlignmentInterval, now determines the new alignment value.
3256         (WebCore::Page::timerAlignmentIntervalIncreaseTimerFired):
3257             - setDOMTimerAlignmentInterval -> updateDOMTimerAlignmentInterval
3258         (WebCore::Page::setDOMTimerAlignmentInterval): Deleted.
3259             - Removed, became updateDOMTimerAlignmentInterval.
3260         * page/Page.h:
3261             - setDOMTimerAlignmentInterval -> updateDOMTimerAlignmentInterval
3262               m_timerThrottlingEnabledTime -> m_timerThrottlingStateLastChangedTime
3263
3264 2016-03-04  Simon Fraser  <simon.fraser@apple.com>
3265
3266         Fix crash seen in iOS simulator tests
3267         https://bugs.webkit.org/show_bug.cgi?id=155030
3268
3269         Reviewed by Tim Horton.
3270
3271         owningGraphicsLayer() can be null when the tileSizeChangeTimer fires, so null check
3272         it and return, as we do for the tileRevalidationTimer.
3273
3274         * platform/graphics/ca/TileController.cpp:
3275         (WebCore::TileController::tileSizeChangeTimerFired):
3276
3277 2016-03-04  Alex Christensen  <achristensen@webkit.org>
3278
3279         Remove vcxproj build system
3280         https://bugs.webkit.org/show_bug.cgi?id=154388
3281
3282         Rubber-stamped by Brent Fulgham.
3283
3284         * WebCore.vcxproj/WebCore.submit.sln: Removed.
3285         * WebCore.vcxproj/WebCore.vcxproj: Removed.
3286         * WebCore.vcxproj/WebCore.vcxproj.filters: Removed.
3287         * WebCore.vcxproj/WebCoreCFNetwork.props: Removed.
3288         * WebCore.vcxproj/WebCoreCG.props: Removed.
3289         * WebCore.vcxproj/WebCoreCURL.props: Removed.
3290         * WebCore.vcxproj/WebCoreCairo.props: Removed.
3291         * WebCore.vcxproj/WebCoreCommon.props: Removed.
3292         * WebCore.vcxproj/WebCoreDebug.props: Removed.
3293         * WebCore.vcxproj/WebCoreDebugWinCairo.props: Removed.
3294         * WebCore.vcxproj/WebCoreGenerated.make: Removed.
3295         * WebCore.vcxproj/WebCoreGenerated.vcxproj: Removed.
3296         * WebCore.vcxproj/WebCoreGenerated.vcxproj.filters: Removed.
3297         * WebCore.vcxproj/WebCoreGeneratedCommon.props: Removed.
3298         * WebCore.vcxproj/WebCoreGeneratedDebug.props: Removed.
3299         * WebCore.vcxproj/WebCoreGeneratedDebugWinCairo.props: Removed.
3300         * WebCore.vcxproj/WebCoreGeneratedProduction.props: Removed.
3301         * WebCore.vcxproj/WebCoreGeneratedRelease.props: Removed.
3302         * WebCore.vcxproj/WebCoreGeneratedReleaseWinCairo.props: Removed.
3303         * WebCore.vcxproj/WebCoreGeneratedWinCairo.make: Removed.
3304         * WebCore.vcxproj/WebCoreGeneratedWinCairoCommon.props: Removed.
3305         * WebCore.vcxproj/WebCoreIncludeCommon.props: Removed.
3306         * WebCore.vcxproj/WebCoreMediaQT.props: Removed.
3307         * WebCore.vcxproj/WebCorePostBuild.cmd: Removed.
3308         * WebCore.vcxproj/WebCorePreBuild.cmd: Removed.
3309         * WebCore.vcxproj/WebCoreProduction.props: Removed.
3310         * WebCore.vcxproj/WebCoreQuartzCore.props: Removed.
3311         * WebCore.vcxproj/WebCoreRelease.props: Removed.
3312         * WebCore.vcxproj/WebCoreReleaseWinCairo.props: Removed.
3313         * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Removed.
3314         * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Removed.
3315         * WebCore.vcxproj/WebCoreTestSupportCommon.props: Removed.
3316         * WebCore.vcxproj/WebCoreTestSupportDebug.props: Removed.
3317         * WebCore.vcxproj/WebCoreTestSupportDebugWinCairo.props: Removed.
3318         * WebCore.vcxproj/WebCoreTestSupportProduction.props: Removed.
3319         * WebCore.vcxproj/WebCoreTestSupportRelease.props: Removed.
3320         * WebCore.vcxproj/WebCoreTestSupportReleaseWinCairo.props: Removed.
3321         * WebCore.vcxproj/build-generated-files.pl: Removed.
3322         * WebCore.vcxproj/copyForwardingHeaders.cmd: Removed.
3323         * WebCore.vcxproj/copyWebCoreResourceFiles.cmd: Removed.
3324         * WebCore.vcxproj/migrate-scripts.pl: Removed.
3325
3326 2016-03-04  Brady Eidson  <beidson@apple.com>
3327
3328         Remove use of deprecated sqlite3_expired
3329         https://bugs.webkit.org/show_bug.cgi?id=155025
3330
3331         Reviewed by Tim Horton.
3332
3333         Since we exclusively use sqlite3_prepare_v2 and don't use sqlite3_prepare,
3334         manually checking for expired statements is not necessary.
3335
3336         * platform/sql/SQLiteStatement.cpp:
3337         (WebCore::SQLiteStatement::isExpired): Null check the statement, but don't bother
3338           with sqlite3_expired.
3339
3340 2016-03-04  Daniel Bates  <dabates@apple.com>
3341
3342         Move CryptoDigest to WebCore/platform
3343         https://bugs.webkit.org/show_bug.cgi?id=155008
3344         <rdar://problem/24969787>
3345
3346         Reviewed by Brent Fulgham.
3347
3348         CryptoDigest provides a platform-independent interface for interacting with platform-
3349         specific cryptographic hashing services. We currently make use of this code as part
3350         of the implementation of Web Crypto. This code will also be beneficial as part of
3351         implementing support for Content Security Policy inline script and inline stylesheet
3352         hashes. We should move CryptoDigest to WebCore/platform to convey that it a general
3353         purpose platform abstraction.
3354
3355         * CMakeLists.txt: Add include directory WebCore/platform/crypto.
3356         * PlatformEfl.cmake: Add file platform/crypto/gnutls/CryptoDigestGnuTLS.cpp and
3357         remove file crypto/gnutls/CryptoDigestGnuTLS.cpp.
3358         * PlatformGTK.cmake: Ditto.
3359         * PlatformMac.cmake: Add file platform/crypto/mac/CryptoDigestMac.cpp and
3360         remove file crypto/mac/CryptoDigestMac.cpp.
3361         * WebCore.xcodeproj/project.pbxproj:
3362         * crypto/algorithms/CryptoAlgorithmSHA1.cpp:
3363         (WebCore::CryptoAlgorithmSHA1::digest): Substitute "CryptoDigest::Algorithm" for "CryptoAlgorithmIdentifier".
3364         * crypto/algorithms/CryptoAlgorithmSHA224.cpp:
3365         (WebCore::CryptoAlgorithmSHA224::digest): Ditto.
3366         * crypto/algorithms/CryptoAlgorithmSHA256.cpp:
3367         (WebCore::CryptoAlgorithmSHA256::digest): Ditto.
3368         * crypto/algorithms/CryptoAlgorithmSHA384.cpp:
3369         (WebCore::CryptoAlgorithmSHA384::digest): Ditto.
3370         * crypto/algorithms/CryptoAlgorithmSHA512.cpp:
3371         (WebCore::CryptoAlgorithmSHA512::digest): Ditto.
3372         * crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
3373         (WebCore::getCryptoDigestAlgorithm): Converts a CryptoAlgorithmIdentifier enumerator to a
3374         CryptoDigest::Algorithm enumerator, if applicable.
3375         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign): Write in terms of WebCore::getCryptoDigestAlgorithm().
3376         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify): Ditto.
3377         * platform/crypto/CryptoDigest.h: Renamed from Source/WebCore/crypto/CryptoDigest.h. Also added enum CryptoDigest::Algorithm
3378         and changed constructor to take this enum.
3379         * platform/crypto/gnutls/CryptoDigestGnuTLS.cpp: Renamed from Source/WebCore/crypto/gnutls/CryptoDigestGnuTLS.cpp.
3380         (WebCore::CryptoDigest::CryptoDigest): Substitute "CryptoDigest::Algorithm" for "CryptoAlgorithmIdentifier".
3381         (WebCore::CryptoDigest::~CryptoDigest): Ditto.
3382         (WebCore::CryptoDigest::create): Ditto.
3383         (WebCore::CryptoDigest::addBytes): Ditto.
3384         (WebCore::CryptoDigest::computeHash): Ditto.
3385         * platform/crypto/mac/CryptoDigestMac.cpp: Renamed from Source/WebCore/crypto/mac/CryptoDigestMac.cpp.
3386         (WebCore::toSHA1Context): Ditto.
3387         (WebCore::toSHA224Context): Ditto.
3388         (WebCore::toSHA256Context): Ditto.
3389         (WebCore::toSHA384Context): Ditto.
3390         (WebCore::toSHA512Context): Ditto.
3391         (WebCore::CryptoDigest::CryptoDigest): Ditto.
3392         (WebCore::CryptoDigest::~CryptoDigest): Ditto.
3393         (WebCore::CryptoDigest::create): Ditto.
3394         (WebCore::CryptoDigest::addBytes): Ditto.
3395         (WebCore::CryptoDigest::computeHash): Ditto.
3396
3397 2016-03-04  Myles C. Maxfield  <mmaxfield@apple.com>
3398
3399         Whitespace causes font-variant: all-small-caps to synthesize
3400         https://bugs.webkit.org/show_bug.cgi?id=155004
3401         <rdar://problem/24630796>
3402
3403         Reviewed by Darin Adler.
3404
3405         Many fonts (such as Avenir Next) don't report to support whitespace characters under
3406         smcp or c2sc. Previously, we were using this as a signal to synthesize small caps
3407         instead of true small caps. However, a better solution is for whitespace to never
3408         cause synthesis with all-small-caps.
3409