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