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