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