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