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