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