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