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