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