Pass String as reference in more places
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-05-13  Joseph Pecoraro  <pecoraro@apple.com>
2
3         Pass String as reference in more places
4         https://bugs.webkit.org/show_bug.cgi?id=144769
5
6         Reviewed by Daniel Bates.
7
8         * bindings/js/SerializedScriptValue.cpp:
9         (WebCore::CloneSerializer::dumpString):
10         (WebCore::CloneSerializer::dumpStringObject):
11         * dom/DocumentMarkerController.cpp:
12         (WebCore::DocumentMarkerController::addMarker):
13         * dom/DocumentMarkerController.h:
14         * inspector/InspectorApplicationCacheAgent.cpp:
15         (WebCore::InspectorApplicationCacheAgent::assertFrameWithDocumentLoader):
16         * inspector/InspectorApplicationCacheAgent.h:
17         * inspector/InspectorNodeFinder.cpp:
18         (WebCore::stripCharacters):
19         (WebCore::InspectorNodeFinder::InspectorNodeFinder):
20         * inspector/InspectorNodeFinder.h:
21
22 2015-05-13  Timothy Horton  <timothy_horton@apple.com>
23
24         View scale changes are temporarily lost after restoring a page from the page cache
25         https://bugs.webkit.org/show_bug.cgi?id=144934
26
27         Reviewed by Brady Eidson.
28
29         * history/CachedPage.cpp:
30         (WebCore::CachedPage::CachedPage):
31         (WebCore::CachedPage::restore):
32         (WebCore::CachedPage::clear):
33         * history/CachedPage.h:
34         (WebCore::CachedPage::markForDeviceOrPageScaleChanged): Renamed.
35         * history/PageCache.cpp:
36         (WebCore::PageCache::markPagesForDeviceOrPageScaleChanged): Renamed.
37         * history/PageCache.h:
38         Rename PageCache/CachedPage methods to make it more clear that they
39         will eventually result in calling deviceOrPageScaleFactorChanged().
40         Also, use modern initialization for CachedPage members.
41
42         * loader/HistoryController.cpp:
43         (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
44         (WebCore::HistoryController::restoreScrollPositionAndViewState):
45         Store the pageScaleFactor on HistoryItem with the view scale factored out,
46         because the view scale can change while the page is in the page cache, and
47         WebCore needs a way - without consulting with WebKit2 - to apply the changed
48         view scale to the cached page scale.
49
50         * page/Page.cpp:
51         (WebCore::Page::setViewScaleFactor):
52         (WebCore::Page::setDeviceScaleFactor):
53         * page/Page.h:
54         (WebCore::Page::viewScaleFactor):
55         Keep track of the viewScaleFactor, and mark all pages in the page cache
56         as needing to call deviceOrPageScaleFactorChanged and do a full style recalc
57         when they come back from the page cache.
58
59         For now, we expect all callers of setPageScaleFactor (including WebKit2 and
60         HistoryController) to multiply the viewScale in manually, to avoid the
61         significant amount of change in WebCore that would be required to keep them
62         totally separately.
63
64 2015-05-12  Zan Dobersek  <zdobersek@igalia.com>
65
66         Reduce TransformationMatrix copies in MatrixTransformOperation, Matrix3DTransformOperation
67         https://bugs.webkit.org/show_bug.cgi?id=144797
68
69         Reviewed by Darin Adler.
70
71         Using std::swap() on TransformationMatrix objects which don't
72         provide move constructors will result in copies.
73
74         Instead, use a helper function in both MatrixTransformOperation
75         and Matrix3DTransformOperation that calls TransformationMatrix::blend()
76         and returns the new Matrix(3D)TransformOperation object, and call it
77         with fromT and toT arguments switched when blending to identity.
78
79         * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
80         (WebCore::createOperation):
81         (WebCore::Matrix3DTransformOperation::blend):
82         * platform/graphics/transforms/Matrix3DTransformOperation.h: No need
83         to copy the m_matrix member, it won't change when passed to
84         TransformationMatrix::multiply().
85         * platform/graphics/transforms/MatrixTransformOperation.cpp:
86         (WebCore::createOperation):
87         (WebCore::MatrixTransformOperation::blend):
88
89 2015-05-12  Carlos Garcia Campos  <cgarcia@igalia.com>
90
91         [EGL][X11] XPixmap created in GLContextEGL::createPixmapContext() is leaked
92         https://bugs.webkit.org/show_bug.cgi?id=144909
93
94         Reviewed by Sergio Villar Senin and Žan Doberšek.
95
96         The pixmap is created and passed to eglCreatePixmapSurface(), but
97         never released. eglCreatePixmapSurface() doesn't take the
98         ownership of the pixmap, so we should explicitly free it when the
99         GLContextEGL is destroyed.
100
101         * platform/graphics/egl/GLContextEGL.cpp:
102         (WebCore::GLContextEGL::createPixmapContext): Use XUniquePixmap
103         and transfer the ownership to the context by using the new
104         constructor that receives a XUniquePixmap&&.
105         (WebCore::GLContextEGL::createContext): createPixmapContext() is
106         now only defined for X11.
107         (WebCore::GLContextEGL::GLContextEGL): New constructor that
108         receives a XUniquePixmap&&.
109         * platform/graphics/egl/GLContextEGL.h: Add new constructor and
110         initialize the cairo device when defined to simplify constructors.
111
112 2015-05-12  Sungmann Cho  <sungmann.cho@navercorp.com>
113
114         Reindent DIBPixelData.h for consistency.
115         https://bugs.webkit.org/show_bug.cgi?id=144942
116
117         Reviewed by Darin Adler.
118
119         No new tests, no behavior change.
120
121         * platform/graphics/win/DIBPixelData.h:
122         (WebCore::DIBPixelData::DIBPixelData):
123         (WebCore::DIBPixelData::buffer):
124         (WebCore::DIBPixelData::bufferLength):
125         (WebCore::DIBPixelData::size):
126         (WebCore::DIBPixelData::bytesPerRow):
127         (WebCore::DIBPixelData::bitsPerPixel):
128
129 2015-05-12  Commit Queue  <commit-queue@webkit.org>
130
131         Unreviewed, rolling out r184224.
132         https://bugs.webkit.org/show_bug.cgi?id=144946
133
134         Made inspector/page/main-frame-resource.html assert every time
135         (Requested by ap on #webkit).
136
137         Reverted changeset:
138
139         "Web Inspector: REGRESSION (r181625): Timeline recording
140         started from console.profile is always empty"
141         https://bugs.webkit.org/show_bug.cgi?id=144882
142         http://trac.webkit.org/changeset/184224
143
144 2015-05-12  Jer Noble  <jer.noble@apple.com>
145
146         [Mac] Hang in MediaPlayerPrivateAVFoundationObjC::audioSourceProvider() - 'tracks' property not yet loaded
147         https://bugs.webkit.org/show_bug.cgi?id=144937
148
149         Reviewed by Eric Carlson.
150
151         Querying for the -[AVAsset tracks] property blocks for network loading; and could
152         block forever if the asset in question is not reachable. Add a "safe" mechanism for
153         querying the list of audible tracks, and use that when providing the audioSourceProvider()
154         with an audible track.
155
156         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
157         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
158         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
159         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
160         (WebCore::MediaPlayerPrivateAVFoundationObjC::audioSourceProvider):
161         (WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyClosedCaptionsTracks):
162         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeAVAssetTracksForAudibleMedia):
163
164 2015-05-12  Ryosuke Niwa  <rniwa@webkit.org>
165
166         Mac build fix after r184228.
167
168         * bindings/scripts/CodeGeneratorJS.pm:
169
170 2015-05-12  Simon Fraser  <simon.fraser@apple.com>
171
172         Turn antialiased font dilation off by default
173         https://bugs.webkit.org/show_bug.cgi?id=144940
174         rdar://problem/20923031
175
176         Reviewed by Sam Weinig.
177
178         Turn antialised font dilation off by default.
179
180         * page/Settings.cpp:
181         (WebCore::Settings::Settings):
182         * platform/graphics/FontCascade.cpp:
183
184 2015-05-12  Alex Christensen  <achristensen@webkit.org>
185
186         Don't export all JS bindings classes.
187         https://bugs.webkit.org/show_bug.cgi?id=144932
188
189         Reviewed by Dan Bernstein.
190
191         This change is good if it compiles and links successfully.
192
193         * bindings/scripts/CodeGeneratorJS.pm:
194         (ExportLabelForClass):
195         Add a list of the JS bindings classes that need WEBCORE_EXPORT to prevent exporting too many symbols from WebCore.
196         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
197         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
198         * bindings/scripts/test/JS/JSTestEventConstructor.h:
199         * bindings/scripts/test/JS/JSTestEventTarget.h:
200         * bindings/scripts/test/JS/JSTestException.h:
201         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
202         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
203         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
204         * bindings/scripts/test/JS/JSTestNode.h:
205         * bindings/scripts/test/JS/JSTestNondeterministic.h:
206         * bindings/scripts/test/JS/JSTestObj.h:
207         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
208         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
209         * bindings/scripts/test/JS/JSTestTypedefs.h:
210         * bindings/scripts/test/JS/JSattribute.h:
211         * bindings/scripts/test/JS/JSreadonly.h:
212         Update bindings tests to remove WEBCORE_EXPORT from most of the tests,
213         but keep one test with WEBCORE_EXPORT and one test with WEBCORE_TESTSUPPORT_EXPORT.
214
215 2015-05-12  Brent Fulgham  <bfulgham@apple.com>
216
217         [Win] Update DXSDK_DIR settings for build system.
218
219         Unreviewed build fix.
220
221         * WebCore.vcxproj/WebCore.proj: Add DXSDK_DIR definition for builder.
222
223 2015-05-12  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
224
225         Return Ref instead of PassRefPtr in create() factory functions of WebCore/dom
226         https://bugs.webkit.org/show_bug.cgi?id=144904
227
228         Reviewed by Andreas Kling.
229
230         We return Ref when we're sure if pointer can't be null. If not, we use RefPtr instead PassRefPtr.
231
232         No new tests, no behavior changes.
233
234         * dom/AutocompleteErrorEvent.h:
235         * dom/DOMNamedFlowCollection.h:
236         (WebCore::DOMNamedFlowCollection::create):
237         * dom/MessageChannel.h:
238         (WebCore::MessageChannel::create):
239         * dom/MessagePort.h:
240         * dom/MutationObserver.cpp:
241         (WebCore::MutationObserver::create):
242         * dom/MutationObserver.h:
243         * dom/NamedFlowCollection.h:
244         * dom/NodeFilter.h:
245         (WebCore::NodeFilter::create):
246         * dom/NodeIterator.h:
247         (WebCore::NodeIterator::create):
248         * dom/ProcessingInstruction.cpp:
249         (WebCore::ProcessingInstruction::create):
250         * dom/ProcessingInstruction.h:
251         * dom/ScriptedAnimationController.h:
252         (WebCore::ScriptedAnimationController::create):
253         * dom/SecurityPolicyViolationEvent.h:
254         * dom/StaticNodeList.h:
255         * dom/TemplateContentDocumentFragment.h:
256         * dom/Touch.cpp:
257         (WebCore::Touch::cloneWithNewTarget):
258         * dom/Touch.h:
259         (WebCore::Touch::create):
260         * dom/TouchEvent.h:
261         * dom/TouchList.h:
262         (WebCore::TouchList::create):
263         * dom/TreeWalker.h:
264         (WebCore::TreeWalker::create):
265         * dom/WebKitNamedFlow.cpp:
266         (WebCore::WebKitNamedFlow::create):
267         * dom/WebKitNamedFlow.h:
268         * dom/default/PlatformMessagePortChannel.cpp:
269         (WebCore::PlatformMessagePortChannel::create):
270         * dom/default/PlatformMessagePortChannel.h:
271         (WebCore::PlatformMessagePortChannel::MessagePortQueue::create):
272
273 2015-05-12  Matt Baker  <mattbaker@apple.com>
274
275         Web Inspector: REGRESSION (r181625): Timeline recording started from console.profile is always empty
276         https://bugs.webkit.org/show_bug.cgi?id=144882
277
278         Reviewed by Brian Burg.
279
280         A timeline recording will always be stopped before the end of the current run loop is observed. Before
281         dispatching the recording stopped event, the last run loop record must be completed and sent to the frontend
282         to prevent it from being discarded.
283
284         * inspector/InspectorTimelineAgent.cpp:
285         (WebCore::InspectorTimelineAgent::internalStop):
286
287 2015-05-12  Zalan Bujtas  <zalan@apple.com>
288
289         REGRESSION(r175617): Some text doesn't render on internationalculinarycenter.com
290         https://bugs.webkit.org/show_bug.cgi?id=144917
291         rdar://problem/20545878
292
293         Reviewed by Andreas Kling.
294
295         This patch ensures that text stroke width value is taken into account while
296         calculating visual overflow for simple line layout.
297         Ceiling the text stroke width value matches the normal text layout behaviour.
298
299         Test: fast/text/simple-line-layout-text-stroke-width.html
300
301         * rendering/SimpleLineLayoutFunctions.cpp:
302         (WebCore::SimpleLineLayout::paintFlow):
303         (WebCore::SimpleLineLayout::collectFlowOverflow):
304
305 2015-05-12  Alexey Proskuryakov  <ap@apple.com>
306
307         Build fix.
308
309         * platform/spi/cf/CFNetworkSPI.h:
310
311 2015-05-12  Brent Fulgham  <bfulgham@apple.com>
312
313         ROLLOUT [Win] Unreviewed build fix for older DirectX build environments.
314
315         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
316
317 2015-05-12  Joanmarie Diggs  <jdiggs@igalia.com>
318
319         AX: [ATK] ARIA menu items should not have anonymous block children
320         https://bugs.webkit.org/show_bug.cgi?id=144653
321
322         Reviewed by Chris Fleizach.
323
324         Exclude anonymous block children of menu items from the accessible tree
325         for ATK. Exclude list markers from the accessibility tree if the parent
326         is not being exposed as an accessible list item.
327
328         No new tests. Instead, modified the existing tests to reflect the correct
329         behavior.
330
331         * accessibility/AccessibilityRenderObject.cpp:
332         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
333         * accessibility/atk/AccessibilityObjectAtk.cpp:
334         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
335
336 2015-05-08  Alexey Proskuryakov  <ap@apple.com>
337
338         [Mac] Share cookie storage between UI process and secondary processes
339         https://bugs.webkit.org/show_bug.cgi?id=144820
340         rdar://problem/20572830
341
342         Reviewed by Darin Adler.
343
344         * platform/network/mac/CookieJarMac.mm:
345         * platform/spi/cf/CFNetworkSPI.h:
346         Moved SPIs into an SPI header, so that WebKit2 could use them too without duplication.
347
348 2015-05-12  Chris Dumez  <cdumez@apple.com>
349
350         [WK2] Log using diagnostic logging how far back in history we navigate
351         https://bugs.webkit.org/show_bug.cgi?id=144919
352         <rdar://problem/20920043>
353
354         Reviewed by Gavin Barraclough.
355
356         Add diagnostic logging keys for logging back history navigation delta.
357
358         * page/DiagnosticLoggingKeys.cpp:
359         (WebCore::DiagnosticLoggingKeys::deltaKey):
360         (WebCore::DiagnosticLoggingKeys::backNavigationKey):
361         * page/DiagnosticLoggingKeys.h:
362
363 2015-05-12  Yoav Weiss  <yoav@yoav.ws>
364
365         Avoid CSSPrimitiveValue allocation when parsing sizes
366         https://bugs.webkit.org/show_bug.cgi?id=144910
367
368         Reviewed by Darin Adler.
369
370         Turn non-calc length calculation logic into a static method,
371         so that it can be called without a CSSPrimitiveValue object.
372         Then, call that method to calculate the default source-size length.
373
374         No new tests, since no functionality change.
375
376         * css/CSSPrimitiveValue.cpp:
377         (WebCore::CSSPrimitiveValue::computeLengthDouble): Split out the logic for everything that's not calc into a static method.
378         (WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble): Static length computation logic for everything that is not calc.
379         * css/CSSPrimitiveValue.h:
380         (WebCore::CSSPrimitiveValue::isFontRelativeLength): Turn into static.
381         * css/SourceSizeList.cpp:
382         (WebCore::defaultLength): Use the new static method to compute the length.
383         (WebCore::computeLength): Use the calc length computation methods directly.
384
385 2015-05-12  Brent Fulgham  <bfulgham@apple.com>
386
387         [Win] Unreviewed build fix for older DirectX build environments.
388
389         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Switch back to our
390         d3d stub header to avoid build failures on July 2004 DXSDK build environments.
391
392 2015-05-12  Eric Carlson  <eric.carlson@apple.com>
393
394         [Mac] Refine media playback target client configuration
395         https://bugs.webkit.org/show_bug.cgi?id=144892
396
397         Reviewed by Brent Fulgham.
398
399         Client and target picker state changes fequently happen several times in quick succession, so
400         don't react to immediately so we can batch callbacks to the web process. 
401         * Modules/mediasession/WebMediaSessionManager.cpp:
402         (WebCore::ClientState::ClientState): Store the client as a reference rather than a pointer
403         because it can never be NULL.
404         (WebCore::ClientState::operator == ): New.
405         (WebCore::WebMediaSessionManager::addPlaybackTargetPickerClient): Schedule the initial client 
406         configuration and a target configuration check.
407         (WebCore::WebMediaSessionManager::removePlaybackTargetPickerClient): Schedule a target monitoring
408         update, and a target configuration check.
409         (WebCore::WebMediaSessionManager::removeAllPlaybackTargetPickerClients): Ditto.
410         (WebCore::WebMediaSessionManager::showPlaybackTargetPicker): Schedule a target monitoring update.
411         (WebCore::WebMediaSessionManager::clientStateDidChange): If the client whose state has changed
412         can play to a target, tell it to start using the target even if it isn't playing as long as
413         no other client is actively using a target.
414         (WebCore::WebMediaSessionManager::setPlaybackTarget): Configure clients after a pause.
415         (WebCore::WebMediaSessionManager::configureNewClients): New, do new client configuration.
416         (WebCore::WebMediaSessionManager::configurePlaybackTargetClients): New, configure target clients.
417         (WebCore::WebMediaSessionManager::scheduleDelayedTask): Schedule the timer.
418         (WebCore::WebMediaSessionManager::taskTimerFired): Execute delayed tasks.
419         (WebCore::WebMediaSessionManager::find): 
420         * Modules/mediasession/WebMediaSessionManager.h:
421
422         * html/HTMLMediaElement.cpp:
423         (WebCore::HTMLMediaElement::setMuted): Call updateMediaState.
424         (WebCore::HTMLMediaElement::setPlaying): Ditto.
425         (WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged): Ditto.
426         (WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent): Expand logging.
427         (WebCore::HTMLMediaElement::updateMediaState): New, don't broadcast a media state change
428         unless something actually changed.
429         * html/HTMLMediaElement.h:
430
431         * html/HTMLMediaSession.cpp:
432         (WebCore::HTMLMediaSession::externalOutputDeviceAvailableDidChange): Update logging.
433         (WebCore::HTMLMediaSession::setShouldPlayToPlaybackTarget): Ditto.
434         (WebCore::HTMLMediaSession::mediaEngineUpdated): Cleanup.
435
436         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
437         (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Remove the call to
438         deprecated API and the "-Wdeprecated-declarations".
439
440 2015-05-12  Joanmarie Diggs  <jdiggs@igalia.com>
441
442         AX: [GTK] Defer to WebCore Accessibility for table exposure
443         https://bugs.webkit.org/show_bug.cgi?id=144896
444
445         Reviewed by Chris Fleizach.
446
447         Stop unconditionally exposing all HTMLTableElement nodes as AccessibilityTables
448         for WebKitGtk.
449
450         No new tests. Several existing tests already cover table exposure. They have
451         been updated accordingly.
452
453         * accessibility/AccessibilityTable.cpp:
454         (WebCore::AccessibilityTable::computeIsTableExposableThroughAccessibility):
455
456 2015-05-12  Joanmarie Diggs  <jdiggs@igalia.com>
457
458         [GTK][WK2] rowAtIndex is not implemented in DRT/WKTR
459         https://bugs.webkit.org/show_bug.cgi?id=116971
460
461         Reviewed by Chris Fleizach.
462
463         Because ATK lacks API to directly get an accessible row via its index,
464         the implementation of rowAtIndex gets a cell in the indexed row and
465         returns the parent row. The failing test continued to fail because
466         AccessibilityARIAGridCell::parentTable called parentObjectUnignored at
467         most twice, the second call in place to handle rows which are included
468         in the tree. However, given a well-formed ARIA grid with a rowgroup that
469         is interactive, that rowgroup also needs to be in the tree necessitating
470         parentObjectUnignored be called a third time to get to the grid. Given a
471         poorly-formed ARIA grid, there may additional objects which pass the test
472         for inclusion standing in between the cell and grid necessitating more
473         calls still. Therefore, ascend the hierarchy to find the parent grid.
474
475         No new tests. The failing test now passes.
476
477         * accessibility/AccessibilityARIAGridCell.cpp:
478         (WebCore::AccessibilityARIAGridCell::parentTable):
479
480 2015-05-08  Carlos Garcia Campos  <cgarcia@igalia.com>
481
482         [X11] Add XUniquePtr and XUniqueResource to automatically free X resources
483         https://bugs.webkit.org/show_bug.cgi?id=144521
484
485         Reviewed by Darin Adler.
486
487         Add XUniquePtr as a template alias of std:unique_ptr to handle X
488         resources using pointers and XUniqueResource as a new class to
489         handle X resources using a long unsigned identifier. This
490         simplifies the code and makes it more difficult to leak X resources.
491
492         * PlatformEfl.cmake: Add new files to compilation.
493         * PlatformGTK.cmake: Ditto.
494         * platform/graphics/cairo/BackingStoreBackendCairoX11.cpp:
495         (WebCore::BackingStoreBackendCairoX11::BackingStoreBackendCairoX11):
496         Remove the display member, and use XUnique for Pixmap and GC.
497         (WebCore::BackingStoreBackendCairoX11::~BackingStoreBackendCairoX11):
498         Remove code to explicitly free Pixmap and GC.
499         (WebCore::BackingStoreBackendCairoX11::scroll):
500         * platform/graphics/cairo/BackingStoreBackendCairoX11.h:
501         * platform/graphics/glx/GLContextGLX.cpp:
502         (WebCore::GLContextGLX::createWindowContext): Use XUnique and the
503         new constructor that receives a XID, since there's no longer
504         conflict with the one receiving a Pbuffer.
505         (WebCore::GLContextGLX::createPbufferContext): Use XUnique and the
506         new constructor that receives a XUniqueGLXPbuffer&&.
507         (WebCore::GLContextGLX::createPixmapContext):
508         (WebCore::GLContextGLX::createContext):
509         (WebCore::GLContextGLX::GLContextGLX):
510         (WebCore::GLContextGLX::~GLContextGLX): Remove code to explicitly
511         free X resources.
512         (WebCore::GLContextGLX::makeContextCurrent):
513         (WebCore::GLContextGLX::cairoDevice):
514         (WebCore::GLContextGLX::platformContext):
515         * platform/graphics/glx/GLContextGLX.h:
516         * platform/graphics/surfaces/egl/EGLXSurface.cpp:
517         (WebCore::EGLXTransportSurfaceClient::EGLXTransportSurfaceClient):
518         (WebCore::EGLXTransportSurfaceClient::destroy):
519         (WebCore::EGLXTransportSurfaceClient::prepareTexture):
520         * platform/graphics/surfaces/egl/EGLXSurface.h:
521         * platform/graphics/surfaces/glx/GLXConfigSelector.h:
522         (WebCore::GLXConfigSelector::findMatchingConfig): Use XUnique
523         instead of the custom std::unique X11Deleter.
524         (WebCore::GLXConfigSelector::findMatchingConfigWithVisualId): Ditto.
525         * platform/graphics/surfaces/glx/GLXSurface.cpp:
526         (WebCore::GLXTransportSurface::GLXTransportSurface): Ditto.
527         (WebCore::GLXOffScreenSurface::initialize):
528         * platform/graphics/surfaces/glx/X11Helper.cpp:
529         (WebCore::X11Helper::createOffScreenWindow): Ditto.
530         (WebCore::X11Helper::createPixmap): Ditto.
531         * platform/graphics/surfaces/glx/X11Helper.h:
532         * platform/graphics/x11/XUniquePtr.h: Remove X11Deleter.
533         (WebCore::XPtrDeleter::operator()):
534         * platform/graphics/x11/XUniqueResource.cpp: Added.
535         (WebCore::XUniqueResource<XResource::Colormap>::deleteXResource):
536         (WebCore::XUniqueResource<XResource::Damage>::deleteXResource):
537         (WebCore::XUniqueResource<XResource::Pixmap>::deleteXResource):
538         (WebCore::XUniqueResource<XResource::Window>::deleteXResource):
539         (WebCore::XUniqueResource<XResource::GLXPbuffer>::deleteXResource):
540         (WebCore::XUniqueResource<XResource::GLXPixmap>::deleteXResource):
541         * platform/graphics/x11/XUniqueResource.h: Added.
542         (WebCore::XUniqueResource::XUniqueResource):
543         (WebCore::XUniqueResource::operator=):
544         (WebCore::XUniqueResource::~XUniqueResource):
545         (WebCore::XUniqueResource::get):
546         (WebCore::XUniqueResource::release):
547         (WebCore::XUniqueResource::reset):
548         (WebCore::XUniqueResource::operator!):
549         (WebCore::XUniqueResource::operator UnspecifiedBoolType*):
550
551 2015-05-12  Zan Dobersek  <zdobersek@igalia.com>
552
553         Move TransformOperation-based classes off of PassRefPtr
554         https://bugs.webkit.org/show_bug.cgi?id=144876
555
556         Reviewed by Darin Adler.
557
558         Remove uses of PassRefPtr from the TransformOperation class and its
559         derivatives, operating on Ref and RefPtr objects instead.
560
561         * platform/graphics/transforms/IdentityTransformOperation.h:
562         * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
563         (WebCore::Matrix3DTransformOperation::blend):
564         * platform/graphics/transforms/Matrix3DTransformOperation.h:
565         * platform/graphics/transforms/MatrixTransformOperation.cpp:
566         (WebCore::MatrixTransformOperation::blend):
567         * platform/graphics/transforms/MatrixTransformOperation.h:
568         * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
569         (WebCore::PerspectiveTransformOperation::blend):
570         * platform/graphics/transforms/PerspectiveTransformOperation.h:
571         * platform/graphics/transforms/RotateTransformOperation.cpp:
572         (WebCore::RotateTransformOperation::blend):
573         * platform/graphics/transforms/RotateTransformOperation.h:
574         * platform/graphics/transforms/ScaleTransformOperation.cpp:
575         (WebCore::ScaleTransformOperation::blend):
576         * platform/graphics/transforms/ScaleTransformOperation.h:
577         * platform/graphics/transforms/SkewTransformOperation.cpp:
578         (WebCore::SkewTransformOperation::blend):
579         * platform/graphics/transforms/SkewTransformOperation.h:
580         * platform/graphics/transforms/TransformOperation.h:
581         * platform/graphics/transforms/TransformOperations.cpp:
582         (WebCore::TransformOperations::blendByMatchingOperations):
583         * platform/graphics/transforms/TranslateTransformOperation.cpp:
584         (WebCore::TranslateTransformOperation::blend):
585         * platform/graphics/transforms/TranslateTransformOperation.h:
586
587 2015-05-12  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
588
589         [Streams API] ReadableStream reader should not be disposable when having pending promises
590         https://bugs.webkit.org/show_bug.cgi?id=144869
591
592         Reviewed by Darin Adler.
593
594         Made error promise callback to take a ref to the reader so that the reader is not disposed as long as the promise callback is not resolved.
595
596         Covered by tests added to streams/readable-stream-gc.html.
597
598         * Modules/streams/ReadableStreamReader.cpp:
599         (WebCore::ReadableStreamReader::ReadableStreamReader): Moved initialize() call outside constructor as it can ref/unref.
600         (WebCore::ReadableStreamReader::releaseStreamAndClean): Added protector.
601         * Modules/streams/ReadableStreamReader.h:
602         * bindings/js/JSReadableStreamReaderCustom.cpp:
603         (WebCore::JSReadableStreamReader::closed): Lambda for error now takes a ref to the reader.
604         * bindings/js/ReadableJSStream.cpp:
605         (WebCore::ReadableJSStream::Reader::create): Calling initialize() after adoptRef().
606
607 2015-05-11  Zan Dobersek  <zdobersek@igalia.com>
608
609         Clean up redundant resources in case of failure in GLContextEGL context creation methods
610         https://bugs.webkit.org/show_bug.cgi?id=144878
611
612         Reviewed by Martin Robinson.
613
614         GLContextEGL::createWindowContext() and GLContextEGL::createPixmapContext() methods
615         should clean up the freshly-created resources when prematurely returning due to a
616         failure.
617
618         * platform/graphics/egl/GLContextEGL.cpp:
619         (WebCore::GLContextEGL::createWindowContext):
620         (WebCore::GLContextEGL::createPixmapContext):
621
622 2015-05-11  Dan Bernstein  <mitz@apple.com>
623
624         WebCore part of <rdar://problem/20878075> Trying to navigate to an invalid URL loads about:blank, but -[WKWebView URL] returns the invalid URL
625
626         Reviewed by Alexey Proskuryakov.
627
628         Test: TestWebKitAPI/Tests/WebKit2Cocoa/ProvisionalURLChange.mm
629
630         In some cases, trying to navigate to an invalid URL results in navigation to about:blank.
631         When the about:blank load is committed, the UI process still thinks that the provisional
632         URL is the original, invalid URL, and updates its state to reflect that that’s the URL that
633         has been committed.
634
635         The provisional URL changes (1) when a provisional load begins, (2) when a server redirect
636         happens, (3) when the client changes the request in willSendRequest, and (4) in this
637         about:blank case. For (1) and (2), there are frame loader client callbacks. (3) is client-
638         initiated. So this patch addresses (4).
639
640         * loader/DocumentLoader.cpp:
641         (WebCore::DocumentLoader::maybeLoadEmpty): If our request URL is changing to about:blank and
642         while loading the main resource, call FrameLoaderClient::dispatchDidChangeProvisionalURL.
643         * loader/FrameLoaderClient.h: Added dispatchDidChangeProvisionalURL with an empty
644         implementation.
645
646 2015-05-11  Zalan Bujtas  <zalan@apple.com>
647
648         Text is misplaced when custom font does not have space glyph.
649         https://bugs.webkit.org/show_bug.cgi?id=144879
650
651         Reviewed by Myles C. Maxfield
652
653         This patch ensures that we use fallback font for the missing space glyph only when the rendered text has space in it.
654
655         If a font does not provide all the glyphs required to render the associated text, we initiate fallback fonts. It is done while
656         measuring the text at layout time. However due to the fact that we always pre-measure space, a font with no space glyph in it is never sufficient.
657         (even when the text does not require space at all)
658         Fallback fonts impact line positions through ascent/descent calculation.
659
660         Test: fast/text/font-with-no-space-glyph.html
661
662         * rendering/RenderText.cpp:
663         (WebCore::RenderText::computePreferredLogicalWidths):
664         * rendering/line/BreakingContext.h:
665         (WebCore::WordTrailingSpace::WordTrailingSpace):
666         (WebCore::WordTrailingSpace::width):
667         (WebCore::BreakingContext::handleText):
668
669 2015-05-11  Simon Fraser  <simon.fraser@apple.com>
670
671         Small tidyup in animations code
672         https://bugs.webkit.org/show_bug.cgi?id=144893
673
674         Reviewed by Eric Carlson.
675
676         Reading progress(1, 0, 0) in callers of AnimationBase::progress() was confusing,
677         particularly as the last parameter is a TimingFunction*. Put default values 
678         in the header (with nullptr) and fix the callers. Also fix variable names in
679         the implementation.
680
681         * page/animation/AnimationBase.cpp:
682         (WebCore::AnimationBase::progress):
683         * page/animation/AnimationBase.h:
684         * page/animation/ImplicitAnimation.cpp:
685         (WebCore::ImplicitAnimation::animate):
686         (WebCore::ImplicitAnimation::getAnimatedStyle):
687         (WebCore::ImplicitAnimation::blendPropertyValueInStyle):
688
689 2015-05-11  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
690
691         Purge PassRefPtr in WebCore/rendering
692         https://bugs.webkit.org/show_bug.cgi?id=144872
693
694         Reviewed by Darin Adler.
695
696         As a step to remove PassRefPtr, this patch replaces PassRefPtr with Ref in WebCore/rendering.
697
698         No new tests, no behavior changes.
699
700         * rendering/HitTestingTransformState.h:
701         (WebCore::HitTestingTransformState::create):
702         * rendering/RenderLayer.cpp:
703         (WebCore::ClipRects::create):
704         * rendering/RenderThemeGtk.cpp:
705         (WebCore::RenderThemeGtk::create):
706         (WebCore::RenderTheme::themeForPage):
707         * rendering/RenderThemeGtk.h:
708         * rendering/RenderThemeIOS.h:
709         * rendering/RenderThemeIOS.mm:
710         (WebCore::RenderTheme::themeForPage):
711         (WebCore::RenderThemeIOS::create):
712         * rendering/RenderThemeMac.h:
713         * rendering/RenderThemeMac.mm:
714         (WebCore::RenderTheme::themeForPage):
715         (WebCore::RenderThemeMac::create):
716         * rendering/RenderThemeSafari.cpp:
717         (WebCore::RenderThemeSafari::create):
718         (WebCore::RenderTheme::themeForPage):
719         * rendering/RenderThemeSafari.h:
720         * rendering/RenderThemeWin.cpp:
721         (WebCore::RenderThemeWin::create):
722         (WebCore::RenderTheme::themeForPage):
723         * rendering/RenderThemeWin.h:
724         * rendering/TextAutoSizing.h:
725         (WebCore::TextAutoSizingValue::create):
726         * rendering/style/ShapeValue.h:
727         (WebCore::ShapeValue::createShapeValue):
728         (WebCore::ShapeValue::createBoxShapeValue):
729         (WebCore::ShapeValue::createImageValue):
730         * rendering/style/StyleCachedImage.h:
731         * rendering/style/StyleCachedImageSet.h:
732         * rendering/style/StyleGeneratedImage.h:
733         * rendering/style/StylePendingImage.h:
734         * rendering/style/StyleReflection.h:
735         (WebCore::StyleReflection::create):
736
737 2015-05-11  Eric Carlson  <eric.carlson@apple.com>
738
739         [Mac] Update device picker icon when video tracks change
740         https://bugs.webkit.org/show_bug.cgi?id=144889
741         <rdar://problem/20907253>
742
743         Reviewed by Brent Fulgham.
744
745         * Modules/mediacontrols/mediaControlsApple.js:
746         (Controller.prototype.updateHasVideo):
747
748 2015-05-11  Brent Fulgham  <bfulgham@apple.com>
749
750         Scroll snap logic should be triggered when resizing the WebView
751         https://bugs.webkit.org/show_bug.cgi?id=142590
752         <rdar://problem/20125088>
753
754         Reviewed by Simon Fraser.
755
756         Tests coming in a second patch.
757
758         Resizing of the main frame or overflow regions was properly recalculating the scroll snap points,
759         but there was no code to honor these values when window resizing was occurring. The correction was
760         handled in two ways:
761         1. Scrolling thread operations that moved to new snap points needed to notify the main thread that
762            it had shifted to a new snap point, so that the resize code (which happens on the main thread)
763            could ensure that we stayed clamped to the correct 'tile' in the snap region.
764         2. Main thread (overflow) resizes were likewise missing code to honor the current snap position
765            after resizing calculations were complete.
766
767         This change also required the addition of two indices to the scrollable area to track which scroll
768         snap point was currently being used. We don't bother with a 'none' case because you cannot have a
769         'none' state when you have an active set of scroll snap points, and we do not execute this code
770         if the scroll snap points are null.
771
772         The FrameView code was computing updated snap offsets after it had dispatched frame view layout
773         information to the scrolling thread, which was wrong. This was also corrected.
774
775         I think it might be possible to track all of this state inside the ScrollController, but the current
776         scroll snap architecture destroys and recreates the state each time a new set of interactions starts.
777         This should be fixed in the future, which would allow us to remove some of this local state.
778
779         * page/FrameView.cpp:
780         (WebCore::FrameView::performPostLayoutTasks): Make sure 'updateSnapOffsets' is called prior to
781         calling 'frameViewLayoutUpdated' so the scrolling thread gets correct updated points. Add a new
782         call to 'scrollToNearestActiveSnapPoint', which will keep us on our current snap point during
783         resize (if appropriate).
784         * page/scrolling/AsyncScrollingCoordinator.cpp:
785         (WebCore::AsyncScrollingCoordinator::updateScrollSnapOffsetIndices): Added. This finds and notifies
786         the correct scroll region when a new snap position (index) has been selected by user interaction on
787         the scrolling thread.
788         (WebCore::AsyncScrollingCoordinator::deferTestsForReason): Added an assertion for 'isMainThread'.
789         (WebCore::AsyncScrollingCoordinator::removeTestDeferralForReason): Ditto.
790         * page/scrolling/AsyncScrollingCoordinator.h:
791         * page/scrolling/AxisScrollSnapOffsets.h:
792         (WebCore::closestSnapOffset): Modified to also return the selected snap point index so we can track
793         it to handle resize operations.
794         * page/scrolling/ScrollingTree.h:
795         (WebCore::ScrollingTree::updateScrollSnapOffsetIndices):
796         * page/scrolling/ThreadedScrollingTree.cpp:
797         (WebCore::ThreadedScrollingTree::updateScrollSnapOffsetIndices): Added method to dispatch the active
798         horizontal and vertical scroll snap indices back to the main thread.
799         * page/scrolling/ThreadedScrollingTree.h:
800         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
801         (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent): After the scroll controller processes
802         the current event, notify the main thread of any change in the active scroll snap index.
803         * platform/ScrollAnimator.cpp:
804         (WebCore::ScrollAnimator::activeScrollSnapOffsetIndexDidChange): Added method to allow ScrollAnimator
805         clients to find out about the current scroll snap state, which is only known by the ScrollController.
806         (WebCore::ScrollAnimator::activeScrollSnapOffsetIndexForAxis): Ditto.
807         * platform/ScrollAnimator.h:
808         * platform/ScrollView.cpp:
809         (WebCore::ScrollView::scrollToNearestActiveSnapPoint): Added method that allows us to set scroll position
810         to one of our active scroll snap offsets.
811         * platform/ScrollView.h:
812         * platform/ScrollableArea.cpp:
813         (WebCore::ScrollableArea::handleWheelEvent): If the active scroll snap offset has changed, make sure we
814         keep track of the new values for potential resize operations.
815         (WebCore::ScrollableArea::clearHorizontalSnapOffsets): Make sure to also clear out the current snap index.
816         (WebCore::ScrollableArea::clearVerticalSnapOffsets): Ditto.
817         (WebCore::ScrollableArea::nearestActiveSnapPoint): New method that returns an updated IntPoint reflecting
818         the proper scroll position based on the active scroll snap offset.
819         * platform/ScrollableArea.h:
820         (WebCore::ScrollableArea::currentHorizontalSnapPointIndex): Added.
821         (WebCore::ScrollableArea::setCurrentHorizontalSnapPointIndex): Added.
822         (WebCore::ScrollableArea::currentVerticalSnapPointIndex): Added.
823         (WebCore::ScrollableArea::setCurrentVerticalSnapPointIndex): Added.
824         (WebCore::ScrollableArea::scrollToNearestActiveSnapPoint): Added.
825         * platform/cocoa/ScrollController.h:
826         (WebCore::ScrollControllerClient::activeScrollOffsetIndex): Added new method for clients to implement.
827         (WebCore::ScrollController::activeScrollSnapOffsetIndexDidChange): Added.
828         (WebCore::ScrollController::setScrollSnapOffsetIndexDidChange): Added.
829         * platform/cocoa/ScrollController.mm:
830         (WebCore::ScrollController::activeScrollSnapOffsetIndexForAxis): Helper method to return current active
831         index (if applicable).
832         (WebCore::ScrollController::setActiveScrollSnapOffsetIndexForAxis): Helper function to safely set
833         the current active index.
834         (WebCore::ScrollController::beginScrollSnapAnimation): Updated to keep track of the new active scroll snap
835         index, as well as whether the current animation actually changed the active snap point offset.
836         * platform/cocoa/ScrollSnapAnimatorState.h: Revise to use modern C++ initializers, and to track a new index
837         that represents the current scroll snap offset.
838         * platform/cocoa/ScrollSnapAnimatorState.mm:
839         (WebCore::ScrollSnapAnimatorState::ScrollSnapAnimatorState): Update for modern C++ syntax.
840         * rendering/RenderLayer.cpp:
841         (WebCore::RenderLayer::scrollToNearestActiveSnapPoint): New method to set scroll position to be one of our
842         active scroll snap points.
843         (WebCore::RenderLayer::updateScrollInfoAfterLayout): Add a new call to 'scrollToNearestActiveSnapPoint' so that
844         we stay on the current scroll snap offset during resizing.
845         * rendering/RenderLayer.h:
846
847 2015-05-11  Myles C. Maxfield  <mmaxfield@apple.com>
848
849         Addressing post-review comments after r184037.
850
851         Unreviewed.
852
853         No new tests because there is no behavior change.
854
855         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
856         (WebCore::SimpleLineLayout::TextFragmentIterator::runWidth):
857
858 2015-05-11  Brent Fulgham  <bfulgham@apple.com>
859
860         [Win] Move Windows build target to Windows 7 (or newer)
861         https://bugs.webkit.org/show_bug.cgi?id=144890
862         <rdar://problem/20707307>
863
864         Reviewed by Anders Carlsson.
865
866         Update linked SDK and minimal Windows level to be compatible with
867         Windows 7 or newer.
868
869         * WebCore.vcxproj/WebCore.vcxproj:
870         * WebCore.vcxproj/WebCoreGenerated.vcxproj:
871         * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
872         * WebCorePrefix.h:
873         * config.h:
874         * testing/js/WebCoreTestSupportPrefix.h:
875
876 2015-05-11  Joanmarie Diggs  <jdiggs@igalia.com>
877
878         AX: [ATK] Always include rows in the tree of accessible tables
879         https://bugs.webkit.org/show_bug.cgi?id=144885
880
881         Reviewed by Chris Fleizach.
882
883         Remove the code that excluded rows from the tree of accessible tables for
884         Gtk and Efl, the latter of which inherited the exclusion from the former.
885
886         No new tests. We already have several tests which cover table hierarchy.
887         The associated expectations have been updated as part of this fix.
888
889         * accessibility/AccessibilityTable.cpp:
890         (WebCore::AccessibilityTable::addChildrenFromSection):
891         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
892         (webkitAccessibleGetParent):
893
894 2015-05-11  Matt Baker  <mattbaker@apple.com>
895
896         Web Inspector: REGRESSION (r175203): No profile information is shown in Inspector
897         https://bugs.webkit.org/show_bug.cgi?id=144808
898
899         Reviewed by Darin Adler.
900
901         Profiles started from the console should always use the Inspector environment's shared stopwatch.
902
903         * inspector/InspectorTimelineAgent.cpp:
904         (WebCore::InspectorTimelineAgent::startFromConsole):
905
906 2015-05-11  Alex Christensen  <achristensen@webkit.org>
907
908         [Content Extensions] Support domain-specific rules and exceptions.
909         https://bugs.webkit.org/show_bug.cgi?id=144833
910
911         Reviewed by Darin Adler.
912
913         Test: http/tests/contentextensions/domain-rules.html
914         (And lots of API tests)
915
916         This patch adds if-domain and unless-domain to the trigger in the JSON format.
917         if-domain makes the rule apply only to domains in the list.
918         unless-domain makes the rule apply to domains that are not in the list.
919         
920         All rules without if-domain or unless-domain are compiled into a set of DFAs.  This behavior is unchanged.
921         All rules with if-domain or unless-domain are compiled into a separate set of DFAs.
922         The domains are also compiled into another set of DFAs.  This makes 3 arrays of DFA bytecode instead of 1.
923         
924         If there are no domain specific rules, there is no change in behavior.
925         If there are domain specific rules, the URL will be checked for matches in both
926         filtersWithoutDomainsBytecode and filtersWithDomainsBytecode.  If there are matches from 
927         filtersWithDomainsBytecode then the domain of the main document will be checked with 
928         domainFiltersBytecode to see which of the matches applies to this domain.
929
930         * contentextensions/CombinedURLFilters.cpp:
931         (WebCore::ContentExtensions::CombinedURLFilters::isEmpty):
932         (WebCore::ContentExtensions::CombinedURLFilters::addDomain):
933         * contentextensions/CombinedURLFilters.h:
934         Added addDomain, which adds characters from a domain to the prefix tree directly without using YARR.
935         * contentextensions/CompiledContentExtension.cpp:
936         (WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
937         * contentextensions/CompiledContentExtension.h:
938         * contentextensions/ContentExtensionCompiler.cpp:
939         (WebCore::ContentExtensions::serializeActions):
940         (WebCore::ContentExtensions::compileRuleList):
941         Separate the rules into rules with domains and rules without domains and compile to bytecode.
942         * contentextensions/ContentExtensionCompiler.h:
943         Updated compiler interface to reflect the slightly more complicated structure.
944         * contentextensions/ContentExtensionError.cpp:
945         (WebCore::ContentExtensions::contentExtensionErrorCategory):
946         * contentextensions/ContentExtensionError.h:
947         Added new parsing errors.
948         * contentextensions/ContentExtensionParser.cpp:
949         (WebCore::ContentExtensions::getDomainList):
950         (WebCore::ContentExtensions::loadTrigger):
951         (WebCore::ContentExtensions::loadEncodedRules):
952         * contentextensions/ContentExtensionRule.h:
953         (WebCore::ContentExtensions::Trigger::operator==):
954         Parse the new domain structures from JSON into the Trigger structure.
955         * contentextensions/ContentExtensionsBackend.cpp:
956         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
957         Interpret as much bytecode as necessary to determine which rules apply to this URL and domain.
958         * contentextensions/DFABytecode.h:
959         (WebCore::ContentExtensions::instructionSizeWithArguments):
960         * contentextensions/DFABytecodeCompiler.cpp:
961         (WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):
962         (WebCore::ContentExtensions::DFABytecodeCompiler::emitTestFlagsAndAppendAction):
963         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
964         * contentextensions/DFABytecodeCompiler.h:
965         * contentextensions/DFABytecodeInterpreter.cpp:
966         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
967         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
968         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
969         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
970         * contentextensions/DFABytecodeInterpreter.h:
971         * loader/ResourceLoadInfo.h:
972         Keep track of which actions have an if-domain trigger.  If an action is in the 
973         filtersWithDomainsBytecode, then it either has an if-domain or an unless-domain in its trigger.
974         This requires additional information in the bytecode, so there are two new bytecode types.
975
976 2015-05-11  Yoav Weiss  <yoav@yoav.ws>
977
978         Add srcset, sizes and picture to the features json
979         https://bugs.webkit.org/show_bug.cgi?id=144862
980
981         Reviewed by Benjamin Poulain.
982
983         Add the srcset w descriptor and sizes attribute as a new feature in the JSON file,
984         as well as adding the picture element and srcset's x descriptor as seperate features.
985
986         No new tests, since no new functionality added.
987
988         * features.json:
989
990 2015-05-11  Chris Dumez  <cdumez@apple.com>
991
992         Fix checkingLogicalHeight initialization in Document::updateLayoutIfDimensionsOutOfDate()
993         https://bugs.webkit.org/show_bug.cgi?id=144873
994
995         Reviewed by Simon Fraser.
996
997         Fix checkingLogicalHeight initialization in Document::updateLayoutIfDimensionsOutOfDate().
998         checkingLogicalHeight should only be initialized to true when
999         "dimensionsCheck & WidthDimensionsCheck" if isVertical is true.
1000
1001         * dom/Document.cpp:
1002         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
1003
1004 2015-05-11  Daniel Bates  <dabates@apple.com>
1005
1006         [iOS] Close all open databases in expiration handler of process assertion
1007         https://bugs.webkit.org/show_bug.cgi?id=144661
1008         <rdar://problem/20845052>
1009
1010         Reviewed by Darin Adler.
1011
1012         Expose functionality in WebCore to close all open databases. Closing a SQLite database
1013         will interrupt any in-progress database transactions.
1014
1015         * Modules/webdatabase/AbstractDatabaseServer.h:
1016         * Modules/webdatabase/DatabaseManager.cpp:
1017         (WebCore::DatabaseManager::closeAllDatabases): Added; turns around and calls DatabaseServer::closeAllDatabases().
1018         * Modules/webdatabase/DatabaseManager.h: Export DatabaseManager::closeAllDatabases() so that
1019         we can call in from WebKit2.
1020         * Modules/webdatabase/DatabaseServer.cpp:
1021         (WebCore::DatabaseServer::closeAllDatabases): Added; turns around and calls DatabaseTracker::closeAllDatabases().
1022         * Modules/webdatabase/DatabaseServer.h:
1023         * Modules/webdatabase/DatabaseTracker.cpp:
1024         (WebCore::DatabaseTracker::closeAllDatabases): Added; closes all open databases.
1025         * Modules/webdatabase/DatabaseTracker.h: Export DatabaseTracker::closeAllDatabases() so that
1026         we can call in from Legacy WebKit.
1027
1028 2015-05-11  Antti Koivisto  <antti@apple.com>
1029
1030         WebContent crash under com.apple.WebCore: WebCore::WebKitCSSResourceValue::isCSSValueNone const + 6
1031         https://bugs.webkit.org/show_bug.cgi?id=144870
1032         rdar://problem/20727702
1033
1034         Reviewed by Simon Fraser.
1035
1036         No repro but we are seeing null pointer crashes like this:
1037
1038         Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
1039         0   com.apple.WebCore   0x00007fff92da5706 WebCore::WebKitCSSResourceValue::isCSSValueNone() const + 6
1040         1   com.apple.WebCore   0x00007fff93382b48 WebCore::MaskImageOperation::isCSSValueNone() const + 24
1041         2   com.apple.WebCore   0x00007fff92e0475e WebCore::FillLayer::hasNonEmptyMaskImage() const + 30
1042
1043         * platform/graphics/MaskImageOperation.cpp:
1044         (WebCore::MaskImageOperation::MaskImageOperation):
1045         (WebCore::MaskImageOperation::isCSSValueNone):
1046
1047             This would crash like this if both m_styleImage and m_cssMaskImageValue are null.
1048             There are no obvious guarantees that this doesn't happen. Two of the constructor variants allow it
1049             and there is setImage which may turn m_styleImage null later too.
1050
1051             Fix by making null m_cssMaskImageValue always signify CSSValueNone.
1052
1053         (WebCore::MaskImageOperation::cssValue):
1054
1055 2015-05-11  Chris Fleizach  <cfleizach@apple.com>
1056
1057         AX: Crash at WebCore::AccessibilityMenuList::addChildren()
1058         https://bugs.webkit.org/show_bug.cgi?id=144860
1059
1060         Reviewed by Mario Sanchez Prada.
1061
1062         There were some unsafe pointer accesses in AccessibilityMenuList code that needed to be cleaned up.
1063
1064         Test: accessibility/menu-list-crash2.html
1065
1066         * accessibility/AccessibilityMenuList.cpp:
1067         (WebCore::AccessibilityMenuList::addChildren):
1068
1069 2015-05-11  Przemyslaw Szymanski  <p.szymanski3@samsung.com>
1070
1071         [WebGL] Unnecessary condition check in the while loop
1072         https://bugs.webkit.org/show_bug.cgi?id=125001
1073
1074         Reviewed by Csaba Osztrogonác.
1075
1076         While loop in this case needs to be optimized a little.
1077         For now a conditional statement in while will execute two
1078         times at begin. do-while loop avoids to check first statement.
1079
1080         No new tests. No behaviour changed.
1081
1082         * html/canvas/WebGLFramebuffer.cpp:
1083         (WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer):
1084
1085 2015-05-11  Joonghun Park  <jh718.park@samsung.com>
1086
1087         [GTK] Reorder Performance class's member initialization sequence
1088         https://bugs.webkit.org/show_bug.cgi?id=144858
1089
1090         Reviewed by Csaba Osztrogonác.
1091
1092         No new tests, no new behaviors.
1093
1094         * page/Performance.cpp:
1095         (WebCore::Performance::Performance):
1096
1097 2015-05-11  Zan Dobersek  <zdobersek@igalia.com>
1098
1099         Reduce TransformationMatrix copies in WebKitCSSMatrix operations
1100         https://bugs.webkit.org/show_bug.cgi?id=144795
1101
1102         Reviewed by Darin Adler.
1103
1104         Instead of copying the TransformationMatrix member, performing
1105         the operation on it and then copying it again when creating
1106         the new WebKitCSSMatrix object, copy it just once by first
1107         creating the new WebKitCSSMatrix object and then performing
1108         the operation on that object's TransformationMatrix directly.
1109
1110         * css/WebKitCSSMatrix.cpp:
1111         (WebCore::WebKitCSSMatrix::multiply):
1112         (WebCore::WebKitCSSMatrix::translate):
1113         (WebCore::WebKitCSSMatrix::scale):
1114         (WebCore::WebKitCSSMatrix::rotate):
1115         (WebCore::WebKitCSSMatrix::rotateAxisAngle):
1116         (WebCore::WebKitCSSMatrix::skewX):
1117         (WebCore::WebKitCSSMatrix::skewY):
1118
1119 2015-05-11  Zan Dobersek  <zdobersek@igalia.com>
1120
1121         Add missing vtable override specifiers under Source/WebCore/loader, Source/WebCore/xml
1122         https://bugs.webkit.org/show_bug.cgi?id=144793
1123
1124         Reviewed by Darin Adler.
1125
1126         Update virtual method overrides under Source/WebCore/loader
1127         and Source/WebCore/dom which are missing the override specifier.
1128
1129         * loader/DocumentThreadableLoader.h:
1130         (WebCore::DocumentThreadableLoader::refThreadableLoader):
1131         (WebCore::DocumentThreadableLoader::derefThreadableLoader):
1132         * loader/cache/CachedRawResource.h:
1133         * xml/parser/XMLDocumentParser.h:
1134
1135 2015-05-11  Zan Dobersek  <zdobersek@igalia.com>
1136
1137         Add missing vtable override specifiers under Source/WebCore/accessibility, Source/WebCore/dom
1138         https://bugs.webkit.org/show_bug.cgi?id=144792
1139
1140         Reviewed by Darin Adler.
1141
1142         Update virtual method overrides under Source/WebCore/accessibility
1143         and Source/WebCore/dom which are missing the override specifier.
1144
1145         * accessibility/AccessibilityMockObject.h:
1146         (WebCore::AccessibilityMockObject::isDetachedFromParent): Deleted.
1147         * accessibility/AccessibilityRenderObject.h:
1148         * dom/DecodedDataDocumentParser.h:
1149         * dom/TouchEvent.h:
1150
1151 2015-05-10  Zan Dobersek  <zdobersek@igalia.com>
1152
1153         Have MediaStream::getAudioTracks(), MediaStream::getVideoTracks() return const references
1154         https://bugs.webkit.org/show_bug.cgi?id=144794
1155
1156         Reviewed by Philippe Normand.
1157
1158         * Modules/mediastream/MediaStream.h: getAudioTracks() and getVideoTracks()
1159         should return a const reference to the member variables, instead of
1160         copying the objects on every call.
1161
1162 2015-05-10  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1163
1164         Use Ref instead of PassRefPtr in WebCore/page
1165         https://bugs.webkit.org/show_bug.cgi?id=144841
1166
1167         Reviewed by Darin Adler.
1168
1169         To kill PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr
1170         in WebCore/page.
1171
1172         No new tests, no behavior changes.
1173
1174         * page/DebugPageOverlays.cpp:
1175         * page/EventSource.cpp:
1176         (WebCore::EventSource::create):
1177         * page/EventSource.h:
1178         * page/History.h:
1179         (WebCore::History::create):
1180         * page/Location.h:
1181         (WebCore::Location::create):
1182         * page/MainFrame.cpp:
1183         (WebCore::MainFrame::create):
1184         * page/MainFrame.h:
1185         * page/Navigator.h:
1186         (WebCore::Navigator::create):
1187         * page/PageOverlay.cpp:
1188         (WebCore::PageOverlay::create):
1189         * page/PageOverlay.h:
1190         * page/Performance.h:
1191         * page/PerformanceEntryList.h:
1192         (WebCore::PerformanceEntryList::create):
1193         * page/PerformanceMark.h:
1194         (WebCore::PerformanceMark::create):
1195         * page/PerformanceMeasure.h:
1196         (WebCore::PerformanceMeasure::create):
1197         * page/PerformanceNavigation.h:
1198         (WebCore::PerformanceNavigation::create):
1199         * page/PerformanceResourceTiming.h:
1200         (WebCore::PerformanceResourceTiming::create):
1201         * page/PerformanceTiming.h:
1202         (WebCore::PerformanceTiming::create):
1203         * page/PerformanceUserTiming.h:
1204         (WebCore::UserTiming::create):
1205         * page/Screen.h:
1206         * page/Settings.cpp:
1207         (WebCore::Settings::create):
1208         * page/Settings.h:
1209         * page/TextIndicator.cpp:
1210         (WebCore::TextIndicator::create):
1211         * page/TextIndicator.h:
1212         * page/UserContentController.cpp:
1213         (WebCore::UserContentController::create):
1214         * page/UserContentController.h:
1215         * page/UserMessageHandlerDescriptor.h:
1216         (WebCore::UserMessageHandlerDescriptor::create):
1217         * page/UserMessageHandlersNamespace.h:
1218         * page/VisitedLinkStore.h:
1219         * page/WebKitNamespace.h:
1220         (WebCore::WebKitNamespace::create):
1221         * page/WebKitPoint.h:
1222         (WebCore::WebKitPoint::create):
1223         * page/WorkerNavigator.h:
1224         (WebCore::WorkerNavigator::create):
1225         * page/animation/ImplicitAnimation.h:
1226         (WebCore::ImplicitAnimation::create):
1227         * page/animation/KeyframeAnimation.h:
1228         * page/mac/ServicesOverlayController.h:
1229         * page/mac/ServicesOverlayController.mm:
1230         (WebCore::ServicesOverlayController::Highlight::createForSelection):
1231         (WebCore::ServicesOverlayController::Highlight::createForTelephoneNumber):
1232         * page/scrolling/ScrollingCoordinator.cpp:
1233         (WebCore::ScrollingCoordinator::create):
1234         * page/scrolling/ScrollingCoordinator.h:
1235         * page/scrolling/ScrollingStateFixedNode.cpp:
1236         (WebCore::ScrollingStateFixedNode::create):
1237         (WebCore::ScrollingStateFixedNode::clone):
1238         * page/scrolling/ScrollingStateFixedNode.h:
1239         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
1240         (WebCore::ScrollingStateFrameScrollingNode::create):
1241         (WebCore::ScrollingStateFrameScrollingNode::clone):
1242         * page/scrolling/ScrollingStateFrameScrollingNode.h:
1243         * page/scrolling/ScrollingStateNode.h:
1244         * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
1245         (WebCore::ScrollingStateOverflowScrollingNode::create):
1246         (WebCore::ScrollingStateOverflowScrollingNode::clone):
1247         * page/scrolling/ScrollingStateOverflowScrollingNode.h:
1248         * page/scrolling/ScrollingStateStickyNode.cpp:
1249         (WebCore::ScrollingStateStickyNode::create):
1250         (WebCore::ScrollingStateStickyNode::clone):
1251         * page/scrolling/ScrollingStateStickyNode.h:
1252         * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
1253         (WebCore::ScrollingCoordinator::create):
1254         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
1255         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
1256         (WebCore::ScrollingTreeFrameScrollingNodeIOS::create):
1257         * page/scrolling/ios/ScrollingTreeIOS.cpp:
1258         (WebCore::ScrollingTreeIOS::create):
1259         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1260         (WebCore::ScrollingCoordinator::create):
1261         * page/scrolling/mac/ScrollingTreeFixedNode.h:
1262         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
1263         (WebCore::ScrollingTreeFixedNode::create):
1264         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
1265         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1266         (WebCore::ScrollingTreeFrameScrollingNodeMac::create):
1267         * page/scrolling/mac/ScrollingTreeMac.cpp:
1268         (ScrollingTreeMac::create):
1269         * page/scrolling/mac/ScrollingTreeMac.h:
1270         * page/scrolling/mac/ScrollingTreeStickyNode.h:
1271         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
1272         (WebCore::ScrollingTreeStickyNode::create):
1273
1274 2015-05-10  Simon Fraser  <simon.fraser@apple.com>
1275
1276         background-position sometimes doesn't work properly with background-attachment: fixed
1277         https://bugs.webkit.org/show_bug.cgi?id=103757
1278         rdar://problem/18749925
1279
1280         Reviewed by Darin Adler.
1281         
1282         Fix sizing issues with fixed backgrounds when top content inset (blurred toolbar) is in
1283         effect.
1284         
1285         The primary issue was that positioningAreaSize was including the top content inset
1286         height, and should not have been, but there were also issues with the "fixedBackgroundPaintsInLocalCoordinates"
1287         code path, which kicks in when the root background is fixed.
1288
1289         Tests: platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover-local.html
1290                platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover.html
1291                platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-local.html
1292                platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-positioned.html
1293
1294         * rendering/RenderBoxModelObject.cpp:
1295         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
1296
1297 2015-05-10  Sungmann Cho  <sungmann.cho@navercorp.com>
1298
1299         Get rid of the public item accessors in BackForwardClient
1300         https://bugs.webkit.org/show_bug.cgi?id=144827
1301
1302         Reviewed by Darin Adler.
1303
1304         Remove backItem(), currentItem(), and forwardItem() from BackForwardClient.
1305         We can still use these functionalities through BackForwardController.
1306
1307         No new tests, no behavior change.
1308
1309         * history/BackForwardClient.h:
1310         (WebCore::BackForwardClient::backItem): Deleted.
1311         (WebCore::BackForwardClient::currentItem): Deleted.
1312         (WebCore::BackForwardClient::forwardItem): Deleted.
1313
1314 2015-05-10  Sungmann Cho  <sungmann.cho@navercorp.com>
1315
1316         Rename Length::isPercent() and Length::isPercentNotCalculated().
1317         https://bugs.webkit.org/show_bug.cgi?id=144791
1318
1319         Reviewed by Darin Adler.
1320
1321         1. Rename these methods as below for consistency and clarity.
1322
1323         Length::isPercentNotCalculated() => Length::isPercent()
1324         Length::isPercent() => Length::isPercentOrCalculated()
1325
1326         2. Simplify the condition check of length type in SVGLengthContext::valueForLength().
1327
1328         "length.isPercent() && !length.isCalculated()" => "length.isPercent()"
1329
1330         No new tests, no behavior change.
1331
1332         * css/CSSComputedStyleDeclaration.cpp:
1333         (WebCore::valueForImageSliceSide):
1334         (WebCore::valueForReflection):
1335         (WebCore::percentageOrZoomAdjustedValue):
1336         (WebCore::lineHeightFromStyle):
1337         (WebCore::ComputedStyleExtractor::propertyValue):
1338         * html/HTMLPlugInImageElement.cpp:
1339         (WebCore::is100Percent):
1340         * page/animation/AnimationBase.cpp:
1341         (WebCore::AnimationBase::computeTransformedExtentViaTransformList):
1342         * platform/Length.h:
1343         (WebCore::Length::percent):
1344         (WebCore::Length::isPercent):
1345         (WebCore::Length::isPercentOrCalculated):
1346         (WebCore::Length::isSpecified):
1347         (WebCore::Length::isPercentNotCalculated): Deleted.
1348         * platform/graphics/transforms/TranslateTransformOperation.h:
1349         * rendering/AutoTableLayout.cpp:
1350         (WebCore::AutoTableLayout::recalcColumn):
1351         (WebCore::AutoTableLayout::fullRecalc):
1352         (WebCore::shouldScaleColumns):
1353         (WebCore::AutoTableLayout::computeIntrinsicLogicalWidths):
1354         (WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
1355         (WebCore::AutoTableLayout::layout):
1356         * rendering/FixedTableLayout.cpp:
1357         (WebCore::FixedTableLayout::calcWidthArray):
1358         (WebCore::FixedTableLayout::applyPreferredLogicalWidthQuirks):
1359         (WebCore::FixedTableLayout::layout):
1360         * rendering/RenderBlock.cpp:
1361         (WebCore::RenderBlock::isSelfCollapsingBlock):
1362         (WebCore::RenderBlock::textIndentOffset):
1363         * rendering/RenderBox.cpp:
1364         (WebCore::RenderBox::needsPreferredWidthsRecalculation):
1365         (WebCore::RenderBox::computeLogicalHeight):
1366         (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
1367         (WebCore::RenderBox::computePercentageLogicalHeight):
1368         (WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth):
1369         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
1370         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
1371         (WebCore::RenderBox::availableLogicalHeightUsing):
1372         (WebCore::logicalWidthIsResolvable):
1373         (WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock):
1374         (WebCore::RenderBox::hasUnsplittableScrollingOverflow):
1375         (WebCore::RenderBox::layoutOverflowRectForPropagation):
1376         * rendering/RenderBoxModelObject.cpp:
1377         (WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight):
1378         (WebCore::RenderBoxModelObject::relativePositionOffset):
1379         (WebCore::RenderBoxModelObject::computedCSSPadding):
1380         (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
1381         (WebCore::RenderBoxModelObject::calculateFillTileSize):
1382         * rendering/RenderDeprecatedFlexibleBox.cpp:
1383         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
1384         (WebCore::RenderDeprecatedFlexibleBox::clearLineClamp):
1385         * rendering/RenderElement.cpp:
1386         (WebCore::mustRepaintFillLayers):
1387         * rendering/RenderFileUploadControl.cpp:
1388         (WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths):
1389         * rendering/RenderFrameSet.cpp:
1390         (WebCore::RenderFrameSet::layOutAxis):
1391         * rendering/RenderImage.cpp:
1392         (WebCore::RenderImage::repaintOrMarkForLayout):
1393         * rendering/RenderInline.cpp:
1394         (WebCore::computeMargin):
1395         * rendering/RenderListBox.cpp:
1396         (WebCore::RenderListBox::computeIntrinsicLogicalWidths):
1397         * rendering/RenderMenuList.cpp:
1398         (RenderMenuList::computeIntrinsicLogicalWidths):
1399         * rendering/RenderObject.cpp:
1400         (WebCore::objectIsRelayoutBoundary):
1401         * rendering/RenderReplaced.cpp:
1402         (WebCore::RenderReplaced::computePreferredLogicalWidths):
1403         * rendering/RenderSlider.cpp:
1404         (WebCore::RenderSlider::computeIntrinsicLogicalWidths):
1405         * rendering/RenderTable.cpp:
1406         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
1407         * rendering/RenderTableSection.cpp:
1408         (WebCore::RenderTableSection::layoutRows):
1409         * rendering/RenderTextControl.cpp:
1410         (WebCore::RenderTextControl::computeIntrinsicLogicalWidths):
1411         * rendering/RenderView.cpp:
1412         (WebCore::RenderView::layout):
1413         * rendering/RootInlineBox.cpp:
1414         (WebCore::RootInlineBox::verticalPositionForBox):
1415         * rendering/style/GridLength.h:
1416         (WebCore::GridLength::isPercentage):
1417         * rendering/style/GridTrackSize.h:
1418         (WebCore::GridTrackSize::isPercentage):
1419         * rendering/style/RenderStyle.cpp:
1420         (WebCore::RenderStyle::computedLineHeight):
1421         * rendering/svg/RenderSVGRoot.cpp:
1422         (WebCore::RenderSVGRoot::hasRelativeDimensions):
1423         * svg/SVGLengthContext.cpp:
1424         (WebCore::SVGLengthContext::valueForLength):
1425         * svg/graphics/SVGImage.cpp:
1426         (WebCore::SVGImage::hasRelativeWidth):
1427         (WebCore::SVGImage::hasRelativeHeight):
1428
1429 2015-05-10  Sungmann Cho  <sungmann.cho@navercorp.com>
1430
1431         Remove unnecessary semicolons.
1432         https://bugs.webkit.org/show_bug.cgi?id=144844
1433
1434         Reviewed by Darin Adler.
1435
1436         No new tests, no behavior change.
1437
1438         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1439         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
1440         * platform/ios/PasteboardIOS.mm:
1441         (WebCore::Pasteboard::readString):
1442         * platform/mediastream/RealtimeMediaSourceCapabilities.h:
1443         (WebCore::RealtimeMediaSourceCapabilities::setHasVideoSource):
1444         * platform/network/mac/ResourceErrorMac.mm:
1445         (WebCore::ResourceError::nsError):
1446         * rendering/RenderThemeIOS.mm:
1447         (WebCore::getSharedFunctionRef):
1448
1449 2015-05-10  Sungmann Cho  <sungmann.cho@navercorp.com>
1450
1451         Remove unnecessary forward declarations in StyleProperties.h
1452         https://bugs.webkit.org/show_bug.cgi?id=144843
1453
1454         Reviewed by Darin Adler.
1455
1456         No new tests, no behavior change.        
1457
1458         * css/StyleProperties.h:
1459
1460 2015-05-10  Darin Adler  <darin@apple.com>
1461
1462         [Cocoa] Fix paths and resort WebCore project file
1463         https://bugs.webkit.org/show_bug.cgi?id=144838
1464
1465         Reviewed by Dan Bernstein.
1466
1467         * WebCore.xcodeproj/project.pbxproj: Re-sorted this file with the
1468         sort-Xcode-project-file script and fixed the paths in the platform/ios directory.
1469
1470 2015-05-10  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
1471
1472         [Streams API] Refactor ReadableStreamReader close promise callback cleaning
1473         https://bugs.webkit.org/show_bug.cgi?id=144799
1474
1475         Reviewed by Darin Adler.
1476
1477         Moved close callback cleaning to releaseStream, which is now releaseStreamAndClean.
1478         Moved that method to private as it is no longer needed by subclasses.
1479
1480         No behavior changes.
1481
1482         * Modules/streams/ReadableStreamReader.cpp:
1483         (WebCore::ReadableStreamReader::releaseStreamAndClean):
1484         (WebCore::ReadableStreamReader::changeStateToClosed):
1485         (WebCore::ReadableStreamReader::changeStateToErrored):
1486         * Modules/streams/ReadableStreamReader.h:
1487
1488 2015-05-10  Darin Adler  <darin@apple.com>
1489
1490         [Cocoa] Don't soft link DataDetectorsCore
1491         https://bugs.webkit.org/show_bug.cgi?id=144837
1492
1493         Reviewed by Dan Bernstein.
1494
1495         Linking this in the normal way should slightly speed up the web process
1496         startup time. We don't need to soft link it: It's present in the
1497         OS X base system and there is no reference cycle with WebKit.
1498
1499         * Configurations/WebCore.xcconfig: Added PrivateFrameworks to
1500         FRAMEWORK_SEARCH_PATHS for Mac and added DataDetectorsCore to
1501         OTHER_LDFLAGS_PLATFORM for Mac. We may want to do this later for iOS too.
1502
1503         * WebCore.xcodeproj/project.pbxproj: Added DataDetectorsCoreSPI.h.
1504
1505         * editing/mac/DataDetection.mm:
1506         (WebCore::DataDetection::detectItemAroundHitTestResult): Removed check to see
1507         if DataDetectorsCore is available.
1508
1509         * page/mac/ServicesOverlayController.h: Simplified a forward declaration to
1510         only declare what we actually use.
1511         * page/mac/ServicesOverlayController.mm: Moved SOFT_LINK from here to the
1512         DataDetectorsSPI.h header.
1513
1514         * platform/spi/cocoa/DataDetectorsCoreSPI.h: Added. This is the low level
1515         DataDetectorsCore framework, which has no reference cycle with WebKit, and
1516         which we can link to normally. Moved the content here from DataDetectorsSPI.h,
1517         added a USE(APPLE_INTERNAL_SDK) path that uses the system headers, and fixed
1518         the incorrect return type on DDScannerScanQuery, which was detected when
1519         using the system headers in conjunction with this file.
1520
1521         * platform/spi/mac/DataDetectorsSPI.h: Removed the content of this file that
1522         was actually about DataDetectorsCore. Also added a USE(APPLE_INTERNAL_SDK)
1523         path that uses the system headers and moved a few stray DataDetectors SPI
1524         definitions from elsewhere into this header.
1525
1526 2015-05-10  Chris Fleizach  <cfleizach@apple.com>
1527
1528         AX: Don't expose elements as data tables just because they use display: table
1529         https://bugs.webkit.org/show_bug.cgi?id=144804
1530
1531         Reviewed by Mario Sanchez Prada.
1532
1533         Elements will create RenderTable objects if they have display:table. We shouldn't assume these are accessibility tables.
1534
1535         Test: accessibility/css-table-ignored.html
1536
1537         * accessibility/AccessibilityTable.cpp:
1538         (WebCore::AccessibilityTable::isDataTable):
1539
1540 2015-05-09  Chris Dumez  <cdumez@apple.com>
1541
1542         Introduce ParentNode.idl / NonDocumentTypeChildNode.idl
1543         https://bugs.webkit.org/show_bug.cgi?id=144825
1544
1545         Reviewed by Sam Weinig.
1546
1547         Introduce ParentNode.idl / NonDocumentTypeChildNode.idl as per DOM
1548         specification and to avoid IDL code duplication:
1549         - https://dom.spec.whatwg.org/#interface-parentnode
1550         - https://dom.spec.whatwg.org/#interface-nondocumenttypechildnode
1551
1552         No Web-Exposed behavior change.
1553
1554         * CMakeLists.txt:
1555         * DerivedSources.make:
1556         * WebCore.xcodeproj/project.pbxproj:
1557         * dom/CharacterData.idl:
1558         * dom/Document.idl:
1559         * dom/DocumentFragment.idl:
1560         * dom/Element.idl:
1561         * dom/NonDocumentTypeChildNode.idl: Copied from Source/WebCore/dom/DocumentFragment.idl.
1562         * dom/ParentNode.idl: Copied from Source/WebCore/dom/DocumentFragment.idl.
1563
1564 2015-05-09  Chris Dumez  <cdumez@apple.com>
1565
1566         Invalidate the FontCache on WebProcess suspension / critical memory pressure
1567         https://bugs.webkit.org/show_bug.cgi?id=144821
1568
1569         Reviewed by Antti Koivisto.
1570
1571         Invalidate the FontCache on WebProcess suspension / critical memory
1572         pressure to free a bit more memory (an extra 4-16Kb per WebProcess on
1573         the pages I tested). We already purge inactive font data on
1574         non-critical memory warning but invalidating the whole FontCache takes
1575         care of clearing the FontCascade cache and the fontPlatformData cache
1576         as well.
1577
1578         * platform/MemoryPressureHandler.cpp:
1579         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
1580
1581 2015-05-09  Yoav Weiss  <yoav@yoav.ws>
1582
1583         Remove the PICTURE_SIZES build flag
1584         https://bugs.webkit.org/show_bug.cgi?id=144679
1585
1586         Reviewed by Benjamin Poulain.
1587
1588         Removed the PICTURE_SIZES build time flag.
1589
1590         No new tests, since there's no functionality change.
1591
1592         * Configurations/FeatureDefines.xcconfig:
1593         * css/CSSGrammar.y.in:
1594         * css/CSSParser.cpp:
1595         (WebCore::CSSParser::detectAtToken):
1596         * css/CSSParser.h:
1597         * css/SourceSizeList.cpp:
1598         (WebCore::parseSizesAttribute): Deleted.
1599         * html/HTMLImageElement.cpp:
1600         (WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):
1601         * html/HTMLImageElement.h:
1602         (WebCore::HTMLImageElement::currentSrc):
1603         * html/HTMLImageElement.idl:
1604         * html/parser/HTMLPreloadScanner.cpp:
1605         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
1606         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
1607         * html/parser/HTMLSrcsetParser.cpp:
1608         (WebCore::parseDescriptors):
1609         (WebCore::pickBestImageCandidate):
1610
1611 2015-05-08  Myles C. Maxfield  <mmaxfield@apple.com>
1612
1613         Remove convenience constructors for TextRun
1614         https://bugs.webkit.org/show_bug.cgi?id=144752
1615
1616         These convenience constructors are unnecessary. Moving the code that makes the StringView
1617         back to the call site will also help us make things more elegant in future refactoring.
1618
1619         Reviewed by Darin Adler.
1620
1621         No new tests because there is no behavior change.
1622
1623         * css/CSSPrimitiveValue.cpp:
1624         (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText): Remove ambiguous call.
1625         * platform/graphics/StringTruncator.cpp:
1626         (WebCore::stringWidth):
1627         * platform/graphics/TextRun.h:
1628         (WebCore::TextRun::TextRun):
1629         * platform/mac/DragImageMac.mm:
1630         (WebCore::widthWithFont):
1631         (WebCore::drawAtPoint):
1632         * rendering/SimpleLineLayout.cpp:
1633         (WebCore::SimpleLineLayout::canUseFor):
1634         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
1635         (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
1636         (WebCore::SimpleLineLayout::TextFragmentIterator::runWidth):
1637         * rendering/TextPainter.cpp:
1638         (WebCore::TextPainter::paintText):
1639
1640 2015-05-08  Sam Weinig  <sam@webkit.org>
1641
1642         Element Traversal is not just Elements anymore
1643         https://bugs.webkit.org/show_bug.cgi?id=144822
1644
1645         Reviewed by Simon Fraser.
1646
1647         Match other browsers and the new DOM spec at https://dom.spec.whatwg.org by
1648         exposing the element traversal methods on non-Elements.
1649
1650         - Makes firstElementChild, lastElementChild and childElementCount available on
1651           Document and DocumentFragment in addition to Element.
1652         - Makes nextElementSibling and previousElementSibling available on CharacterData
1653           in addition to Element.
1654
1655         Tests: fast/dom/element-traversal-on-character-data.html
1656                fast/dom/element-traversal-on-document-fragment.html
1657                fast/dom/element-traversal-on-document.html
1658
1659         * dom/CharacterData.idl:
1660         Expose nextElementSibling and previousElementSibling.
1661
1662         * dom/ContainerNode.cpp:
1663         (WebCore::ContainerNode::firstElementChild):
1664         (WebCore::ContainerNode::lastElementChild):
1665         (WebCore::ContainerNode::childElementCount):
1666         * dom/ContainerNode.h:
1667         Move implementations of firstElementChild, lastElementChild and childElementCount here
1668         from Element to make them shareable.
1669
1670         * dom/Document.idl:
1671         * dom/DocumentFragment.idl:
1672         Expose firstElementChild, lastElementChild and childElementCount.
1673
1674         * dom/Element.cpp:
1675         (WebCore::Element::firstElementChild): Deleted.
1676         (WebCore::Element::lastElementChild): Deleted.
1677         (WebCore::Element::previousElementSibling): Deleted.
1678         (WebCore::Element::nextElementSibling): Deleted.
1679         (WebCore::Element::childElementCount): Deleted.
1680         * dom/Element.h:
1681         Move element traversal functions down to Node and ContainerNode.
1682
1683         * dom/Element.idl:
1684         Update comments to indicate where these functions are defined now.
1685
1686         * dom/Node.cpp:
1687         (WebCore::Node::previousElementSibling):
1688         (WebCore::Node::nextElementSibling):
1689         * dom/Node.h:
1690         Move implementations of nextElementSibling and previousElementSibling here
1691         from Element to make them shareable.
1692
1693 2015-05-08  Michael Catanzaro  <mcatanzaro@igalia.com>, Martin Robinson <mrobinson@igalia.com>
1694
1695         [GTK] Checks for DEVELOPMENT_BUILD are all wrong
1696         https://bugs.webkit.org/show_bug.cgi?id=144746
1697
1698         Reviewed by Carlos Garcia Campos.
1699
1700         Use ENABLE(DEVELOPER_MODE) rather than DEVELOPMENT_BUILD.
1701
1702         * platform/gtk/GtkUtilities.cpp:
1703         * platform/gtk/GtkUtilities.h:
1704         * platform/text/gtk/HyphenationLibHyphen.cpp:
1705         (WebCore::availableLocales):
1706
1707 2015-05-08  Alexey Proskuryakov  <ap@apple.com>
1708
1709         Crashes in SocketStreamHandleBase::close
1710         https://bugs.webkit.org/show_bug.cgi?id=144767
1711         rdar://problem/20486538
1712
1713         Reviewed by Brady Eidson.
1714
1715         This is a speculative fix, I could not reproduce the crash.
1716
1717         * Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::processFrame):
1718         Normally, processOutgoingFrameQueue() closes the handle in the end when called in
1719         OutgoingFrameQueueClosing state. But there is no definitive protection against
1720         processing two CLOSE frames, in which case we'd try to close the handle twice.
1721
1722         * platform/network/cf/SocketStreamHandleCFNet.cpp:
1723         (WebCore::SocketStreamHandle::readStreamCallback): Passing empty data to the client
1724         results in the socket being closed, which makes no sense here.
1725
1726 2015-05-08  Commit Queue  <commit-queue@webkit.org>
1727
1728         Unreviewed, rolling out r183996.
1729         https://bugs.webkit.org/show_bug.cgi?id=144806
1730
1731         ASan detected use-after free (Requested by ap on #webkit).
1732
1733         Reverted changeset:
1734
1735         "Remove convenience constructors for TextRun"
1736         https://bugs.webkit.org/show_bug.cgi?id=144752
1737         http://trac.webkit.org/changeset/183996
1738
1739 2015-05-08  Eric Carlson  <eric.carlson@apple.com>
1740
1741         [Mac] Playback target clients do not unregister on page reload
1742         https://bugs.webkit.org/show_bug.cgi?id=144761
1743
1744         Reviewed by Brady Eidson.
1745
1746         * dom/Document.cpp:
1747         (WebCore::Document::prepareForDestruction): Unregister all target picker clients.
1748
1749         * html/HTMLMediaElement.cpp:
1750         (WebCore::HTMLMediaElement::registerWithDocument): Register for page cache callback.
1751         (WebCore::HTMLMediaElement::unregisterWithDocument): Unregister for page cache callback.
1752         (WebCore::HTMLMediaElement::documentWillSuspendForPageCache): New.
1753         (WebCore::HTMLMediaElement::documentDidResumeFromPageCache): New.
1754
1755 2015-05-08  Chris Dumez  <cdumez@apple.com>
1756
1757         Throttle RequestAnimationFrame in subframes that are outside the viewport
1758         https://bugs.webkit.org/show_bug.cgi?id=144718
1759         <rdar://problem/20688782>
1760
1761         Reviewed by Simon Fraser.
1762
1763         Throttle RequestAnimationFrame in subframes that are outside the
1764         viewport or have "display: none" for performance and power.
1765
1766         Tests: fast/animation/request-animation-frame-throttle-subframe-display-none.html
1767                fast/animation/request-animation-frame-throttle-subframe.html
1768
1769         * dom/Document.h:
1770         (WebCore::Document::scriptedAnimationController):
1771         * dom/ScriptedAnimationController.cpp:
1772         (WebCore::ScriptedAnimationController::setThrottled):
1773         (WebCore::ScriptedAnimationController::isThrottled):
1774         * dom/ScriptedAnimationController.h:
1775         * loader/FrameLoader.cpp:
1776         (WebCore::FrameLoader::open):
1777         Call FrameView::setFrameRect() only *after* the view has been
1778         set on the Frame. Otherwise, setFrameRect() ends up calling
1779         viewportContentsChanged() and we hit the
1780         ASSERT(frame().view() == this) assertion in windowClipRect()
1781         because the Frame still has its old FrameView. This is covered
1782         by loader/go-back-to-different-window-size.html layout test.
1783
1784         * page/FrameView.cpp:
1785         (WebCore::FrameView::viewportContentsChanged):
1786         (WebCore::FrameView::applyRecursivelyWithVisibleRect):
1787         (WebCore::FrameView::resumeVisibleImageAnimations):
1788         (WebCore::FrameView::updateScriptedAnimationsThrottlingState):
1789         (WebCore::FrameView::resumeVisibleImageAnimationsIncludingSubframes):
1790         (WebCore::FrameView::updateThrottledDOMTimersState):
1791         (WebCore::FrameView::scrollPositionChanged): Deleted.
1792         (WebCore::FrameView::sendResizeEventIfNeeded): Deleted.
1793         * page/FrameView.h:
1794         * testing/Internals.cpp:
1795         (WebCore::Internals::isRequestAnimationFrameThrottled):
1796         (WebCore::Internals::isTimerThrottled): Deleted.
1797         * testing/Internals.h:
1798         * testing/Internals.idl:
1799
1800 2015-05-08  Daniel Bates  <dabates@apple.com>
1801
1802         Fix the iOS Simulator external SDK build following <http://trac.webkit.org/changeset/181918>
1803
1804         Remove unused iOS Simulator-variant of CARenderServerRenderLayerWithTransform(). Also guard
1805         IOSurfaceRef-variant of CARenderServerRenderLayerWithTransform() with USE(IOSURFACE)
1806         since it is only applicable on platforms that use IOSurface.
1807
1808         * platform/spi/cocoa/QuartzCoreSPI.h:
1809
1810 2015-05-08  Myles C. Maxfield  <mmaxfield@apple.com>
1811
1812         Remove convenience constructors for TextRun
1813         https://bugs.webkit.org/show_bug.cgi?id=144752
1814
1815         These convenience constructors are unnecessary. Moving the code that makes the StringView
1816         back to the call site will also help us make things more elegant in future refactoring.
1817
1818         Reviewed by Darin Adler.
1819
1820         No new tests because there is no behavior change.
1821
1822         * css/CSSPrimitiveValue.cpp:
1823         (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText): Remove ambiguous call.
1824         * platform/graphics/StringTruncator.cpp:
1825         (WebCore::stringWidth):
1826         * platform/graphics/TextRun.h:
1827         (WebCore::TextRun::TextRun):
1828         * platform/mac/DragImageMac.mm:
1829         (WebCore::widthWithFont):
1830         (WebCore::drawAtPoint):
1831         * rendering/SimpleLineLayout.cpp:
1832         (WebCore::SimpleLineLayout::canUseFor):
1833         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
1834         (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
1835         (WebCore::SimpleLineLayout::TextFragmentIterator::runWidth):
1836         * rendering/TextPainter.cpp:
1837         (WebCore::TextPainter::paintText):
1838
1839 2015-05-08  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
1840
1841         [Streams API] ReadableStream constructor start function should be able to error the stream
1842         https://bugs.webkit.org/show_bug.cgi?id=141162
1843
1844         Reviewed by Darin Adler.
1845
1846         This patch implements the functionality of the ReadableStreamController error function.
1847         It basically changes the state of the stream to errored, resolves the ready promise and rejects the closed promise.
1848         Adding support to reject promise with any JSValue.
1849
1850         Support for storing the error is added to both reader and stream.
1851
1852         Test: streams/readable-stream-controller-error.html and rebased tests
1853
1854         * Modules/streams/ReadableStream.cpp:
1855         (WebCore::ReadableStream::changeStateToErrored):
1856         * Modules/streams/ReadableStream.h:
1857         * Modules/streams/ReadableStreamReader.cpp:
1858         (WebCore::ReadableStreamReader::initialize):
1859         (WebCore::ReadableStreamReader::closed):
1860         (WebCore::ReadableStreamReader::changeStateToClosed):
1861         (WebCore::ReadableStreamReader::changeStateToErrored):
1862         * Modules/streams/ReadableStreamReader.h:
1863         * bindings/js/JSDOMPromise.h:
1864         (WebCore::DeferredWrapper::reject):
1865         * bindings/js/JSReadableStreamControllerCustom.cpp:
1866         (WebCore::JSReadableStreamController::error):
1867         * bindings/js/JSReadableStreamReaderCustom.cpp:
1868         (WebCore::JSReadableStreamReader::closed):
1869         * bindings/js/ReadableJSStream.cpp:
1870         (WebCore::ReadableJSStream::createReader):
1871         (WebCore::ReadableJSStream::storeError):
1872         (WebCore::ReadableJSStream::Reader::storeError):
1873         (WebCore::ReadableJSStream::jsController): Deleted.
1874         * bindings/js/ReadableJSStream.h:
1875
1876 2015-05-08  Commit Queue  <commit-queue@webkit.org>
1877
1878         Unreviewed, rolling out r183985.
1879         https://bugs.webkit.org/show_bug.cgi?id=144796
1880
1881         broke loader/go-back-to-different-window-size.html (Requested
1882         by kling on #webkit).
1883
1884         Reverted changeset:
1885
1886         "Throttle RequestAnimationFrame in subframes that are outside
1887         the viewport"
1888         https://bugs.webkit.org/show_bug.cgi?id=144718
1889         http://trac.webkit.org/changeset/183985
1890
1891 2015-05-08  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1892
1893         SharedBuffer::m_size should be initialized to 0 when defining it
1894         https://bugs.webkit.org/show_bug.cgi?id=144740
1895
1896         Reviewed by Darin Adler.
1897
1898         Setting m_size to 0 when declaring it and updating constructor definitions.
1899
1900         No change in behaviour.
1901
1902         * platform/SharedBuffer.cpp:
1903         (WebCore::SharedBuffer::SharedBuffer):
1904         * platform/SharedBuffer.h:
1905         * platform/cf/SharedBufferCF.cpp:
1906         (WebCore::SharedBuffer::SharedBuffer):
1907         * platform/soup/SharedBufferSoup.cpp:
1908         (WebCore::SharedBuffer::SharedBuffer):
1909
1910 2015-05-08  Commit Queue  <commit-queue@webkit.org>
1911
1912         Unreviewed, rolling out r183945.
1913         https://bugs.webkit.org/show_bug.cgi?id=144789
1914
1915         "It broke all the GTK+ tests" (Requested by KaL on #webkit).
1916
1917         Reverted changeset:
1918
1919         "[GTK] Checks for DEVELOPMENT_BUILD are all wrong"
1920         https://bugs.webkit.org/show_bug.cgi?id=144746
1921         http://trac.webkit.org/changeset/183945
1922
1923 2015-05-07  Chris Dumez  <cdumez@apple.com>
1924
1925         Throttle RequestAnimationFrame in subframes that are outside the viewport
1926         https://bugs.webkit.org/show_bug.cgi?id=144718
1927         <rdar://problem/20688782>
1928
1929         Reviewed by Simon Fraser.
1930
1931         Throttle RequestAnimationFrame in subframes that are outside the
1932         viewport or have "display: none" for performance and power.
1933
1934         Tests: fast/animation/request-animation-frame-throttle-subframe-display-none.html
1935                fast/animation/request-animation-frame-throttle-subframe.html
1936
1937         * dom/Document.h:
1938         (WebCore::Document::scriptedAnimationController):
1939         * dom/ScriptedAnimationController.cpp:
1940         (WebCore::ScriptedAnimationController::setThrottled):
1941         (WebCore::ScriptedAnimationController::isThrottled):
1942         * dom/ScriptedAnimationController.h:
1943         * page/FrameView.cpp:
1944         (WebCore::FrameView::viewportContentsChanged):
1945         (WebCore::FrameView::applyRecursivelyWithVisibleRect):
1946         (WebCore::FrameView::resumeVisibleImageAnimations):
1947         (WebCore::FrameView::updateScriptedAnimationsThrottlingState):
1948         (WebCore::FrameView::resumeVisibleImageAnimationsIncludingSubframes):
1949         (WebCore::FrameView::updateThrottledDOMTimersState):
1950         (WebCore::FrameView::scrollPositionChanged): Deleted.
1951         (WebCore::FrameView::sendResizeEventIfNeeded): Deleted.
1952         * page/FrameView.h:
1953         * testing/Internals.cpp:
1954         (WebCore::Internals::isRequestAnimationFrameThrottled):
1955         (WebCore::Internals::isTimerThrottled): Deleted.
1956         * testing/Internals.h:
1957         * testing/Internals.idl:
1958
1959 2015-05-07  Yoav Weiss  <yoav@yoav.ws>
1960
1961         Calculate source-size length as a float
1962         https://bugs.webkit.org/show_bug.cgi?id=144766
1963
1964         Reviewed by Dean Jackson.
1965
1966         Make sure that the source-size length is calculated as a float,
1967         to align with the spec.
1968
1969         Test: fast/dom/HTMLImageElement/sizes/image-sizes-1x.html
1970               fast/dom/HTMLImageElement/sizes/image-sizes-2x.html
1971
1972         * css/SourceSizeList.cpp:
1973         (WebCore::parseSizesAttribute):
1974         (WebCore::defaultLength):
1975         (WebCore::computeLength):
1976         * css/SourceSizeList.h:
1977         * html/HTMLImageElement.cpp:
1978         (WebCore::HTMLImageElement::parseAttribute):
1979         * html/parser/HTMLPreloadScanner.cpp:
1980         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
1981         * html/parser/HTMLSrcsetParser.cpp:
1982         (WebCore::pickBestImageCandidate):
1983         (WebCore::bestFitSourceForImageAttributes):
1984         * html/parser/HTMLSrcsetParser.h:
1985
1986 2015-05-07  Commit Queue  <commit-queue@webkit.org>
1987
1988         Unreviewed, rolling out r183895.
1989         https://bugs.webkit.org/show_bug.cgi?id=144786
1990
1991         Many tests became flaky (Requested by ap on #webkit).
1992
1993         Reverted changeset:
1994
1995         "Expose more font weights for -apple-system"
1996         https://bugs.webkit.org/show_bug.cgi?id=144707
1997         http://trac.webkit.org/changeset/183895
1998
1999 2015-05-07  Hyungwook Lee  <hyungwook.lee@navercorp.com>
2000
2001         Add first-letter assert exception in RenderButton::setupInnerStyle().
2002         https://bugs.webkit.org/show_bug.cgi?id=140517OB
2003
2004         Reviewed by Darin Adler.
2005
2006         StyleResolver references inner block's render style temporary in
2007         RenderBlock::styleDidChange() when we have first-letter css pseudo
2008         element.
2009
2010         * rendering/RenderButton.cpp:
2011         (WebCore::RenderButton::setupInnerStyle):
2012
2013 2015-05-07  Chris Dumez  <cdumez@apple.com>
2014
2015         Unreviewed, fix build after r183970.
2016
2017         WEBCORE_EXPORT should not be used on inlined functions.
2018
2019         * platform/graphics/ca/GraphicsLayerCA.h:
2020
2021 2015-05-07  Anders Carlsson  <andersca@apple.com>
2022
2023         Build fixes.
2024
2025         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2026         (-[WebAccessibilityObjectWrapper doAXRTFForRange:]):
2027         * editing/cocoa/HTMLConverter.mm:
2028         (HTMLConverter::_addMarkersToList):
2029         * platform/mac/PasteboardMac.mm:
2030         (WebCore::writeFileWrapperAsRTFDAttachment):
2031         * platform/mac/PlatformPasteboardMac.mm:
2032         (WebCore::PlatformPasteboard::setTypes):
2033         Pass empty arrays and dictionaries instead of nil.
2034
2035         * rendering/RenderThemeMac.mm:
2036         (WebCore::RenderThemeMac::paintSliderThumb):
2037         Pass the document view to the AppKit paint method.
2038
2039 2015-05-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2040
2041         Purge PassRefPtr in WebCore/html - 3
2042         https://bugs.webkit.org/show_bug.cgi?id=144686
2043
2044         Reviewed by Andreas Kling.
2045
2046         Replace PassRefPtr with Ref in create() factory functions, because
2047         it doesn't have to change to be null.
2048
2049         No new tests, no behavior changes.
2050
2051         * html/FTPDirectoryDocument.h:
2052         * html/HTMLDetailsElement.cpp:
2053         (WebCore::DetailsContentElement::create):
2054         * html/HTMLKeygenElement.cpp:
2055         * html/HTMLSummaryElement.cpp:
2056         (WebCore::SummaryContentElement::create):
2057         * html/TimeRanges.cpp:
2058         (WebCore::TimeRanges::create):
2059         * html/shadow/SliderThumbElement.cpp:
2060         (WebCore::SliderContainerElement::create):
2061         * html/shadow/SliderThumbElement.h:
2062         (WebCore::SliderThumbElement::create):
2063         * html/shadow/SpinButtonElement.cpp:
2064         (WebCore::SpinButtonElement::create):
2065         * html/shadow/SpinButtonElement.h:
2066         * html/shadow/TextControlInnerElements.cpp:
2067         (WebCore::TextControlInnerContainer::create):
2068         (WebCore::TextControlInnerElement::create):
2069         (WebCore::TextControlInnerTextElement::create):
2070         (WebCore::SearchFieldResultsButtonElement::create):
2071         (WebCore::SearchFieldCancelButtonElement::create):
2072         * html/shadow/TextControlInnerElements.h:
2073         * html/shadow/YouTubeEmbedShadowElement.cpp:
2074         (WebCore::YouTubeEmbedShadowElement::create):
2075         * html/track/InbandDataTextTrack.cpp:
2076         (WebCore::InbandDataTextTrack::create):
2077         * html/track/InbandDataTextTrack.h:
2078         * html/track/InbandGenericTextTrack.cpp:
2079         (WebCore::InbandGenericTextTrack::create):
2080         * html/track/InbandGenericTextTrack.h:
2081         * html/track/InbandWebVTTTextTrack.cpp:
2082         (WebCore::InbandWebVTTTextTrack::create):
2083         * html/track/InbandWebVTTTextTrack.h:
2084         * html/track/LoadableTextTrack.h:
2085         * html/track/TextTrack.h:
2086         (WebCore::TextTrack::create):
2087         * html/track/TextTrackCueGeneric.cpp:
2088         * html/track/TextTrackCueGeneric.h:
2089         * html/track/TextTrackList.h:
2090         * html/track/VTTRegionList.h:
2091         (WebCore::VTTRegionList::create):
2092
2093 2015-05-07  Dean Jackson  <dino@apple.com>
2094
2095         [iOS] MediaControls: disappear while scrubbing
2096         https://bugs.webkit.org/show_bug.cgi?id=144777
2097         <rdar://problem/20065572>
2098
2099         Reviewed by Eric Carlson.
2100
2101         If we are scrubbing we shouldn't hide the controls.
2102
2103         * Modules/mediacontrols/mediaControlsApple.js:
2104         (Controller.prototype.hideControls): Return early if we are scrubbing.
2105         * Modules/mediacontrols/mediaControlsiOS.js:
2106         (ControllerIOS.prototype): Add initial value for _potentiallyScrubbing and
2107         rename from non-underscored value throughout the file.
2108         (ControllerIOS.prototype.handleTimelineTouchEnd): When we finish scrubbing, reset
2109         the timer to hide the controls.
2110
2111 2015-05-07  Simon Fraser  <simon.fraser@apple.com>
2112
2113         REGRESSION (r183300): Fixed elements flash when scrolling
2114         https://bugs.webkit.org/show_bug.cgi?id=144778
2115         rdar://problem/20769741
2116
2117         Reviewed by Dean Jackson.
2118
2119         After r183300 we can detached layer backing store when outside the coverage region.
2120         However, position:fixed layers are moved around by the ScrollingCoordinator behind
2121         GraphicsLayer's back, so we can do layer flushes with stale information about layer
2122         geometry.
2123         
2124         To avoid dropping backing store for layers in this situation, prevent backing
2125         store detachment on layers registered with the ScrollingCoordinator as viewport-constrained
2126         layers. Preventing detachment on a layer also prevents detachment on all descendant
2127         layers.
2128
2129         * platform/graphics/GraphicsLayer.h:
2130         (WebCore::GraphicsLayer::setAllowsBackingStoreDetachment):
2131         (WebCore::GraphicsLayer::allowsBackingStoreDetachment):
2132         * platform/graphics/ca/GraphicsLayerCA.cpp:
2133         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
2134         (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): Set m_intersectsCoverageRect to true
2135         if backing store detachment is prevented.
2136         (WebCore::GraphicsLayerCA::recursiveCommitChanges): Set a bit in the CommitState to 
2137         communicate to descendants that detachment is prevented.
2138         * platform/graphics/ca/GraphicsLayerCA.h:
2139         (WebCore::GraphicsLayerCA::CommitState::CommitState): Deleted.
2140         * rendering/RenderLayerBacking.cpp:
2141         (WebCore::RenderLayerBacking::setIsScrollCoordinatedWithViewportConstrainedRole):
2142         * rendering/RenderLayerBacking.h:
2143         (WebCore::RenderLayerBacking::setScrollingNodeIDForRole): If registering with a non-zero
2144         nodeID for the ViewportConstrained role, turn off backing store detachment.
2145
2146 2015-05-07  Sam Weinig  <sam@webkit.org>
2147
2148         Consider implementing Document.scrollingElement
2149         <rdar://problem/20845213>
2150         https://bugs.webkit.org/show_bug.cgi?id=143609
2151
2152         Reviewed by Simon Fraser.
2153
2154         Add the non-compliant implementation of Document.scrollingElement that the spec,
2155         found at http://dev.w3.org/csswg/cssom-view/#dom-document-scrollingelement, 
2156         says we should have while we have non-compliant implementations of Element.scrollTop
2157         and Element.scrollLeft (fixing that is tracked by https://bugs.webkit.org/show_bug.cgi?id=106133).
2158
2159         Tests: fast/dom/Document/scrollingElement-quirks-mode.html
2160                fast/dom/Document/scrollingElement-standards-mode.html
2161
2162         * dom/Document.cpp:
2163         (WebCore::Document::scrollingElement):
2164         * dom/Document.h:
2165         * dom/Document.idl:
2166
2167 2015-05-07  Dean Jackson  <dino@apple.com>
2168
2169         [iOS] While scrubbing and holding down, video continues to play
2170         https://bugs.webkit.org/show_bug.cgi?id=144776
2171         <rdar://problem/20863757>
2172
2173         Reviewed by Simon Fraser.
2174
2175         When we are scrubbing a video, we should pause playback. As we
2176         let go of the scrubber playback can resume (but only if it was
2177         playing originally).
2178
2179         * Modules/mediacontrols/mediaControlsiOS.js:
2180         (ControllerIOS.prototype.createControls): Listen for touchstart on the scrubber.
2181         (ControllerIOS.prototype.handleTimelineInput): Call the prototype, but pause if necessary.
2182         (ControllerIOS.prototype.handleTimelineChange): Just moved this to be with the other timeline functions.
2183         (ControllerIOS.prototype.handleTimelineTouchStart): Add the listeners for end and cancel. Remember that we are
2184         potentially about to scrub.
2185         (ControllerIOS.prototype.handleTimelineTouchEnd): Remove the listeners.
2186
2187 2015-05-07  Said Abou-Hallawa  <sabouhallawa@apple.com>
2188
2189         Applying a filter on an SVG element, which is larger than 4096 pixels, causes this element to be rendered shifted to the left
2190         https://bugs.webkit.org/show_bug.cgi?id=144335
2191
2192         Reviewed by Daniel Bates.
2193
2194         Address comments raised by Darin Adler in review.
2195
2196         * platform/graphics/ImageBuffer.cpp:
2197         (WebCore::ImageBuffer::sizeNeedsClamping):
2198         (WebCore::ImageBuffer::clampedSize):
2199         (WebCore::ImageBuffer::isSizeClamped): Deleted.
2200         * platform/graphics/ImageBuffer.h:
2201         The condition for the negative width/height in isSizeClamped() was wrong. Use
2202         FloatSize::isEmpty() instead and rename the function to sizeNeedsClamping().
2203         The new function should return the opposite of the old function return value.
2204         
2205         * platform/graphics/filters/FilterEffect.cpp:
2206         (WebCore::FilterEffect::apply):
2207         (WebCore::FilterEffect::asUnmultipliedImage):
2208         (WebCore::FilterEffect::asPremultipliedImage):
2209         (WebCore::FilterEffect::copyUnmultipliedImage):
2210         (WebCore::FilterEffect::copyPremultipliedImage):
2211         (WebCore::FilterEffect::createUnmultipliedImageResult):
2212         (WebCore::FilterEffect::createPremultipliedImageResult):
2213         * rendering/FilterEffectRenderer.cpp:
2214         (WebCore::FilterEffectRenderer::updateBackingStoreRect):
2215         (WebCore::FilterEffectRendererHelper::beginFilterEffect):
2216         * rendering/svg/RenderSVGResourceFilter.cpp:
2217         (WebCore::RenderSVGResourceFilter::applyResource):
2218         Call the new function and negate the condition for the return value.
2219
2220 2015-05-07  Anders Carlsson  <andersca@apple.com>
2221
2222         Build fix.
2223
2224         * editing/mac/EditorMac.mm:
2225         (WebCore::dataInRTFDFormat):
2226         (WebCore::dataInRTFFormat):
2227
2228 2015-05-07  Said Abou-Hallawa  <sabouhallawa@apple.com>
2229
2230         Applying a filter on an SVG element, which is larger than 4096 pixels, causes this element to be rendered shifted to the left
2231         https://bugs.webkit.org/show_bug.cgi?id=144335
2232
2233         Reviewed by Darin Adler.
2234
2235         When the SVG element is larger than 4096x4096 pixels and it has a filter,
2236         a clipper or a masker, the ImageBuffer which is created for drawing the
2237         sourceGraphicBuffer has to be clamped to this size. The reason for this
2238         clamping is the FilterEffect simply ignores processing any ImageBuffer
2239         larger than this size.
2240         
2241         The bug was happening because we did not propagate the clamping logic to
2242         the FilterEffect. The FilterEffect result ImageBuffer was not clamped as
2243         what we do for drawing the sourceGraphicBuffer. If only the destination
2244         point is specified, the GraphicsContext::drawImageBuffer() assumes the
2245         source and the destination images have the same size which is not true
2246         with the clamping.
2247         
2248         The fix is to add the clamping logic to the FilterEffect. Two places we
2249         need to change. (1) FilterEffect::createImageBufferResult() has to apply
2250         the same clamping we do in SVGRenderingContext::createImageBuffer(). (2)
2251         FilterEffect::drawingRegionOfInputImage() has to consider the clamping 
2252         when mapping from absolute coordinates to the ImageBuffer coordinates.
2253         
2254         Tests: svg/filters/big-sized-off-viewport-filter.svg
2255
2256         * platform/graphics/ImageBuffer.cpp:
2257         (WebCore::ImageBuffer::isSizeClamped):
2258         (WebCore::ImageBuffer::clampedSize):
2259         (WebCore::ImageBuffer::clampedRect):
2260         * platform/graphics/ImageBuffer.h:
2261         (WebCore::ImageBuffer::setSpaceSize): Move all the clamping helper methods
2262         from SVGRenderingContext and RenderSVGResourceFilter to the ImageBuffer.
2263
2264         * platform/graphics/filters/FEColorMatrix.cpp:
2265         (WebCore::FEColorMatrix::platformApplySoftware): Use logicalSize() of the
2266         result image instead of using absolutePaintRect(). The later returns the
2267         rectangle of the element without clamping.
2268         
2269         * platform/graphics/filters/FETile.cpp:
2270         (WebCore::FETile::platformApplySoftware):
2271         * rendering/svg/RenderSVGResourceClipper.cpp:
2272         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
2273         * rendering/svg/RenderSVGResourceFilter.cpp:
2274         (WebCore::RenderSVGResourceFilter::applyResource):
2275         (WebCore::RenderSVGResourceFilter::fitsInMaximumImageSize): Deleted.
2276         * rendering/svg/RenderSVGResourceFilter.h:
2277         * rendering/svg/RenderSVGResourceGradient.cpp:
2278         (WebCore::createMaskAndSwapContextForTextGradient):
2279         (WebCore::clipToTextMask):
2280         * rendering/svg/RenderSVGResourceMasker.cpp:
2281         (WebCore::RenderSVGResourceMasker::applySVGMask):
2282         * rendering/svg/RenderSVGResourcePattern.cpp:
2283         (WebCore::RenderSVGResourcePattern::buildPattern):
2284         (WebCore::RenderSVGResourcePattern::createTileImage): Make the modifications
2285         which are needed because of moving the clamping helper methods to ImageBuffer
2286         and because of changing the prototype of SVGRenderingContext methods.
2287
2288         * platform/graphics/filters/FilterEffect.cpp:
2289         (WebCore::FilterEffect::drawingRegionOfInputImage): Consider the clamping
2290         when mapping from absolute coordinates to the ImageBuffer coordinates.
2291
2292         (WebCore::FilterEffect::createImageBufferResult): Apply the same clamping
2293         we do in SVGRenderingContext::createImageBuffer() when creating the 
2294         FilterEffect result ImageBuffer.
2295         
2296         (WebCore::FilterEffect::apply):
2297         (WebCore::FilterEffect::asUnmultipliedImage):
2298         (WebCore::FilterEffect::asPremultipliedImage):
2299         (WebCore::FilterEffect::copyUnmultipliedImage):
2300         (WebCore::FilterEffect::copyPremultipliedImage):
2301         (WebCore::FilterEffect::createUnmultipliedImageResult):
2302         (WebCore::FilterEffect::createPremultipliedImageResult):
2303         (WebCore::FilterEffect::maxFilterArea): Deleted.
2304         (WebCore::FilterEffect::isFilterSizeValid): Deleted.
2305         * platform/graphics/filters/FilterEffect.h: Use the new ImageBuffer clamping
2306         helper methods and delete the local ones.
2307
2308         * platform/graphics/transforms/AffineTransform.cpp:
2309         (WebCore::AffineTransform::scaleNonUniform):
2310         (WebCore::AffineTransform::scale):
2311         (WebCore::AffineTransform::translate):
2312         * platform/graphics/transforms/AffineTransform.h: Add new scale and translate
2313         overloads to AffineTransform.
2314         
2315         * rendering/FilterEffectRenderer.cpp:
2316         (WebCore::FilterEffectRenderer::updateBackingStoreRect):
2317         (WebCore::FilterEffectRendererHelper::beginFilterEffect): Code clean up.
2318         
2319         * rendering/svg/SVGRenderingContext.cpp:
2320         (WebCore::SVGRenderingContext::calculateScreenFontSizeScalingFactor):
2321         (WebCore::SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem):
2322         Return the AffineTransform instead of passing it through the reference of
2323         an argument.
2324         
2325         (WebCore::SVGRenderingContext::createImageBuffer):
2326         (WebCore::SVGRenderingContext::createImageBufferForPattern): Deleted.
2327         Code clean up and method rename.
2328         
2329         (WebCore::SVGRenderingContext::clampedAbsoluteTargetRect): Deleted.
2330         (WebCore::SVGRenderingContext::clampedAbsoluteSize): Deleted.
2331         * rendering/svg/SVGRenderingContext.h: Move the clamping helper methods to
2332         the ImageBuffer class.
2333     
2334 2015-05-07  Beth Dakin  <bdakin@apple.com>
2335
2336         New force-related DOM events should fire in WK1 views
2337         https://bugs.webkit.org/show_bug.cgi?id=144663
2338         -and corresponding-
2339         rdar://problem/20281886
2340
2341         Reviewed by Sam Weinig.
2342
2343         All of the WK1 mouse events need to take the correspondingPressureEvent.
2344         * page/EventHandler.h:
2345
2346         Make correspondingPressureEvent a part of CurrentEventScope. This is needed to 
2347         have accurate pressure information for all of the mouse events in subframes.
2348         * page/mac/EventHandlerMac.mm:
2349         (WebCore::correspondingPressureEventSlot):
2350         (WebCore::EventHandler::correspondingPressureEvent):
2351         (WebCore::CurrentEventScope::CurrentEventScope):
2352         (WebCore::CurrentEventScope::~CurrentEventScope):
2353
2354         These events don’t have an associated pressure, so send nil for the 
2355         correspondingPressureEvent.
2356         (WebCore::EventHandler::wheelEvent):
2357         (WebCore::EventHandler::keyEvent):
2358
2359         Pipe through correspondingPressureEvent.
2360         (WebCore::EventHandler::mouseDown):
2361         (WebCore::EventHandler::mouseDragged):
2362         (WebCore::EventHandler::mouseUp):
2363         (WebCore::EventHandler::mouseMoved):
2364
2365         New function to handle pressure change events.
2366         (WebCore::EventHandler::pressureChange):
2367
2368         Pipe through correspondingPressureEvent.
2369         (WebCore::EventHandler::passMouseMovedEventToScrollbars):
2370         (WebCore::EventHandler::currentPlatformMouseEvent):
2371
2372         Take the correspondingPressureEvent in order to build a PlatformMouseEvent with 
2373         the correct pressure information.
2374         * platform/mac/PlatformEventFactoryMac.h:
2375         * platform/mac/PlatformEventFactoryMac.mm:
2376         (WebCore::globalPointForEvent):
2377         (WebCore::pointForEvent):
2378         (WebCore::mouseButtonForEvent):
2379         (WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder):
2380         (WebCore::PlatformEventFactory::createPlatformMouseEvent):
2381
2382 2015-05-06  Roger Fong  <roger_fong@apple.com>
2383
2384         Media Controls: Scrubber should be independent of actual video time, causes scrubber to be jumpy.
2385         https://bugs.webkit.org/show_bug.cgi?id=144700.
2386         <rdar://problem/19997548>
2387
2388         Reviewed by Jer Noble.
2389
2390         Update time and timeline during the timeline input event instead of the wrapper's mousemove.
2391         (Controller.prototype.handleWrapperMouseMove):
2392         (Controller.prototype.handleTimelineMouseMove):
2393         (Controller.prototype.drawTimelineBackground): 
2394
2395         (Controller.prototype.updateControlsWhileScrubbing): 
2396         Updates time and scrubber to reflect timeline user input.
2397
2398 2015-05-07  Yoav Weiss  <yoav@yoav.ws>
2399
2400         Handle meta viewport in HTMLPreloadScanner
2401         https://bugs.webkit.org/show_bug.cgi?id=144640
2402
2403         Reviewed by Dean Jackson.
2404
2405         Add support for the <meta> tag to the HTMLPreloadScanner
2406         and when the meta tag's name is viewport, get the document
2407         to process the tag's attribute value, and set its ViewportArgument.
2408
2409         Tests: fast/dom/HTMLMetaElement/meta-preloader.html
2410
2411         * html/parser/HTMLPreloadScanner.cpp:
2412         (WebCore::TokenPreloadScanner::tagIdFor): Added meta.
2413         (WebCore::TokenPreloadScanner::initiatorFor): Added meta.
2414         (WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner): Call document.processViewport is meta viewport encountered.
2415         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
2416         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): Keep track of meta viewport tags.
2417         (WebCore::testPreloadScannerViewportSupport): Testing function that makes sure this functionality is working.
2418         * html/parser/HTMLPreloadScanner.h:
2419         * testing/Internals.cpp:
2420         (WebCore::Internals::testPreloaderSettingViewport): Calls the testing function.
2421         * testing/Internals.h:
2422         * testing/Internals.idl:
2423
2424 2015-05-07  Zalan Bujtas  <zalan@apple.com>
2425
2426         REGRESSION (r164449): Subpixel rendering: http://www.apple.com/iphone-6/ "Faster wireless." image displays vertical black line on 1x displays at specific window width.
2427         https://bugs.webkit.org/show_bug.cgi?id=144723
2428         rdar://problem/18307094
2429
2430         Reviewed by Simon Fraser.
2431
2432         This patch ensures that the backing store's graphics layer is always positioned on a device pixel boundary.
2433
2434         While calculating the backing store's graphics layer location, its ancestor layer's compositing bounds is taken into account.
2435         However the compositing bounds is an unsnapped value, so in order to place the graphics layer properly,
2436         we need to pixel align the ancestor compositing bounds before using it to adjust the child's graphics layer position.
2437
2438         Test: compositing/ancestor-compositing-layer-is-on-subpixel-position.html
2439
2440         * rendering/RenderLayerBacking.cpp:
2441         (WebCore::RenderLayerBacking::updateGeometry):
2442
2443 2015-05-07  Yoav Weiss  <yoav@yoav.ws>
2444
2445         Fix sizes crash and add invalid value tests.
2446         https://bugs.webkit.org/show_bug.cgi?id=144739
2447
2448         Reviewed by Darin Adler.
2449
2450         Make sure that only CSS length are allowed when the sizes parser is calling computeLength.
2451         Also make sure that for invalid lengths, the 100vw default is used instead.
2452
2453         Test: fast/dom/HTMLImageElement/sizes/image-sizes-invalids.html
2454
2455         * css/SourceSizeList.cpp:
2456         (WebCore::computeLength):
2457         (WebCore::defaultLength):
2458         (WebCore::parseSizesAttribute):
2459
2460 2015-05-07  Michael Catanzaro  <mcatanzaro@igalia.com>
2461
2462         [GTK] Checks for DEVELOPMENT_BUILD are all wrong
2463         https://bugs.webkit.org/show_bug.cgi?id=144746
2464
2465         Reviewed by Martin Robinson.
2466
2467         Use DEVELOPER_MODE rather than DEVELOPMENT_BUILD.
2468
2469         * platform/gtk/GtkUtilities.cpp:
2470         * platform/gtk/GtkUtilities.h:
2471         * platform/text/gtk/HyphenationLibHyphen.cpp:
2472         (WebCore::availableLocales):
2473
2474 2015-05-07  Simon Fraser  <simon.fraser@apple.com>
2475
2476         Remove the WK1-only code path for independently composited iframes
2477         https://bugs.webkit.org/show_bug.cgi?id=144722
2478
2479         Reviewed by Dean Jackson.
2480
2481         In WebKit1 on Mac, we allowed iframes to be composited independently of their
2482         parent document, relying on the fact that the frame's platform view can host
2483         a layer-backed view. However, this ran into bugs (rdar://problem/18862298),
2484         and triggers the assertion at the end of FrameView::updateLayoutAndStyleIfNeededRecursive(),
2485         because the compositing update after a layout can dirty style in notifyIFramesOfCompositingChange().
2486         
2487         Removing the WK1-only code path solves these problems. It also eliminates the need
2488         to do compositing-specific frame overlap testing.
2489
2490         * page/FrameView.cpp:
2491         (WebCore::FrameView::setIsOverlapped): No need to do compositing-related things here.
2492         Any iframe that gets composited will participate in the normal compositing overlap
2493         testing in its parent frame.
2494         (WebCore::FrameView::hasCompositedContentIncludingDescendants): Deleted.
2495         (WebCore::FrameView::hasCompositingAncestor): Deleted.
2496         * page/FrameView.h:
2497         * rendering/RenderLayerCompositor.cpp: Replace ownerElement() checks in this file
2498         with an isMainFrameCompositor() for readability. Some 0->nullptr.
2499         (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
2500         (WebCore::RenderLayerCompositor::chromeClient):
2501         (WebCore::RenderLayerCompositor::enclosingCompositorFlushingLayers):
2502         (WebCore::RenderLayerCompositor::updateCompositingLayers):
2503         (WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
2504         (WebCore::RenderLayerCompositor::updateBacking):
2505         (WebCore::RenderLayerCompositor::layerTreeAsText):
2506         (WebCore::RenderLayerCompositor::frameContentsCompositor):
2507         (WebCore::RenderLayerCompositor::setIsInWindow):
2508         (WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame):
2509         (WebCore::RenderLayerCompositor::requiresCompositingForFrame): frameRenderer.requiresAcceleratedCompositing()
2510         already bails on no content RenderView, so the shouldPropagateCompositingToEnclosingFrame() check does
2511         nothing and is removed.
2512         (WebCore::RenderLayerCompositor::isAsyncScrollableStickyLayer):
2513         (WebCore::RenderLayerCompositor::requiresScrollLayer):
2514         (WebCore::RenderLayerCompositor::documentUsesTiledBacking):
2515         (WebCore::RenderLayerCompositor::isMainFrameCompositor):
2516         (WebCore::RenderLayerCompositor::shouldCompositeOverflowControls):
2517         (WebCore::RenderLayerCompositor::requiresOverhangAreasLayer):
2518         (WebCore::RenderLayerCompositor::requiresContentShadowLayer):
2519         (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
2520         (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
2521         (WebCore::RenderLayerCompositor::updateLayerForHeader):
2522         (WebCore::RenderLayerCompositor::updateLayerForFooter):
2523         (WebCore::RenderLayerCompositor::ensureRootLayer): Main frame attaches via ChromeClient,
2524         all other frames attach via parent frame.
2525         (WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange): This call to
2526         scheduleSetNeedsStyleRecalc(SyntheticStyleChange) was the source of dirtying style after
2527         layout, but is no longer needed so remove it.
2528         (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
2529         (WebCore::RenderLayerCompositor::unregisterAllViewportConstrainedLayers):
2530         (WebCore::RenderLayerCompositor::scrollingCoordinator):
2531         (WebCore::RenderLayerCompositor::graphicsLayerFactory):
2532         (WebCore::RenderLayerCompositor::allowsIndependentlyCompositedFrames): Deleted.
2533         (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame): Deleted.
2534         (WebCore::RenderLayerCompositor::mainFrameBackingIsTiled): Deleted. This was mis-named;
2535         it really asks whether the document uses tiled backing, but does not check for main frame.
2536         * rendering/RenderLayerCompositor.h:
2537         * rendering/RenderWidget.cpp:
2538         (WebCore::RenderWidget::paintContents): No need to do frame overlap testing for
2539         compositing now.
2540
2541 2015-05-06  Dean Jackson  <dino@apple.com>
2542
2543         Handle backdrop views that have to tile
2544         https://bugs.webkit.org/show_bug.cgi?id=142317
2545         <rdar://problem/20049088>
2546
2547         Reviewed by Simon Fraser.
2548
2549         Take 2 - this was rolled out because Mavericks was crashing.
2550
2551         Make sure backdrop layers don't tile. If they are big
2552         enough, we'll leave it to the platform compositor to handle.
2553
2554         This also fixes a bug where if a layer changed from a backdrop
2555         type to a tiled type, it would still retain its custom appearance
2556         and we'd try to add children to the wrong layer.
2557
2558         Test: compositing/media-controls-bar-appearance-big.html
2559
2560         * platform/graphics/ca/GraphicsLayerCA.cpp:
2561         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Check if
2562         a layer needs a backdrop before checking if it needs to tile.
2563
2564 2015-05-05  Myles C. Maxfield  <mmaxfield@apple.com>
2565
2566         Revert "Introducing the Platform Abstraction Layer (PAL)"
2567         https://bugs.webkit.org/show_bug.cgi?id=144751
2568
2569         Unreviewed.
2570
2571         PAL should be a new target inside WebCore, rather than a top-level folder.
2572
2573         * WebCore.xcodeproj/project.pbxproj:
2574         * Configurations/FeatureDefines.xcconfig:
2575
2576 2015-05-07  Dan Bernstein  <mitz@apple.com>
2577
2578         Tried to fix the build.
2579
2580         * Configurations/WebCoreTestSupport.xcconfig:
2581
2582 2015-05-07  Joanmarie Diggs  <jdiggs@igalia.com>
2583
2584         AX: [ATK] The pre element should be mapped to ATK_ROLE_SECTION; not ATK_ROLE_PANEL
2585         https://bugs.webkit.org/show_bug.cgi?id=144702
2586
2587         Reviewed by Chris Fleizach.
2588
2589         Add a new PreRole AccessibilityRole so that per-platform mapping is possible.
2590         Map PreRole to ATK_ROLE_SECTION for Efl and Gtk; to NSAccessibilityGroupRole
2591         for the Mac. Add PreRole to the list of "text type" ATK roles.
2592
2593         No new tests. Existing tests were updated to reflect the corrected mapping.
2594
2595         * accessibility/AccessibilityObject.h:
2596         * accessibility/AccessibilityRenderObject.cpp:
2597         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2598         * accessibility/atk/AccessibilityObjectAtk.cpp:
2599         (WebCore::AccessibilityObject::allowsTextRanges):
2600         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2601         (atkRole):
2602         (roleIsTextType):
2603         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2604         (createAccessibilityRoleMap):
2605
2606 2015-05-07  Dan Bernstein  <mitz@apple.com>
2607
2608         <rdar://problem/19317140> [Xcode] Remove usage of AspenFamily.xcconfig in Source/
2609         https://bugs.webkit.org/show_bug.cgi?id=144727
2610
2611         Reviewed by Darin Adler.
2612
2613         * Configurations/Base.xcconfig: Don’t include AspenFamily.xcconfig.
2614         * Configurations/WebCore.xcconfig: For iOS, define INSTALL_PATH in terms of
2615         INSTALL_PATH_PREFIX, and set INSTALL_PATH_PREFIX for the iOS 8.x Simulator.
2616         * Configurations/WebCoreTestSupport.xcconfig: Define INSTALL_PATH in terms of
2617         INSTALL_PATH_PREFIX and INSTALL_PATH_ACTUAL, and define INSTALL_PATH_PREFIX for the iOS 8.x
2618         Simulator.
2619
2620 2015-05-07  Eric Carlson  <eric.carlson@apple.com>
2621
2622         [Mac] Playback target isn't set on new element
2623         https://bugs.webkit.org/show_bug.cgi?id=144724
2624
2625         Reviewed by Jer Noble.
2626
2627         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2628         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2629         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Call setShouldPlayToPlaybackTarget
2630         if necessary.
2631         (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget): Remember
2632         the setting in case we don't have an AVPlayer yet.
2633
2634 2015-05-07  Yoav Weiss  <yoav@yoav.ws>
2635
2636         Fix <script srcset> being loaded by the preloader.
2637         https://bugs.webkit.org/show_bug.cgi?id=144675
2638
2639         Reviewed by Darin Adler.
2640
2641         Fix HTMLPreloadScanner to make sure that srcset is only loaded
2642         when it is present on an <img>.
2643
2644         Tests: http/tests/loading/preload-script-src.html
2645                http/tests/loading/preload-script-srcset-ignored.html
2646
2647         * html/parser/HTMLPreloadScanner.cpp:
2648         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
2649
2650 2015-05-07  Žan Doberšek  <zdobersek@igalia.com>
2651
2652         Add missing type traits specialization for PlatformDisplayWayland
2653         https://bugs.webkit.org/show_bug.cgi?id=144671
2654
2655         Reviewed by Carlos Garcia Campos.
2656
2657         * platform/graphics/wayland/PlatformDisplayWayland.h:
2658         Add missing type traits specialization for the PlatformDisplayWayland
2659         class via the SPECIALIZE_TYPE_TRAITS_PLATFORM_DISPLAY macro.
2660
2661 2015-05-06  Manuel Rego Casasnovas  <rego@igalia.com>
2662
2663         [CSS Grid Layout] Mark grid shorthands as layout dependent
2664         https://bugs.webkit.org/show_bug.cgi?id=144687
2665
2666         Reviewed by Darin Adler.
2667
2668         grid-template and grid shorthands were not marked us layout dependent,
2669         so you can end up calling them before the grid has been laid out and
2670         you'll get a crash at valueForGridTrackList() because of trackPositions
2671         won't be initialized yet.
2672
2673         Tests: fast/css-grid-layout/grid-shorthand-computed-style-crash.html
2674                fast/css-grid-layout/grid-template-shorthand-computed-style-crash.html
2675
2676         * css/CSSComputedStyleDeclaration.cpp:
2677         (WebCore::isLayoutDependent): Add the grid shorthands only if the object
2678         is a RenderGrid as otherwise it's not needed (using the same condition
2679         for grid-template-columns and grid-template-rows properties too).
2680
2681 2015-05-06  Daniel Bates  <dabates@apple.com>
2682
2683         [iOS][WK2] Pause/resume database thread when UIProcess enters/leaves the background
2684         https://bugs.webkit.org/show_bug.cgi?id=144657
2685         <rdar://problem/18894598>
2686
2687         Reviewed by Andy Estes.
2688
2689         Export WebCore functionality to pause and resume the database thread so that we can
2690         make use of this functionality from WebKit2.
2691
2692         * Modules/webdatabase/AbstractDatabaseServer.h:
2693         * Modules/webdatabase/DatabaseManager.cpp:
2694         (WebCore::DatabaseManager::setPauseAllDatabases): Added; turns around and calls DatabaseServer::setPauseAllDatabases().
2695         * Modules/webdatabase/DatabaseManager.h:
2696         * Modules/webdatabase/DatabaseServer.cpp:
2697         (WebCore::DatabaseServer::setPauseAllDatabases): Added; turns around and calls
2698         DatabaseTracker::tracker().setDatabasesPaused() to pause or resume the database thread.
2699         For now, we guard this call with PLATFORM(IOS). We'll look to remove this guard once
2700         we fix <https://bugs.webkit.org/show_bug.cgi?id=144660>.
2701         * Modules/webdatabase/DatabaseServer.h:
2702
2703 2015-05-06  Brent Fulgham  <bfulgham@apple.com>
2704
2705         Scroll-snap points do not handle margins and padding propertly
2706         https://bugs.webkit.org/show_bug.cgi?id=144647
2707         <rdar://problem/20829473>
2708
2709         Reviewed by Simon Fraser.
2710
2711         The calculation of scroll snap points was incorrect because it did not account for margins or padding.
2712         This was fixed by using the "paddingBoxRect" to represent the overall size of the view area, and
2713         subtracting the relevant padding when computing the size of the scroll snap offsets.
2714
2715         Extend testing internals with accessor methods to retrieve string representations of the scroll snap
2716         offsets and scroll snap coordinates computed during layout. These values are used in the new
2717         'css3/scroll-snap/scroll-snap-offsets-and-coordinates.html' test.
2718
2719         New tests:
2720         * css3/scroll-snap/scroll-snap-offsets-and-coordinates.html: Added.
2721         * platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders.html: Added.
2722         * platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html: Added.
2723         * platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html: Added.
2724
2725         * css/LengthFunctions.h: Expose the 'valueForLength' method so we can use it in WebCoreTestSupport.
2726         * dom/Node.h: Expose the 'renderBox' method so we can use it in WebCoreTestSupport.
2727         * page/scrolling/AxisScrollSnapOffsets.cpp:
2728         (WebCore::appendChildSnapOffsets): Use 'contentBoxRect' for overall size, so that we don't use padding
2729         as part of our offset calculations.
2730         (WebCore::updateSnapOffsetsForScrollableArea): Ditto.
2731         * rendering/RenderBox.h: Expose 'canBeScrolledAndHasScrollableArea' for use in WebCoreTestSupport.
2732         * rendering/style/RenderStyle.h: Expose 'scrollSnapCoordinates' for use in WebCoreTestSupport.
2733         * testing/Internals.cpp:
2734         (WebCore::appendOffsets): Helper function.
2735         (WebCore::Internals::scrollSnapOffsets): Added.
2736         * testing/Internals.h:
2737         * testing/Internals.idl:
2738
2739 2015-05-06  Myles C. Maxfield  <mmaxfield@apple.com>
2740
2741         Clean up TextRun constructors
2742         https://bugs.webkit.org/show_bug.cgi?id=144712
2743
2744         Reviewed by Zalan Bujtas.
2745
2746         This patch uses constructor forwarding to make TextRun's constructors much simpler. It then
2747         updates the implementations of RenderBlock::constructTextRun() to be more consistent with
2748         TextRun (via using StringViews).
2749
2750         No new tests because there is no behavior change.
2751
2752         * mathml/MathMLMencloseElement.cpp:
2753         (WebCore::MathMLMencloseElement::longDivLeftPadding):
2754         * platform/graphics/TextRun.h:
2755         (WebCore::TextRun::TextRun):
2756         * rendering/RenderBlock.cpp:
2757         (WebCore::RenderBlock::constructTextRun):
2758         (WebCore::constructTextRunInternal): Deleted.
2759         * rendering/RenderBlock.h:
2760         * rendering/RenderEmbeddedObject.cpp:
2761         (WebCore::RenderEmbeddedObject::paintReplaced):
2762         (WebCore::RenderEmbeddedObject::unavailablePluginIndicatorBounds):
2763         (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
2764         * rendering/svg/SVGTextMetricsBuilder.cpp:
2765         (WebCore::SVGTextMetricsBuilder::SVGTextMetricsBuilder):
2766         * platform/win/DragImageWin.cpp:
2767         (WebCore::createDragImageForLink):
2768
2769 2015-05-06  Sungmann Cho  <sungmann.cho@navercorp.com>
2770
2771         Rename URL::copy() to URL::isolatedCopy() to match String.
2772         https://bugs.webkit.org/show_bug.cgi?id=144684
2773
2774         Reviewed by Darin Adler.
2775
2776         No new tests, no behavior change.
2777
2778         * Modules/websockets/WebSocketHandshake.cpp:
2779         (WebCore::WebSocketHandshake::setURL):
2780         (WebCore::WebSocketHandshake::httpURLForAuthenticationAndCookies):
2781         * fileapi/ThreadableBlobRegistry.cpp:
2782         (WebCore::BlobRegistryContext::BlobRegistryContext):
2783         * html/parser/HTMLPreloadScanner.cpp:
2784         (WebCore::TokenPreloadScanner::updatePredictedBaseURL):
2785         * html/parser/HTMLResourcePreloader.h:
2786         (WebCore::PreloadRequest::PreloadRequest):
2787         * html/parser/XSSAuditor.cpp:
2788         (WebCore::XSSAuditor::init):
2789         * platform/CrossThreadCopier.cpp:
2790         (WebCore::URL>::copy):
2791         * platform/URL.cpp:
2792         (WebCore::URL::isolatedCopy):
2793         (WebCore::URL::copy): Deleted.
2794         * platform/URL.h:
2795         (WebCore::URLCapture::URLCapture):
2796         * platform/network/BlobPart.h:
2797         (WebCore::BlobPart::detachFromCurrentThread):
2798         * platform/network/ResourceRequestBase.cpp:
2799         (WebCore::ResourceRequestBase::copyData):
2800         * platform/network/ResourceResponseBase.cpp:
2801         (WebCore::ResourceResponseBase::copyData):
2802         * workers/WorkerThread.cpp:
2803         (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
2804
2805 2015-05-06  Commit Queue  <commit-queue@webkit.org>
2806
2807         Unreviewed, rolling out r183894.
2808         https://bugs.webkit.org/show_bug.cgi?id=144719
2809
2810         crashes on mavericks (Requested by dino on #webkit).
2811
2812         Reverted changeset:
2813
2814         "Handle backdrop views that have to tile"
2815         https://bugs.webkit.org/show_bug.cgi?id=142317
2816         http://trac.webkit.org/changeset/183894
2817
2818 2015-05-06  Jon Lee  <jonlee@apple.com>
2819
2820         CoreTextSPI.h uses wrong version number to denote Yosemite
2821         https://bugs.webkit.org/show_bug.cgi?id=144701
2822
2823         Reviewed by Dean Jackson.
2824
2825         * platform/spi/cocoa/CoreTextSPI.h: Should 101000 not 10100.
2826
2827 2015-05-06  Jon Lee  <jonlee@apple.com>
2828
2829         Expose more font weights for -apple-system
2830         https://bugs.webkit.org/show_bug.cgi?id=144707
2831
2832         Reviewed by Dean Jackson.
2833
2834         Update to platform/mac/fast/text/systemFont.html
2835
2836         * platform/graphics/mac/FontCacheMac.mm:
2837         (WebCore::toNSFontWeight): New static method to map font weights to NSFontWeight constants available on
2838         Yosemite and later.
2839         (WebCore::fontWithFamily): Request the system font with a mapped weight on Yosemite and later.
2840         * platform/spi/mac/NSFontSPI.h: Add [NSFont systemFontWithSize:weight:], and the proper NSFontWeight
2841         constants.
2842
2843 2015-05-06  Dean Jackson  <dino@apple.com>
2844
2845         Handle backdrop views that have to tile
2846         https://bugs.webkit.org/show_bug.cgi?id=142317
2847         <rdar://problem/20049088>
2848
2849         Reviewed by Simon Fraser.
2850
2851         Make sure backdrop layers don't tile. If they are big
2852         enough, we'll leave it to the platform compositor to handle.
2853
2854         This also fixes a bug where if a layer changed from a backdrop
2855         type to a tiled type, it would still retain its custom appearance
2856         and we'd try to add children to the wrong layer.
2857
2858         Test: compositing/media-controls-bar-appearance-big.html
2859
2860         * platform/graphics/ca/GraphicsLayerCA.cpp:
2861         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Check if
2862         a layer needs a backdrop before checking if it needs to tile.
2863
2864 2015-05-06  Carlos Garcia Campos  <cgarcia@igalia.com> and Per Arne Vollan  <peavo@outlook.com>
2865
2866         [WinCairo] Compile error due to undefined symbols after r183868
2867         https://bugs.webkit.org/show_bug.cgi?id=144692
2868
2869         Reviewed by Alex Christensen.
2870
2871         Speculative build fix. Add dummy PlatformDisplayWin.
2872
2873         * PlatformWinCairo.cmake: Add PlatformDisplay.cpp to compilation.
2874         * platform/graphics/PlatformDisplay.cpp:
2875         (WebCore::PlatformDisplay::createPlatformDisplay):
2876         * platform/graphics/PlatformDisplay.h:
2877         * platform/graphics/win/PlatformDisplayWin.h:
2878         Add stubs to compile.
2879         * WebCore.vcxproj/WebCore.vcxproj
2880         * WebCore.vcxproj/WebCore.vcxproj.filters
2881         Add new files to Windows build.
2882
2883 2015-05-06  David Hyatt  <hyatt@apple.com>
2884
2885         Avoid copies in scrollOffsetForFixedPosition() and inline it.
2886         https://bugs.webkit.org/show_bug.cgi?id=144709
2887
2888         Reviewed by Simon Fraser.
2889
2890         * page/FrameView.cpp:
2891         (WebCore::FrameView::frameScaleFactor):
2892         Added so that scrollOffsetForFixedPosition() can be inlined without having to
2893         reference Frame's implementation.
2894
2895         (WebCore::FrameView::scrollOffsetForFixedPosition): Deleted.
2896         Moved this to the header.
2897
2898         * page/FrameView.h:
2899         Inline scrollOffsetForFixedPosition() and get rid of all the copying
2900         it was doing.
2901
2902 2015-05-06  David Hyatt  <hyatt@apple.com>
2903
2904         RenderLayer::currentTransform computes a pixel snapped rect it doesn't use.
2905         https://bugs.webkit.org/show_bug.cgi?id=144708
2906
2907         Reviewed by Simon Fraser.
2908
2909         * rendering/RenderLayer.cpp:
2910         (WebCore::RenderLayer::currentTransform):
2911
2912         Only compute a pixel snapped rect if we actually end up needing it. The common case
2913         is that this rect is not needed, so pushing it inside the two if statements
2914         speeds up the common case.
2915
2916 2015-05-06  Timothy Horton  <timothy_horton@apple.com>
2917
2918         Fix the build.
2919
2920         * platform/spi/cocoa/QuartzCoreSPI.h:
2921
2922 2015-05-06  David Hyatt  <hyatt@apple.com>
2923
2924         Optimize topLeftLocationOffset() addition in updateLayerPosition
2925         https://bugs.webkit.org/show_bug.cgi?id=144704
2926
2927         Reviewed by Dean Jackson.
2928
2929         * page/FrameView.cpp:
2930         (WebCore::FrameView::FrameView):
2931         * page/FrameView.h:
2932         Move the hasFlippedBlocks bit to FrameView instead of RenderView. Works better for inlining
2933         the check in any renderer header, and it also makes more sense conceptually, since the RenderView
2934         itself could be a flipped block.
2935
2936         * rendering/RenderBox.cpp:
2937         (WebCore::RenderBox::layoutOverflowRectForPropagation):
2938         Change over to the FrameView bit.
2939
2940         * rendering/RenderBox.h:
2941         (WebCore::RenderBox::applyTopLeftLocationOffset):
2942         Add a new inlined function that can apply the top left location offset to a point without
2943         multiple LayoutSize creations and copies. It invokes a helper for flipping that is not
2944         inlined only in the case where actual flipped blocks exist in the render tree.
2945
2946         * rendering/RenderBoxModelObject.cpp:
2947         (WebCore::RenderBoxModelObject::updateFromStyle):
2948         Set the bit on the FrameView now instead of the RenderView.
2949
2950         * rendering/RenderLayer.cpp:
2951         (WebCore::RenderLayer::updateLayerPosition):
2952         Call the new applyTopLeftLocationOffset function so that the point can have offsets added
2953         in without any extra copies.
2954
2955         (WebCore::RenderLayer::calculateClipRects):
2956         * rendering/RenderLineBoxList.cpp:
2957         (WebCore::RenderLineBoxList::rangeIntersectsRect):
2958         Switch over to the bit on the FrameView.
2959
2960         * rendering/RenderView.cpp:
2961         (WebCore::RenderView::RenderView):
2962         * rendering/RenderView.h:
2963         Get rid of the bit on the RenderView.
2964
2965 2015-05-05  Myles C. Maxfield  <mmaxfield@apple.com>
2966
2967         Introducing the Platform Abstraction Layer (PAL)
2968         https://bugs.webkit.org/show_bug.cgi?id=143358
2969
2970         Reviewed by Simon Fraser.
2971
2972         * WebCore.xcodeproj/project.pbxproj: Let the project know about the .a
2973         * Configurations/FeatureDefines.xcconfig: Updated
2974
2975 2015-05-06  Eric Carlson  <eric.carlson@apple.com>
2976
2977         [iOS] remove some unnecessary iOS-only media code
2978         https://bugs.webkit.org/show_bug.cgi?id=144697
2979         <rdar://problem/20229914>
2980
2981         Reviewed by Jer Noble.
2982
2983         * html/HTMLAttributeNames.in: Remove data-youtube-id.
2984
2985         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2986         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Remove dataYouTubeID.
2987
2988 2015-05-06  David Hyatt  <hyatt@apple.com>
2989
2990         Optimize relativePositionOffset() to avoid doing unnecessary work
2991         https://bugs.webkit.org/show_bug.cgi?id=144698
2992
2993         Reviewed by Simon Fraser.
2994
2995         * rendering/RenderBoxModelObject.cpp:
2996         (WebCore::RenderBoxModelObject::relativePositionOffset):
2997
2998         Patch relativePositionOffset to avoid doing unnecessary work in the common case where
2999         all values of top/left/right/bottom are either auto or fixed. We no longer fetch
3000         containingBlock() into a local always, but instead just invoke the function only
3001         when necessary.
3002
3003         Also avoid computing the percentage-relative maximum for the top/right/bottom/left lengths
3004         when they are fixed values, since that maximum won't be examined at all.
3005
3006 2015-05-06  Martin Robinson  <mrobinson@igalia.com>
3007
3008         [FreeType] Vertical CJK glyphs should not be rendered with synthetic oblique
3009         https://bugs.webkit.org/show_bug.cgi?id=144612
3010
3011         Reviewed by Darin Adler.
3012
3013         No new tests. This causes fast/text/international/synthesized-italic-vertical.html to pass.
3014
3015         * platform/graphics/Font.cpp:
3016         (WebCore::Font::nonSyntheticItalicFont): Compile this method for Cairo as well.
3017         * platform/graphics/FontCascadeFonts.cpp:
3018         (WebCore::FontCascadeFonts::glyphDataForSystemFallback): When searching for the system fallback,
3019         ensure that we do not use synthetic oblique when rendering vertical CJK glyphs.
3020         (WebCore::FontCascadeFonts::glyphDataForNormalVariant): Extend the CJK fix to Cairo ports.
3021         * platform/graphics/FontPlatformData.h:
3022         (WebCore::FontPlatformData::setSyntheticOblique): Added this helper method, because
3023         Freetype/Cairo ports needs to be able to recreate the scaled font matrix when the
3024         synthetic oblique settings changes.
3025         * platform/graphics/freetype/FontPlatformData.h: Rename initializeWithFontFace to buildScaledFont.
3026         Remove the now unused m_horizontalOrientationMatrix member.
3027         (WebCore::FontPlatformData::setSyntheticOblique): Added the helper here as well.
3028         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
3029         (WebCore::FontPlatformData::FontPlatformData): Calculate whether or not to use synthetic oblique here,
3030         before buildScaledFont is called. Call buildScaledFont instead of initializeWithFontFace.
3031         (WebCore::FontPlatformData::operator=):
3032         (WebCore::FontPlatformData::buildScaledFont): Renamed from initializeWithFontFace, does
3033         the same thing, except calculate whether or not to use synthetic oblique. Instead just
3034         reads the value.
3035         (WebCore::FontPlatformData::setOrientation): Instead of adjusting the font matrix, recreate
3036         the entire font.
3037         (WebCore::FontPlatformData::setSyntheticOblique): Added.
3038         (WebCore::rotateCairoMatrixForVerticalOrientation): Deleted.
3039         (WebCore::FontPlatformData::initializeWithFontFace): Deleted.
3040
3041 2015-05-06  Alex Christensen  <achristensen@webkit.org>
3042
3043         [Content Extensions] Test splitting NFAs by max NFA size.
3044         https://bugs.webkit.org/show_bug.cgi?id=144659
3045
3046         Reviewed by Darin Adler.
3047
3048         * WebCore.xcodeproj/project.pbxproj:
3049         * contentextensions/CombinedURLFilters.cpp:
3050         (WebCore::ContentExtensions::generateNFAForSubtree):
3051         (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
3052         * contentextensions/CombinedURLFilters.h:
3053         * contentextensions/ContentExtensionCompiler.cpp:
3054         (WebCore::ContentExtensions::compileRuleList):
3055         * contentextensions/DFABytecodeCompiler.h:
3056         * contentextensions/DFABytecodeInterpreter.h:
3057         Make maxNFASize a parameter so we can test it with small values.
3058
3059 2015-05-06  Antti Koivisto  <antti@apple.com>
3060
3061         REGRESSION (r183467): Unable to start downloads in private browsing mode
3062         https://bugs.webkit.org/show_bug.cgi?id=144533
3063
3064         Reviewed by Darin Adler.
3065
3066         If willSendRequest delegate mutated the request we would lose the requester field value from the original.
3067
3068         No test runner support for mutating requests.
3069
3070         * platform/network/cf/ResourceRequestCFNet.cpp:
3071         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
3072
3073             This needs to keep the requester too.
3074
3075         * platform/network/cocoa/ResourceRequestCocoa.mm:
3076         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties): Deleted.
3077
3078             Share implementations.
3079
3080 2015-05-06  Ryosuke Niwa  <rniwa@webkit.org>
3081
3082         Toggling underline on font panel removes strike through
3083         https://bugs.webkit.org/show_bug.cgi?id=144670
3084         <rdar://problem/3790443>
3085
3086         Reviewed by Darin Adler.
3087
3088         * editing/EditingStyle.cpp:
3089         (WebCore::EditingStyle::EditingStyle): Added a variant that takes CSSStyleDeclaration.
3090         * editing/EditingStyle.h:
3091         (WebCore::EditingStyle::create): Ditto.
3092         * editing/Editor.cpp:
3093         (WebCore::Editor::applyStyleToSelection): Takes Ref<EditingStyle>&& instead of RefPtr<EditingStyle>&&.
3094         * editing/Editor.h:
3095         * editing/EditorCommand.cpp:
3096         (WebCore::applyCommandToFrame): Ditto.
3097         (WebCore::executeStrikethrough):
3098         (WebCore::executeUnderline):
3099
3100 2015-05-06  Jessie Berlin  <jberlin@webkit.org>
3101
3102         More build fixing.
3103
3104         * page/mac/TextIndicatorWindow.mm:
3105
3106 2015-05-06  Jessie Berlin  <jberlin@webkit.org>
3107
3108         32-bit build fix after r183859 and r183860.
3109
3110         * page/mac/TextIndicatorWindow.mm:
3111         Autosynthesis isn't available for our 32-bit builds.
3112
3113 2015-05-06  Carlos Garcia Campos  <cgarcia@igalia.com>
3114
3115         [EGL] Move EGLDisplay handling to PlatformDisplay and remove PlatformDisplay definition from GLDefs.h
3116         https://bugs.webkit.org/show_bug.cgi?id=144685
3117
3118         Reviewed by Martin Robinson.
3119
3120         The EGL display is also initialized in multiple places, and could
3121         be unified in PlatformDisplay. Remove the PlatformDisplay
3122         definition from platform/graphics/opengl/GLDefs.h to avoid conflicts.
3123
3124         * platform/graphics/PlatformDisplay.cpp:
3125         (WebCore::PlatformDisplay::PlatformDisplay): Initialize m_eglDisplay.
3126         (WebCore::PlatformDisplay::~PlatformDisplay): Call terminateEGLDisplay().
3127         (WebCore::PlatformDisplay::eglDisplay): Lazy intialize the EGL
3128         display and return it.
3129         (WebCore::PlatformDisplay::initializeEGLDisplay):
3130         (WebCore::PlatformDisplay::terminateEGLDisplay):
3131         * platform/graphics/PlatformDisplay.h:
3132         * platform/graphics/egl/GLContextEGL.cpp:
3133         (WebCore::sharedEGLDisplay): Use PlatformDisplay::eglDisplay().
3134         * platform/graphics/opengl/GLDefs.h: Remove unneeded definitions.
3135         * platform/graphics/opengl/GLPlatformSurface.cpp:
3136         (WebCore::GLPlatformSurface::GLPlatformSurface): Remove
3137         m_sharedDisplay member, PlatformDisplay::sharedDisplay() can be used instead.
3138         (WebCore::GLPlatformSurface::sharedDisplay): Deleted.
3139         * platform/graphics/opengl/GLPlatformSurface.h:
3140         * platform/graphics/surfaces/egl/EGLConfigSelector.h: Use
3141         EGLDisplay instead of PlatformDisplay.
3142         * platform/graphics/surfaces/egl/EGLContext.cpp:
3143         (WebCore::EGLOffScreenContext::initialize): Use PlatformDisplay::eglDisplay().
3144         * platform/graphics/surfaces/egl/EGLHelper.cpp: Remove the
3145         EGLDisplayConnection clas and use PlatformDisplay instead.
3146         (WebCore::EGLHelper::eglDisplay):
3147         (WebCore::EGLHelper::currentDisplay):
3148         (WebCore::EGLDisplayConnection::EGLDisplayConnection): Deleted.
3149         (WebCore::EGLDisplayConnection::~EGLDisplayConnection): Deleted.
3150         (WebCore::EGLDisplayConnection::display): Deleted.
3151         (WebCore::EGLDisplayConnection::terminate): Deleted.
3152         * platform/graphics/surfaces/egl/EGLHelper.h:
3153         * platform/graphics/surfaces/egl/EGLSurface.cpp:
3154         (WebCore::EGLTransportSurface::EGLTransportSurface): Use EGLHelper::eglDisplay().
3155         (WebCore::EGLTransportSurface::destroy): Ditto.
3156         (WebCore::EGLOffScreenSurface::EGLOffScreenSurface): Ditto.
3157         (WebCore::EGLOffScreenSurface::destroy): Ditto.
3158         * platform/graphics/surfaces/egl/EGLXSurface.cpp:
3159         (WebCore::EGLWindowTransportSurface::EGLWindowTransportSurface):
3160         Use PlatformDisplay::eglDisplay().
3161         (WebCore::EGLWindowTransportSurface::swapBuffers): Ditto.
3162         (WebCore::EGLPixmapSurface::EGLPixmapSurface): Ditto.
3163         * platform/graphics/surfaces/glx/GLXContext.cpp:
3164         (WebCore::GLXOffScreenContext::initialize): Use X11Helper::nativeDisplay().
3165         * platform/graphics/surfaces/glx/GLXSurface.cpp:
3166         (WebCore::GLXTransportSurface::GLXTransportSurface): Do not use m_sharedDisplay.
3167         (WebCore::GLXOffScreenSurface::initialize): Ditto.
3168         * platform/graphics/wayland/PlatformDisplayWayland.cpp:
3169         (WebCore::PlatformDisplayWayland::PlatformDisplayWayland): Call
3170         PlatformDisplay::initializeEGLDisplay() to insialize the EGL display.
3171         * platform/graphics/wayland/PlatformDisplayWayland.h:
3172         * platform/graphics/x11/PlatformDisplayX11.cpp:
3173         (WebCore::PlatformDisplayX11::initializeEGLDisplay): Override
3174         PlatformDisplay::initializeEGLDisplay() to initialize the
3175         m_eglDisplay member.
3176         * platform/graphics/x11/PlatformDisplayX11.h:
3177
3178 2015-05-06  Joseph Pecoraro  <pecoraro@apple.com>
3179
3180         Web Inspector: DOMStorage exception and issue with sessionStorage
3181         https://bugs.webkit.org/show_bug.cgi?id=144646
3182
3183         Reviewed by Timothy Hatcher.
3184
3185         * inspector/InspectorDOMStorageAgent.cpp:
3186         (WebCore::InspectorDOMStorageAgent::findStorageArea):
3187         Return session storage if the identifier says not local storage.
3188
3189 2015-05-06  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
3190
3191         Move ReadableStreamJSSource.h/.cpp to ReadableJSStream.h/.cpp
3192         https://bugs.webkit.org/show_bug.cgi?id=144567
3193
3194         Reviewed by Darin Adler.
3195
3196         In addition to renaming ReadableStreamJSSource.h/.cpp, ReadableStreamJSSource is now made a private class of
3197         ReadableJSStream, called ReadableJSStream::Source.
3198         Made some minor refactoring (passing some ExecState by ref and not by pointer).
3199         No functional change, existing tests cover the changes.
3200
3201         * bindings/js/JSReadableStreamCustom.cpp:
3202         * bindings/js/ReadableJSStream.cpp:
3203         (WebCore::ReadableJSStream::Source::create):
3204         (WebCore::ReadableJSStream::Source::Source):
3205         (WebCore::ReadableJSStream::Source::~Source):
3206         (WebCore::ReadableJSStream::Source::globalObject):
3207         (WebCore::ReadableJSStream::Source::start):
3208         (WebCore::ReadableJSStream::create):
3209         (WebCore::ReadableJSStream::ReadableJSStream):
3210         * bindings/js/ReadableJSStream.h:
3211
3212 2015-05-05  Tim Horton  <timothy_horton@apple.com>
3213
3214         REGRESSION (r183517): Yellow find-in-page highlight gets stuck forever
3215         https://bugs.webkit.org/show_bug.cgi?id=144651
3216         <rdar://problem/20755722>
3217
3218         * page/mac/TextIndicatorWindow.mm:
3219         Fix an incorrectly-applied review comment.
3220
3221 2015-05-05  Timothy Horton  <timothy_horton@apple.com>
3222
3223         REGRESSION (r183517): Yellow find-in-page highlight gets stuck forever
3224         https://bugs.webkit.org/show_bug.cgi?id=144651
3225         <rdar://problem/20755722>
3226
3227         Reviewed by Dan Bernstein.
3228
3229         * page/mac/TextIndicatorWindow.h:
3230         * page/mac/TextIndicatorWindow.mm:
3231         (WebCore::TextIndicatorWindow::clearTextIndicator):
3232         (WebCore::TextIndicatorWindow::setTextIndicator):
3233         (WebCore::TextIndicatorWindow::closeWindow):
3234         (WebCore::TextIndicatorWindow::startFadeOut):
3235         We can't keep m_fadingOut on TextIndicatorWindow, since it is reused.
3236         Keep it on the WebTextIndicatorView instead.
3237
3238 2015-05-05  Žan Doberšek  <zdobersek@igalia.com>
3239
3240         Add missing vtable override specifiers under Source/WebCore/html
3241         https://bugs.webkit.org/show_bug.cgi?id=144578
3242
3243         Reviewed by Daniel Bates.
3244
3245         Update virtual method overrides under Source/WebCore/html
3246         which are missing the override specifier.
3247
3248         * html/canvas/WebGL2RenderingContext.h:
3249         * html/canvas/WebGLRenderingContext.h:
3250         * html/track/InbandTextTrack.h:
3251         * html/track/TrackListBase.h:
3252
3253 2015-05-05  Žan Doberšek  <zdobersek@igalia.com>
3254
3255         Add missing vtable override specifiers under Source/WebCore/rendering
3256         https://bugs.webkit.org/show_bug.cgi?id=144570
3257
3258         Reviewed by Darin Adler.
3259
3260         Update virtual method overrides under Source/WebCore/rendering
3261         which are missing the override specifiers.
3262
3263         * rendering/InlineTextBox.h:
3264         (WebCore::InlineTextBox::calculateBoundaries): Deleted.
3265         * rendering/RenderFlowThread.h:
3266         * rendering/RenderMedia.h:
3267         (WebCore::RenderMedia::shadowControlsNeedCustomLayoutMetrics): Deleted.
3268         * rendering/RenderMultiColumnSet.h:
3269         * rendering/RenderRegion.h:
3270         * rendering/RenderRegionSet.h:
3271         * rendering/RenderThemeGtk.h:
3272         * rendering/mathml/RenderMathMLOperator.h:
3273         * rendering/svg/RenderSVGBlock.h:
3274
3275 2015-05-05  Žan Doberšek  <zdobersek@igalia.com>
3276
3277         Add missing vtable override specifiers under Source/WebCore/Modules
3278         https://bugs.webkit.org/show_bug.cgi?id=144569
3279
3280         Reviewed by Darin Adler.
3281
3282         Update virtual method overrides under Source/WebCore/Modules
3283         which are missing the override specifier.
3284
3285         * Modules/mediasource/SourceBuffer.h:
3286         * Modules/mediastream/MediaStreamTrack.h:
3287         * Modules/mediastream/RTCVoidRequestImpl.h:
3288         * Modules/webaudio/AudioContext.h:
3289         (WebCore::AudioContext::mediaType): Deleted.
3290         (WebCore::AudioContext::presentationType): Deleted.
3291         (WebCore::AudioContext::canReceiveRemoteControlCommands): Deleted.
3292         (WebCore::AudioContext::didReceiveRemoteControlCommand): Deleted.
3293         (WebCore::AudioContext::overrideBackgroundPlaybackRestriction): Deleted.
3294         * Modules/webaudio/MediaStreamAudioDestinationNode.h:
3295         * Modules/webaudio/MediaStreamAudioSourceNode.h:
3296         * Modules/webaudio/WaveShaperDSPKernel.h:
3297         * Modules/websockets/WebSocketChannel.h:
3298         (WebCore::WebSocketChannel::refThreadableWebSocketChannel): Deleted.
3299         (WebCore::WebSocketChannel::derefThreadableWebSocketChannel): Deleted.
3300         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
3301         (WebCore::WorkerThreadableWebSocketChannel::refThreadableWebSocketChannel): Deleted.
3302         (WebCore::WorkerThreadableWebSocketChannel::derefThreadableWebSocketChannel): Deleted.
3303
3304 2015-05-05  Žan Doberšek  <zdobersek@igalia.com>
3305
3306         EventHandler::m_eventHandlerWillResetCapturingMouseEventsElement is incorrectly initialized
3307         https://bugs.webkit.org/show_bug.cgi?id=144583
3308
3309         Reviewed by Daniel Bates.
3310
3311         * page/EventHandler.cpp:
3312         (WebCore::EventHandler::EventHandler): The
3313         m_eventHandlerWillResetCapturingMouseEventsElement is a boolean,
3314         so initialize it to false, instead of to nullptr.
3315
3316 2015-05-05  Manuel Rego Casasnovas  <rego@igalia.com>
3317
3318         [CSS Grid Layout] grid-template-areas should accept none value
3319         https://bugs.webkit.org/show_bug.cgi?id=144624
3320
3321         Reviewed by Darin Adler.
3322
3323         Default value for grid-template-areas property is "none":
3324         http://dev.w3.org/csswg/css-grid/#propdef-grid-template-areas
3325
3326         Currently if you set the property to "none" from JavaScript, the value
3327         doesn't get reseted and it keeps the old value.
3328
3329         Update fast/css-grid-layout/grid-template-areas-get-set.html adding a
3330         new test case.
3331
3332         * css/CSSParser.cpp:
3333         (WebCore::CSSParser::parseGridTemplateAreas): Add support to parse
3334         "none" successfully.
3335
3336 2015-05-05  Zalan Bujtas  <zalan@apple.com>
3337
3338         Remove unused RenderLayerBacking::hasContentsLayer().
3339         https://bugs.webkit.org/show_bug.cgi?id=144658
3340
3341         Reviewed by Simon Fraser.
3342
3343         No change in functionality.
3344
3345         * rendering/RenderLayerBacking.h:
3346
3347 2015-05-05  Alex Christensen  <achristensen@webkit.org>
3348
3349         [Content Extensions] Limit NFA size.
3350         https://bugs.webkit.org/show_bug.cgi?id=144649
3351
3352         Reviewed by Benjamin Poulain.
3353
3354         * contentextensions/CombinedURLFilters.cpp:
3355         (WebCore::ContentExtensions::generateNFAForSubtree):
3356         (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
3357         Add a maximum NFA size to ensure that we do not use too much memory when compiling.
3358         * contentextensions/ContentExtensionCompiler.cpp:
3359         (WebCore::ContentExtensions::compileRuleList):
3360         Remove debugging code that doesn't compile any more.
3361
3362 2015-05-05  Roger Fong  <roger_fong@apple.com>
3363
3364         Unreviewed. Some assertion failures in compositing code after r183820.
3365         https://bugs.webkit.org/show_bug.cgi?id=144630.
3366
3367         * rendering/RenderLayerCompositor.cpp:
3368         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3369
3370 2015-05-05  Timothy Horton  <timothy_horton@apple.com>
3371
3372         Add a layout mode for computing fixed layout size from a minimum size
3373         https://bugs.webkit.org/show_bug.cgi?id=144610
3374         <rdar://problem/19790341>
3375
3376         Reviewed by Simon Fraser.
3377
3378         * platform/spi/cocoa/QuartzCoreSPI.h:
3379         Add some SPI.
3380
3381 2015-05-05  Brent Fulgham  <bfulgham@apple.com>
3382
3383         iOS] Scroll snap points trigger reentrant layout
3384         https://bugs.webkit.org/show_bug.cgi?id=144644
3385         <rdar://problem/20366547>
3386
3387         Reviewed by Simon Fraser.
3388
3389         Covered by scroll-snap-mandatory.html test.
3390
3391         We had an iOS code path in 'appendChildSnapOffsets' that used offsetLeft and offsetTop. This code
3392         was sometimes called during layout, which triggered a reentrant layout call, resulting in a debug
3393         assertion.
3394
3395         * page/scrolling/AxisScrollSnapOffsets.cpp:
3396         (WebCore::appendChildSnapOffsets): Remove iOS codepath.
3397
3398 2015-05-05  Roger Fong  <roger_fong@apple.com>
3399
3400         Blurry media control icons on non retina displays.
3401         https://bugs.webkit.org/show_bug.cgi?id=144638.
3402         <rdar://problem/20526166>
3403
3404         Reviewed by Dean Jackson.
3405
3406         * Modules/mediacontrols/mediaControlsApple.css:
3407         Adjust fullscreen buttons so that they look good on both 1x and 2x displays.
3408         (audio::-webkit-media-controls-fullscreen-button):
3409         (audio::-webkit-media-controls-fullscreen-button.exit):
3410         (audio::-webkit-media-controls-fullscreen-button:active):
3411         (audio::-webkit-media-controls-panel button.exit:active):
3412         Handle wireless playback picker button background in mediaControlsApple.js
3413         (audio::-webkit-media-controls-wireless-playback-picker-button):
3414         (audio::-webkit-media-controls-wireless-playback-picker-button.playing): Deleted.
3415
3416         * Modules/mediacontrols/mediaControlsApple.js:
3417         Update wireless playback picker button based on display type.
3418         (Controller.prototype.UIString):
3419         (Controller.prototype.handleReadyStateChange):
3420         (Controller.prototype.updateWirelessTargetPickerButton):
3421         (Controller.prototype.updateWirelessPlaybackStatus):
3422
3423 2015-05-05  Joseph Pecoraro  <pecoraro@apple.com>
3424
3425         Web Inspector: Crash under WebCore::domWindowFromExecState reloading page with inspector open
3426         https://bugs.webkit.org/show_bug.cgi?id=144636
3427
3428         Reviewed by Mark Lam.
3429
3430         This ensures we create an InjectedScript for the execution context
3431         (frame) preventing the global object / exec state from getting garbage
3432         collected before we remove it from our map.
3433
3434         * inspector/PageRuntimeAgent.cpp:
3435         (WebCore::PageRuntimeAgent::notifyContextCreated):
3436
3437 2015-05-05  Dean Jackson  <dino@apple.com>
3438
3439         [iOS] AirPlay placeholder in inline videos uses Helvetica or Times, should be system font
3440         https://bugs.webkit.org/show_bug.cgi?id=144643
3441
3442         Reviewed by Brent Fulgham.
3443
3444         The Airplay placard should use "-apple-system" as a font-family.
3445