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