Unreviewed build fix after r167755.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-04-24  Zalan Bujtas  <zalan@apple.com>
2
3         Unreviewed build fix after r167755.
4
5         * rendering/RenderThemeMac.h:
6
7 2014-04-24  Zalan Bujtas  <zalan@apple.com>
8
9         Transition RenderTheme API from RenderObject* to const RenderObject&
10         https://bugs.webkit.org/show_bug.cgi?id=132037
11
12         Reviewed by Andreas Kling.
13
14         Using const references provides better encapsulation and improve security.
15
16         No change in behavior.
17
18         * accessibility/AccessibilityObject.cpp:
19         (WebCore::AccessibilityObject::boundingBoxForQuads):
20         * dom/Element.cpp:
21         (WebCore::Element::setActive):
22         (WebCore::Element::setHovered):
23         * editing/FrameSelection.cpp:
24         (WebCore::FrameSelection::focusedOrActiveStateChanged):
25         * html/HTMLFormControlElement.cpp:
26         (WebCore::HTMLFormControlElement::disabledStateChanged):
27         (WebCore::HTMLFormControlElement::readOnlyAttributeChanged):
28         * html/HTMLInputElement.cpp:
29         (WebCore::HTMLInputElement::setChecked):
30         (WebCore::HTMLInputElement::setIndeterminate):
31         * html/HTMLOptionElement.cpp:
32         (WebCore::HTMLOptionElement::parseAttribute):
33         * rendering/RenderBlock.cpp:
34         (WebCore::RenderBlock::addVisualOverflowFromTheme):
35         (WebCore::RenderBlock::baselinePosition):
36         * rendering/RenderBox.cpp:
37         (WebCore::RenderBox::paintBoxDecorations):
38         * rendering/RenderButton.cpp:
39         (WebCore::RenderButton::styleDidChange):
40         * rendering/RenderFileUploadControl.cpp:
41         (WebCore::RenderFileUploadControl::paintObject):
42         * rendering/RenderFlowThread.cpp:
43         (WebCore::RenderFlowThread::addRegionsVisualOverflowFromTheme):
44         * rendering/RenderObject.cpp:
45         (WebCore::RenderObject::drawLineForBoxSide):
46         * rendering/RenderObject.h:
47         * rendering/RenderProgress.cpp:
48         (WebCore::RenderProgress::computeLogicalHeight):
49         * rendering/RenderTextControlSingleLine.cpp:
50         (WebCore::RenderTextControlSingleLine::paint):
51         * rendering/RenderTheme.cpp:
52         (WebCore::RenderTheme::paint):
53         (WebCore::RenderTheme::paintBorderOnly):
54         (WebCore::RenderTheme::paintDecorations):
55         (WebCore::RenderTheme::baselinePosition):
56         (WebCore::RenderTheme::adjustRepaintRect):
57         (WebCore::RenderTheme::stateChanged):
58         (WebCore::RenderTheme::updateControlStatesForRenderer):
59         (WebCore::RenderTheme::extractControlStatesForRenderer):
60         (WebCore::RenderTheme::isActive):
61         (WebCore::RenderTheme::isChecked):
62         (WebCore::RenderTheme::isIndeterminate):
63         (WebCore::RenderTheme::isEnabled):
64         (WebCore::RenderTheme::isFocused):
65         (WebCore::RenderTheme::isPressed):
66         (WebCore::RenderTheme::isSpinUpButtonPartPressed):
67         (WebCore::RenderTheme::isReadOnlyControl):
68         (WebCore::RenderTheme::isHovered):
69         (WebCore::RenderTheme::isSpinUpButtonPartHovered):
70         (WebCore::RenderTheme::isDefault):
71         (WebCore::RenderTheme::paintInputFieldSpeechButton):
72         (WebCore::RenderTheme::paintMeter):
73         (WebCore::RenderTheme::paintSliderTicks):
74         (WebCore::RenderTheme::progressBarRectForBounds):
75         * rendering/RenderTheme.h:
76         (WebCore::RenderTheme::controlSupportsTints):
77         (WebCore::RenderTheme::paintCapsLockIndicator):
78         (WebCore::RenderTheme::paintFileUploadIconDecorations):
79         (WebCore::RenderTheme::imageControlsButtonSize):
80         (WebCore::RenderTheme::paintCheckbox):
81         (WebCore::RenderTheme::paintRadio):
82         (WebCore::RenderTheme::paintButton):
83         (WebCore::RenderTheme::paintInnerSpinButton):
84         (WebCore::RenderTheme::paintCheckboxDecorations):
85         (WebCore::RenderTheme::paintRadioDecorations):
86         (WebCore::RenderTheme::paintButtonDecorations):
87         (WebCore::RenderTheme::paintTextField):
88         (WebCore::RenderTheme::paintTextFieldDecorations):
89         (WebCore::RenderTheme::paintTextArea):
90         (WebCore::RenderTheme::paintTextAreaDecorations):
91         (WebCore::RenderTheme::paintMenuList):
92         (WebCore::RenderTheme::paintMenuListDecorations):
93         (WebCore::RenderTheme::paintMenuListButtonDecorations):
94         (WebCore::RenderTheme::paintPushButtonDecorations):
95         (WebCore::RenderTheme::paintSquareButtonDecorations):
96         (WebCore::RenderTheme::paintProgressBar):
97         (WebCore::RenderTheme::paintSliderTrack):
98         (WebCore::RenderTheme::paintSliderThumb):
99         (WebCore::RenderTheme::paintSliderThumbDecorations):
100         (WebCore::RenderTheme::paintSearchField):
101         (WebCore::RenderTheme::paintSearchFieldDecorations):
102         (WebCore::RenderTheme::paintSearchFieldCancelButton):
103         (WebCore::RenderTheme::paintSearchFieldDecorationPart):
104         (WebCore::RenderTheme::paintSearchFieldResultsDecorationPart):
105         (WebCore::RenderTheme::paintSearchFieldResultsButton):
106         (WebCore::RenderTheme::paintMediaFullscreenButton):
107         (WebCore::RenderTheme::paintMediaPlayButton):
108         (WebCore::RenderTheme::paintMediaOverlayPlayButton):
109         (WebCore::RenderTheme::paintMediaMuteButton):
110         (WebCore::RenderTheme::paintMediaSeekBackButton):
111         (WebCore::RenderTheme::paintMediaSeekForwardButton):
112         (WebCore::RenderTheme::paintMediaSliderTrack):
113         (WebCore::RenderTheme::paintMediaSliderThumb):
114         (WebCore::RenderTheme::paintMediaVolumeSliderContainer):
115         (WebCore::RenderTheme::paintMediaVolumeSliderTrack):
116         (WebCore::RenderTheme::paintMediaVolumeSliderThumb):
117         (WebCore::RenderTheme::paintMediaRewindButton):
118         (WebCore::RenderTheme::paintMediaReturnToRealtimeButton):
119         (WebCore::RenderTheme::paintMediaToggleClosedCaptionsButton):
120         (WebCore::RenderTheme::paintMediaControlsBackground):
121         (WebCore::RenderTheme::paintMediaCurrentTime):
122         (WebCore::RenderTheme::paintMediaTimeRemaining):
123         (WebCore::RenderTheme::paintMediaFullScreenVolumeSliderTrack):
124         (WebCore::RenderTheme::paintMediaFullScreenVolumeSliderThumb):
125         (WebCore::RenderTheme::paintSnapshottedPluginOverlay):
126         (WebCore::RenderTheme::paintImageControlsButton):
127         * rendering/RenderThemeIOS.h:
128         * rendering/RenderThemeIOS.mm:
129         (WebCore::RenderThemeIOS::addRoundedBorderClip):
130         (WebCore::RenderThemeIOS::paintCheckboxDecorations):
131         (WebCore::RenderThemeIOS::baselinePosition):
132         (WebCore::RenderThemeIOS::paintRadioDecorations):
133         (WebCore::RenderThemeIOS::paintTextFieldDecorations):
134         (WebCore::RenderThemeIOS::paintTextAreaDecorations):
135         (WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
136         (WebCore::RenderThemeIOS::paintSliderTrack):
137         (WebCore::RenderThemeIOS::paintSliderThumbDecorations):
138         (WebCore::RenderThemeIOS::paintProgressBar):
139         (WebCore::RenderThemeIOS::paintSearchFieldDecorations):
140         (WebCore::RenderThemeIOS::paintButtonDecorations):
141         (WebCore::RenderThemeIOS::paintPushButtonDecorations):
142         (WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
143         * rendering/RenderThemeMac.h:
144         (WebCore::RenderThemeMac::updateActiveState):
145         * rendering/RenderThemeMac.mm:
146         (WebCore::RenderThemeMac::documentViewFor):
147         (WebCore::RenderThemeMac::adjustRepaintRect):
148         (WebCore::RenderThemeMac::convertToPaintingRect):
149         (WebCore::RenderThemeMac::updateCheckedState):
150         (WebCore::RenderThemeMac::updateEnabledState):
151         (WebCore::RenderThemeMac::updateFocusedState):
152         (WebCore::RenderThemeMac::updatePressedState):
153         (WebCore::RenderThemeMac::controlSupportsTints):
154         (WebCore::RenderThemeMac::paintTextField):
155         (WebCore::RenderThemeMac::paintCapsLockIndicator):
156         (WebCore::RenderThemeMac::paintTextArea):
157         (WebCore::RenderThemeMac::paintMenuList):
158         (WebCore::RenderThemeMac::paintMeter):
159         (WebCore::RenderThemeMac::progressBarRectForBounds):
160         (WebCore::RenderThemeMac::paintProgressBar):
161         (WebCore::RenderThemeMac::paintMenuListButtonGradients):
162         (WebCore::RenderThemeMac::paintMenuListButtonDecorations):
163         (WebCore::RenderThemeMac::setPopupButtonCellState):
164         (WebCore::RenderThemeMac::paintSliderTrack):
165         (WebCore::RenderThemeMac::paintSliderThumb):
166         (WebCore::RenderThemeMac::paintSearchField):
167         (WebCore::RenderThemeMac::setSearchCellState):
168         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
169         (WebCore::RenderThemeMac::paintSearchFieldDecorationPart):
170         (WebCore::RenderThemeMac::paintSearchFieldResultsDecorationPart):
171         (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
172         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
173         (WebCore::RenderThemeMac::paintImageControlsButton):
174         (WebCore::RenderThemeMac::imageControlsButtonSize):
175
176 2014-04-23  Carlos Garcia Campos  <cgarcia@igalia.com>
177
178         [GTK] HTML Media capture attribute is a boolean since r163958
179         https://bugs.webkit.org/show_bug.cgi?id=132061
180
181         Reviewed by Gustavo Noronha Silva.
182
183         Add new methods webkit_dom_html_input_element_get_capture_enabled
184         and webkit_dom_html_input_element_set_capture_enabled using a
185         boolean and deprecate the old methods.
186
187         * bindings/gobject/WebKitDOMDeprecated.cpp:
188         (webkit_dom_html_input_element_get_capture):
189         (webkit_dom_html_input_element_set_capture):
190         * bindings/gobject/WebKitDOMDeprecated.h:
191         * bindings/gobject/WebKitDOMDeprecated.symbols:
192         * bindings/gobject/webkitdom.symbols:
193         * bindings/scripts/CodeGeneratorGObject.pm:
194         (GetEffectiveFunctionName): Helper function to rename API methods
195         for special cases.
196         (GenerateFunction): Use GetEffectiveFunctionName().
197
198 2014-04-23  Praveen R Jadhav  <praveen.j@samsung.com>
199
200         [MediaStream] Implement MediaStream active attribute
201         https://bugs.webkit.org/show_bug.cgi?id=131973
202
203         Reviewed by Eric Carlson.
204
205         MediaStream .active attribute are introduced which will replace
206         .ended attribute. This patch implements the newly introduced attributes.
207
208         MediaStream-add-remove-tracks.html is updated to handle this scenario.
209
210         * Modules/mediastream/MediaStream.cpp:
211         (WebCore::MediaStream::active): Added.
212         (WebCore::MediaStream::setActive): Added.
213         (WebCore::MediaStream::addTrack): Propagates 'onactive' event when required.
214         (WebCore::MediaStream::removeTrack): Propagates 'oninactive' event when required.
215         (WebCore::MediaStream::trackDidEnd): Propagates 'oninactive' event when required.
216         (WebCore::MediaStream::streamDidEnd):
217         (WebCore::MediaStream::setStreamIsActive): Added.
218         * Modules/mediastream/MediaStream.h:
219         * Modules/mediastream/MediaStream.idl:
220         * dom/EventNames.h:
221         * platform/mediastream/MediaStreamPrivate.cpp:
222         (WebCore::MediaStreamPrivate::MediaStreamPrivate): Initialize .active attribute
223         (WebCore::MediaStreamPrivate::setEnded):
224         (WebCore::MediaStreamPrivate::setActive): Added.
225         * platform/mediastream/MediaStreamPrivate.h:
226         (WebCore::MediaStreamPrivate::active): Added.
227
228 2014-04-23  Darin Adler  <darin@apple.com>
229
230         [Cocoa] fix CF leaks found by code inspection
231         https://bugs.webkit.org/show_bug.cgi?id=132106
232
233         Reviewed by Andreas Kling.
234
235         * page/CaptionUserPreferencesMediaAF.cpp:
236         (WebCore::trackDisplayName): Added a missing adoptCF.
237
238         * platform/Language.cpp:
239         (WebCore::displayNameForLanguageLocale): Added a missing adoptCF.
240
241         * platform/graphics/FontPlatformData.cpp:
242         (WebCore::FontPlatformData::openTypeTable): Added a missing adoptCF.
243
244         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
245         (WebCore::InbandTextTrackPrivateAVCF::label): Added two missing adoptCF.
246
247         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
248         (WebCore::AVFWrapper::createImageForTimeInRect): Added two missing adoptCF.
249
250         * platform/graphics/cg/PDFDocumentImage.cpp:
251         (WebCore::PDFDocumentImage::createPDFDocument): Added missing adoptCF.
252
253         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
254         (WebCore::cascadeToLastResortFontDescriptor): Added two missing adoptCF.
255
256         * platform/graphics/mac/FontMac.mm:
257         (WebCore::Font::primaryFontDataIsSystemFont): Added missing adoptCF.
258
259         * platform/graphics/mac/SimpleFontDataMac.mm:
260         (WebCore::hasCustomTracking): Added missing adoptCF.
261
262         * platform/image-decoders/ImageDecoder.h:
263         (WebCore::ImageDecoder::qcmsOutputDeviceProfile): Added CFRelease.
264
265         * plugins/mac/PluginPackageMac.cpp:
266         (WebCore::readPListFile): Added two missing adoptCF.
267
268 2014-04-23  Ryosuke Niwa  <rniwa@webkit.org>
269
270         REGRESSION (r157328): popover to check into flight ba.com dismisses instantly when focusing form
271         https://bugs.webkit.org/show_bug.cgi?id=131949
272
273         Address the review comment.
274
275         * dom/EventDispatcher.cpp:
276         (WebCore::EventRelatedNodeResolver::findHostOfTreeScopeInTargetTreeScope):
277
278 2014-04-23  Andreas Kling  <akling@apple.com>
279
280         CachedResourceLoader hoards URLs indefinitely for no good reason.
281         <https://webkit.org/b/132102>
282         <rdar://problem/16708265>
283
284         Since we don't care about CachedResourceLoader::m_validatedURL's after
285         the Document has finished dispatching its initial load event, clear the
286         set at that point, and don't add any new URLs to it.
287
288         Reviewed by Anders Carlsson.
289
290         * dom/Document.cpp:
291         (WebCore::Document::dispatchWindowLoadEvent):
292         * loader/cache/CachedResourceLoader.cpp:
293         (WebCore::CachedResourceLoader::requestResource):
294         (WebCore::CachedResourceLoader::documentDidFinishLoadEvent):
295         * loader/cache/CachedResourceLoader.h:
296
297 2014-04-23  Andreas Kling  <akling@apple.com>
298
299         Canvas cache of clean URLs can grow without bounds.
300         <https://webkit.org/b/132091>
301         <rdar://problem/16695665>
302
303         Remove a silly "optimization" that kept a cache of clean URLs
304         that can be drawn into a canvas without tainting it, all to avoid
305         the "expensive" checks to determine whether it would taint.
306
307         Reviewed by Benjamin Poulain.
308
309         * html/canvas/CanvasRenderingContext.cpp:
310         (WebCore::CanvasRenderingContext::wouldTaintOrigin):
311         * html/canvas/CanvasRenderingContext.h:
312
313 2014-04-23  Benjamin Poulain  <bpoulain@apple.com>
314
315         [iOS][WK2] Fix a few mistakes affecting the initial layout and the initial unobscured rect
316         https://bugs.webkit.org/show_bug.cgi?id=132093
317
318         Reviewed by Tim Horton.
319
320         Change the minimum layout size to float point values to account for size defined on retina displays.
321         The minimum layout size supports half-pixels, the value is rounded later when computing the layout size
322         in document coordinates.
323
324         * WebCore.exp.in:
325         * page/ViewportConfiguration.cpp:
326         (WebCore::ViewportConfiguration::ViewportConfiguration):
327         Setting the initial content size is incorrect. The layout size computation already take into account
328         empty size for the first layout.
329
330         Setting the content size upfront make the first computation incorrect when the viewport arguments specify
331         the initial scale.
332
333         (WebCore::ViewportConfiguration::setMinimumLayoutSize):
334         * page/ViewportConfiguration.h:
335         (WebCore::ViewportConfiguration::minimumLayoutSize):
336
337 2014-04-23  Brent Fulgham  <bfulgham@apple.com>
338
339         [Mac, iOS] Stop buffering media when on an inactive tab. 
340         https://bugs.webkit.org/show_bug.cgi?id=132077
341
342         Reviewed by Eric Carlson.
343
344         * html/HTMLMediaElement.cpp: Rename 'm_isDisplaySleepDisablingSuspended'
345         to 'm_elementIsHidden'.
346         (WebCore::HTMLMediaElement::HTMLMediaElement):
347         (WebCore::HTMLMediaElement::visibilityStatusChanged): Notify the
348         media session that the element is (or is not) hidden.
349         (WebCore::HTMLMediaElement::setShouldBufferData): Added.
350         * html/HTMLMediaElement.h:
351         * platform/audio/MediaSession.cpp:
352         (WebCore::MediaSession::clientWillBeginPlayback): Tell media to
353         buffer if not hidden or playing.
354         (WebCore::MediaSession::clientWillPausePlayback): Ditto.
355         (WebCore::MediaSession::visibilityChanged): Added. Client API, just relays call
356         to updateClientDataBuffering.
357         (WebCore::MediaSession::updateClientDataBuffering): Tell client it should only
358         buffer data if it's currently playing, or not hidden.
359         * platform/audio/MediaSession.h:
360         * platform/graphics/MediaPlayer.cpp:
361         (WebCore::MediaPlayer::setShouldBufferData): Added: Just relays to
362         MediaPlayerPrivate object.
363         * platform/graphics/MediaPlayer.h:
364         * platform/graphics/MediaPlayerPrivate.h:
365         (WebCore::MediaPlayerPrivateInterface::setShouldBufferData):
366         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
367         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
368         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
369         (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldBufferData): Added.
370         Detach the player item from the player if we don't want to continue
371         buffering or other background tasks.
372
373 2014-04-23  Alexey Proskuryakov  <ap@apple.com>
374
375         Eliminate internals.setMockScrollbarsEnabled()
376         https://bugs.webkit.org/show_bug.cgi?id=132085
377
378         Reviewed by Tim Horton.
379
380         This was essentially unused, and also didnt work.
381
382         * testing/InternalSettings.cpp:
383         (WebCore::InternalSettings::Backup::restoreTo):
384         (WebCore::InternalSettings::setMockScrollbarsEnabled): Deleted.
385         * testing/InternalSettings.h:
386         * testing/InternalSettings.idl:
387
388 2014-04-23  Anders Carlsson  <andersca@apple.com>
389
390         Don't migrate the WKView.h header from WebCore to WebKit
391         https://bugs.webkit.org/show_bug.cgi?id=132086
392
393         Reviewed by Dan Bernstein.
394
395         * WebCore.xcodeproj/project.pbxproj:
396         Add WAKViewInternal.h.
397
398         * platform/WAKViewInternal.h: Added.
399
400         * platform/ios/wak/WAKClipView.m:
401         Import WAKViewInternal.h instead of WAKViewPrivate.h.
402
403         * platform/ios/wak/WAKScrollView.mm:
404         Import WAKViewInternal.h instead of WAKViewPrivate.h.
405
406         * platform/ios/wak/WAKView.h:
407         Move ivars to a class extension in WAKViewInternal.h and remove WKView.h import.
408
409         * platform/ios/wak/WAKView.mm:
410         Import WAKViewInternal.h instead of WAKViewPrivate.h.
411
412         * platform/ios/wak/WAKViewPrivate.h:
413         Import WKViewPrivate.h.
414
415 2014-04-23  David Hyatt  <hyatt@apple.com>
416
417         [New Multicolumn] fast/multicol/fixed-column-percent-logical-height-orthogonal-writing-mode.html fails
418         https://bugs.webkit.org/show_bug.cgi?id=132078
419
420         Reviewed by Anders Carlsson.
421
422         * rendering/RenderBox.cpp:
423         (WebCore::RenderBox::skipContainingBlockForPercentHeightCalculation):
424         Add a parameter to test for orthogonal writing modes. If we're perpendicular,
425         then we should not skip the flow thread, since we resolve relative to the column width,
426         and that is always set.
427
428         (WebCore::RenderBox::computePercentageLogicalHeight):
429         Patched to pass in whether or not the box and the ancestor block are perpendicular.
430
431         * rendering/RenderBox.h:
432         Patched the signature of skipContainingBlockForPercentHeightCalculation
433
434 2014-04-23  Myles C. Maxfield  <mmaxfield@apple.com>
435
436         [OS X] Make checking if a font is the system font more robust
437         https://bugs.webkit.org/show_bug.cgi?id=132030
438
439         Reviewed by Dean Jackson.
440
441         Instead of inspecting a font's name to determine if it is a system font,
442         on OS X we can ask the system directly.
443
444         This patch also moves a platform-specific check into platform-specific
445         code, so that other platforms don't check for OS X-specific behavior.
446
447         Covered by existing tests.
448
449         * platform/graphics/Font.cpp:
450         (WebCore::Font::hasValidAverageCharWidth):
451         * platform/graphics/Font.h:
452         * platform/graphics/mac/FontMac.mm:
453         (WebCore::Font::primaryFontDataIsSystemFont):
454
455 2014-04-23  David Hyatt  <hyatt@apple.com>
456
457         [New Multicolumn] Assertion failure in huge-column-count.html
458         https://bugs.webkit.org/show_bug.cgi?id=132071
459
460         Reviewed by Dean Jackson.
461
462         * rendering/RenderBlock.cpp:
463         (WebCore::RenderBlock::regionAtBlockOffset):
464         Back out this change, since it wasn't general enough.
465
466         * rendering/RenderFlowThread.cpp:
467         (WebCore::RenderFlowThread::getRegionRangeForBox):
468         The real issue was that this loop needed to consider the actual box
469         rather than starting from the parent. This was a non-issue for normal
470         regions (which cannot have nested flow threads), but for columns, you 
471         have to consider the fact that the box could itself be a flow thread.
472
473 2014-04-23  Andreas Kling  <akling@apple.com>
474
475         [iOS] Memory pressure notification should fire on main thread.
476         <https://webkit.org/b/132074>
477
478         Rejig the memory pressure notification to fire on the main queue
479         directly instead of rerouting it manually.
480
481         Reviewed by Mark Rowe.
482
483         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
484         (WebCore::MemoryPressureHandler::install):
485
486 2014-04-23  Commit Queue  <commit-queue@webkit.org>
487
488         Unreviewed, rolling out r167720.
489         https://bugs.webkit.org/show_bug.cgi?id=132075
490
491         broke eight newmulticol tests (Requested by thorton on
492         #webkit).
493
494         Reverted changeset:
495
496         "[New Multicolumn] Assertion failure in huge-column-
497         count.html"
498         https://bugs.webkit.org/show_bug.cgi?id=132071
499         http://trac.webkit.org/changeset/167720
500
501 2014-04-23  David Hyatt  <hyatt@apple.com>
502
503         [New Multicolumn] Assertion failure in huge-column-count.html
504         https://bugs.webkit.org/show_bug.cgi?id=132071
505
506         Reviewed by Dean Jackson.
507
508         * rendering/RenderBlock.cpp:
509         (WebCore::RenderBlock::regionAtBlockOffset):
510         Remove the code that returned 0 here, since we're going to patch a lower-level
511         function to catch all cases.
512
513         * rendering/RenderFlowThread.cpp:
514         (WebCore::RenderFlowThread::getRegionRangeForBox):
515         Don't allow in-flow RenderFlowThreads to ever have a region range. The sets
516         are what should have ranges... the flow thread needs to just be ignored.
517
518 2014-04-23  David Hyatt  <hyatt@apple.com>
519
520         [New Multicolumn] Crasher when clearing out a flow thread in multicolumn layout.
521         https://bugs.webkit.org/show_bug.cgi?id=132069
522
523         Reviewed by Dean Jackson.
524
525         This is imported from a patch Morten did for Blink, but I had to change it a fair
526         bit. deleteLines() is used to handle simple line box layout instead of just calling
527         deleteLineBoxTree.
528         
529         I also had to disable the layout state to stop asserts on repaint when the children
530         get moved. Not sure why Blink didn't hit this, but it's simple enough to add a
531         LayoutStateDisabler to stop the assert.
532
533         Added fast/multicol/inline-children-crash.html
534
535         * rendering/RenderMultiColumnFlowThread.cpp:
536         (WebCore::RenderMultiColumnFlowThread::evacuateAndDestroy):
537
538 2014-04-23  Andreas Kling  <akling@apple.com>
539
540         [iOS WebKit2] IOSurfacePool should force CA to actually garbage collect surfaces.
541         <https://webkit.org/b/132065>
542         <rdar://problem/16110687>
543
544         Add a platformGarbageCollectNow() helper function to IOSurfacePool that
545         triggers a sweep of the IOSurfaces. Call this from collectionTimerFired()
546         and discardAllSurfaces().
547
548         This lets us drop all otherwise-unused 420f surfaces on memory pressure.
549
550         Reviewed by Tim Horton.
551
552         * WebCore.xcodeproj/project.pbxproj:
553         * platform/graphics/cg/IOSurfacePool.cpp:
554         (WebCore::IOSurfacePool::collectionTimerFired):
555         (WebCore::IOSurfacePool::discardAllSurfaces):
556         * platform/graphics/cg/IOSurfacePool.h:
557         * platform/graphics/cocoa/IOSurfacePoolCocoa.mm: Added.
558         (WebCore::IOSurfacePool::platformGarbageCollectNow):
559
560 2014-04-23  Morten Stenshorne  <mstensho@opera.com>
561
562         REGRESSION (Safari 6 - ToT): Incorrectly assumes that RenderStyle data can be shared
563         https://bugs.webkit.org/show_bug.cgi?id=113058
564
565         Reviewed by David Hyatt.
566
567         Before sharing CSS properties with an element in the cache, we need to
568         check that the new element is suitable for this, just like we check
569         elements before inserting them into the cache.
570
571         Test: fast/css/identical-logical-height-decl.html
572
573         * css/StyleResolver.cpp:
574         (WebCore::StyleResolver::applyMatchedProperties):
575
576 2014-04-23  Commit Queue  <commit-queue@webkit.org>
577
578         Unreviewed, rolling out r167713.
579         https://bugs.webkit.org/show_bug.cgi?id=132070
580
581         broke hundreds of tests (Requested by thorton on #webkit).
582
583         Reverted changeset:
584
585         "[OS X] Make checking if a font is the system font more
586         robust"
587         https://bugs.webkit.org/show_bug.cgi?id=132030
588         http://trac.webkit.org/changeset/167713
589
590 2014-04-22  David Hyatt  <hyatt@apple.com>
591
592         [New Multicolumn] Nested columns not working at all.
593         https://bugs.webkit.org/show_bug.cgi?id=131805
594
595         Reviewed by Dean Jackson.
596
597         Add support for nested pagination contexts, allowing for an arbitrary level
598         of nesting of multicolumn layouts. There were a number of things that had to
599         be patched in order for this to work.
600
601         * rendering/RenderBlock.cpp:
602         (WebCore::RenderBlock::regionAtBlockOffset):
603         Make sure RenderMultiColumnFlowThreads just return null for regions at any
604         block offset. Individual region sets will be created as you cross ancestor
605         regions eventually, so this is just getting in the way.
606
607         * rendering/RenderLayer.cpp:
608         (WebCore::RenderLayer::enclosingPaginationLayerInSubtree):
609         Add a new helper method for obtaining an enclosingPaginationLayer when
610         constrained by some root. This function ensures you don't accidentally
611         cross your subtree root when looking for enclosing pagination layers.
612
613         (WebCore::RenderLayer::collectFragments):
614         Patch collectFragments to know how to recur to collect ancestor fragments
615         in order to apply nested splitting as you cross pagination boundaries.
616
617         (WebCore::RenderLayer::updatePaintingInfoForFragments):
618         (WebCore::RenderLayer::calculateClipRects):
619         * rendering/RenderLayer.h:
620         (WebCore::LayerFragment::LayerFragment):
621         (WebCore::LayerFragment::setRects):
622         (WebCore::LayerFragment::moveBy):
623         (WebCore::LayerFragment::intersect):
624         Improve the LayerFragment so that it caches transformed bounding boxes as
625         well. This is needed to fix intersectsDamageRect so that it doesn't grab
626         the wrong bounding box when checking inline layers that are paginated.
627
628         * rendering/RenderMultiColumnFlowThread.cpp:
629         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
630         Ignore inserted flow threads inside an ancestor flow thread, since we only
631         care about what the sets do.
632         
633         * rendering/RenderObject.cpp:
634         (WebCore::RenderObject::insertedIntoTree):
635         Make sure that nested flow thread layers return themselves when a child
636         is inserted directly under them.
637
638 2014-04-22  Myles C. Maxfield  <mmaxfield@apple.com>
639
640         [OS X] Make checking if a font is the system font more robust
641         https://bugs.webkit.org/show_bug.cgi?id=132030
642
643         Reviewed by Dean Jackson.
644
645         Instead of inspecting a font's name to determine if it is a system font,
646         on OS X we can ask the system directly.
647
648         This patch also moves a platform-specific check into platform-specific
649         code, so that other platforms don't check for OS X-specific behavior.
650
651         Covered by existing tests.
652
653         * platform/graphics/Font.cpp:
654         (WebCore::Font::hasValidAverageCharWidth):
655         * platform/graphics/Font.h:
656         * platform/graphics/mac/FontMac.mm:
657         (WebCore::Font::primaryFontDataIsSystemFont):
658
659 2014-04-23  Philippe Normand  <pnormand@igalia.com>
660
661         [GTK] Focus management API was moved from HTMLDocument to Document in r166668
662         https://bugs.webkit.org/show_bug.cgi?id=132060
663
664         Reviewed by Carlos Garcia Campos.
665
666         Deprecate the removed methods in WebKitDOMHTMLDocument to keep API compatibility.
667
668         * bindings/gobject/WebKitDOMDeprecated.cpp:
669         (webkit_dom_html_document_get_active_element):
670         (webkit_dom_html_document_has_focus):
671         * bindings/gobject/WebKitDOMDeprecated.h:
672         * bindings/gobject/WebKitDOMDeprecated.symbols:
673         * bindings/gobject/webkitdom.symbols:
674
675 2014-04-22  Andreas Kling  <akling@apple.com>
676
677         [iOS WebKit1] MemoryPressureHandler::respondToMemoryPressure called on wrong thread.
678         <https://webkit.org/b/132041>
679         <rdar://problem/16687238>
680
681         Always dispatch the memory pressure relief code on the main queue.
682         This is really only needed for iOS/WK1, but we might as well share the code.
683
684         Reviewed by Michael Saboff.
685
686         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
687         (WebCore::MemoryPressureHandler::install):
688
689 2014-04-23  Philippe Normand  <pnormand@igalia.com>
690
691         [GTK] ShadowRoot API was removed in r164131
692         https://bugs.webkit.org/show_bug.cgi?id=132059
693
694         Reviewed by Gustavo Noronha Silva.
695
696         Add ShadowRoot removed API to WebKitDOMDeprecated to keep API/ABI compatibility.
697
698         * bindings/gobject/WebKitDOMDeprecated.cpp:
699         (webkit_dom_shadow_root_class_init):
700         (webkit_dom_shadow_root_init):
701         (webkit_dom_shadow_root_element_from_point):
702         (webkit_dom_shadow_root_get_active_element):
703         (webkit_dom_shadow_root_get_apply_author_styles):
704         (webkit_dom_shadow_root_get_element_by_id):
705         (webkit_dom_shadow_root_get_elements_by_class_name):
706         (webkit_dom_shadow_root_get_elements_by_tag_name):
707         (webkit_dom_shadow_root_get_elements_by_tag_name_ns):
708         (webkit_dom_shadow_root_get_inner_html):
709         (webkit_dom_shadow_root_get_reset_style_inheritance):
710         (webkit_dom_shadow_root_get_selection):
711         (webkit_dom_shadow_root_set_apply_author_styles):
712         (webkit_dom_shadow_root_set_inner_html):
713         (webkit_dom_shadow_root_set_reset_style_inheritance):
714         * bindings/gobject/WebKitDOMDeprecated.h:
715         * bindings/gobject/WebKitDOMDeprecated.symbols:
716
717 2014-04-23  Morten Stenshorne  <mstensho@opera.com>
718
719         [New Multicolumn] fast/multicol/overflow-content.html displays red
720         https://bugs.webkit.org/show_bug.cgi?id=131809
721
722         Reviewed by David Hyatt.
723
724         Insert a break at end of content on our own in the multicol code, to make sure
725         that overflow is accounted for, and also to make sure that we account for all
726         content in non-final sets (i.e. those preceding spanners).
727
728         In other words, this will additionally fix balancing issues in sets preceding
729         a spanner. Added a test for that.
730
731         Tests: fast/multicol/break-in-columns-before-spanner.html
732                fast/multicol/newmulticol/compare-with-old-impl/overflow-content.html
733
734         * rendering/RenderFlowThread.cpp:
735         (WebCore::RenderFlowThread::regionInRange): Deleted.
736         * rendering/RenderFlowThread.h:
737         * rendering/RenderMultiColumnSet.cpp:
738         (WebCore::RenderMultiColumnSet::distributeImplicitBreaks):
739         * rendering/RenderNamedFlowThread.cpp:
740         (WebCore::RenderNamedFlowThread::applyBreakAfterContent):
741         * rendering/RenderNamedFlowThread.h:
742
743 2014-04-23  Morten Stenshorne  <mstensho@opera.com>
744
745         Overflow propagation broken in BTT and RTL writing-modes
746         https://bugs.webkit.org/show_bug.cgi?id=113781
747
748         Reviewed by David Hyatt.
749
750         Overflow rectangles are not quite physical, not quite logical. This
751         means that we cannot use clientBoxRect() directly to represent a
752         rectangle that expresses exactly no overflow. This rectangle is the
753         padding box (relative to the border box) in vertical-lr and
754         horizontal-tb, but the block-direction borders need to be flipped in
755         vertical-rl and horizontal-bt.
756
757         Tests: fast/css/overflow-btt-border-after.html
758                fast/css/overflow-rtl-border-after.html
759
760         * WebCore.exp.in:
761         * rendering/RenderBlock.cpp:
762         (WebCore::RenderBlock::computeOverflow):
763         * rendering/RenderBox.cpp:
764         (WebCore::RenderBox::addLayoutOverflow):
765         (WebCore::RenderBox::addVisualOverflow):
766         (WebCore::RenderBox::layoutOverflowRectForPropagation):
767         * rendering/RenderBox.h:
768         (WebCore::RenderBox::layoutOverflowRect):
769
770 2014-04-23  Andrei Bucur  <abucur@adobe.com>
771
772         [CSS Regions] Improve the debugging infrastructure
773         https://bugs.webkit.org/show_bug.cgi?id=132042
774
775         Reviewed by Mihnea Ovidenie.
776
777         This patch improves the debugging code for CSS Regions.
778
779         Tests: No function change. No new tests.
780
781         * rendering/RenderObject.cpp:
782         (WebCore::RenderObject::showRegionsInformation): Print brackets around the region range when dumping
783         the render tree to the console.
784         * rendering/RootInlineBox.cpp:
785         (WebCore::RootInlineBox::containingRegion): Convert the ASSERT to an ASSERT_WITH_SECURITY_IMPLICATION.
786
787 2014-04-22  Ryosuke Niwa  <rniwa@webkit.org>
788
789         Cursor doesn't change back to pointer when leaving the Safari window
790         https://bugs.webkit.org/show_bug.cgi?id=132038
791
792         Reviewed by Alexey Proskuryakov.
793
794         r147739 incorrectly added an early exit in EventHandler::selectCursor when hit test result didn't have
795         any node associated with it. Since we will hit this code when the cursor is outside of the WebView,
796         we still need to take the CURSOR_AUTO path as did the code before r147739.
797
798         No new test is added since this behavior can't be tested in DRT or WTR.
799
800         * page/EventHandler.cpp:
801         (WebCore::EventHandler::selectCursor):
802
803 2014-04-22  Zalan Bujtas  <zalan@apple.com>
804
805         Do not paint border image when the border rect is empty.
806         https://bugs.webkit.org/show_bug.cgi?id=131988
807
808         Reviewed by Darin Adler.
809
810         http://trac.webkit.org/changeset/167351 introduced an early return when border
811         rect is empty. This patch ensures that border image is not painted either in that case.
812
813         Modified padding-margin-negative-border.html to cover border-image case.
814
815         * rendering/RenderBoxModelObject.cpp:
816         (WebCore::RenderBoxModelObject::paintBorder):
817
818 2014-04-22  Tim Horton  <timothy_horton@apple.com>
819
820         ASSERTION FAILED: scrollerImp == scrollbarPainterForScrollbar(_scrollbar) on two API tests
821         https://bugs.webkit.org/show_bug.cgi?id=132034
822         <rdar://problem/16624332>
823
824         Reviewed by Simon Fraser.
825
826         * platform/mac/ScrollAnimatorMac.mm:
827         (-[WebScrollbarPainterDelegate shouldUseLayerPerPartForScrollerImp:]):
828         scrollerImpWithStyle:controlSize:horizontal:replacingScrollerImp: moves the delegate
829         from the old scrollerImp to the new one, and also happens to call shouldUseLayerPerPartForScrollerImp.
830         Since scrollerImpWithStyle: has not returned yet, the scrollbarPainterForScrollbar still returns the old scrollerImp,
831         so this assertion fires. It's safe to remove this because supportsUpdateOnSecondaryThread doesn't make use of the imp.
832
833 2014-04-22  Ryosuke Niwa  <rniwa@webkit.org>
834
835         REGRESSION (r157328): popover to check into flight ba.com dismisses instantly when focusing form
836         https://bugs.webkit.org/show_bug.cgi?id=131949
837
838         Reviewed by Darin Adler.
839
840         The regression was caused by two bugs:
841         1. The event didn't stop propagating itself even when it should.
842            If the related target is same as the event origin, the event propagation should stop when the event reaches
843            the root of the related target's tree scope. Otherwise, it should stop when it reaches the related target.
844
845         2. Mouse event's related target exposed nodes inside a user-agent shadow DOM when the related target appeared
846            inside the origin.
847
848         Fixed the bugs by re-introducing path shrinkage algorithm removed in r157328 into EventPath::setRelatedTarget
849         and adding an algorithm to determine the least common ancestor of the related target and the current target
850         in moveToParentOrShadowHost. The latter algorithm doesn't match the shadow DOM specification:
851         http://www.w3.org/TR/2013/WD-shadow-dom-20130514/
852         but it's good enough in terms of the Web exposed behavior as we don't support author defined insertion points.
853
854         Test: fast/events/shadow-event-path.html
855
856         * dom/EventDispatcher.cpp:
857         (WebCore::EventRelatedNodeResolver::moveToParentOrShadowHost):
858         (WebCore::EventRelatedNodeResolver::findHostOfTreeScopeInTargetTreeScope): Added.
859         (WebCore::EventDispatcher::dispatchEvent):
860         (WebCore::EventPath::setRelatedTarget):
861
862 2014-04-22  Ryosuke Niwa  <rniwa@webkit.org>
863
864         Rollout r156635 since the old behavior was intentional.
865
866         * page/EventHandler.cpp:
867         (WebCore::EventHandler::selectCursor):
868
869 2014-04-22  Commit Queue  <commit-queue@webkit.org>
870
871         Unreviewed, rolling out r167674.
872         https://bugs.webkit.org/show_bug.cgi?id=132025
873
874         Going a different way with this (Requested by bradee-oh on
875         #webkit).
876
877         Reverted changeset:
878
879         "Change Image Controls replacement to use selection and paste"
880         https://bugs.webkit.org/show_bug.cgi?id=131992
881         http://trac.webkit.org/changeset/167674
882
883 2014-04-22  Brent Fulgham  <bfulgham@apple.com>
884
885         [Win] Support Python 2.7 in Cygwin
886         https://bugs.webkit.org/show_bug.cgi?id=132023
887
888         Reviewed by Michael Saboff.
889
890         * DerivedSources.make: Use proper path to Cygwin on
891         all platforms.
892
893 2014-04-22  Andreas Kling  <akling@apple.com>
894
895         REGRESSION (r151839): Subframe keeps getting mousemove events with the same coordinates after hiding a hovered element.
896         <https://webkit.org/b/131974>
897         <rdar://problem/15907469>
898
899         When the currently hovered element disappears as a result of style recalc,
900         we send a fake mousemove event to the page, to see if anything newly added
901         should become hovered.
902
903         The faking mechanism lives in EventHandler and simply synthesizes a new
904         mousemove event using the last seen mouse location.
905
906         The problem here is that we were sending this fake mousemove event to the
907         subframe where the hovered element lived. Since subframes aren't kept up
908         to date on recent mouse locations, this could cause some strange behavior
909         where a subframe would dispatch mousemove events with stale coordinates.
910
911         The solution is to always dispatch fake mousemove events from the main
912         frame's event handler. This is how real event delivery happens, and hit
913         testing will then find the appropriate subframe, if any.
914
915         Reviewed by Benjamin Poulain.
916
917         Test: fast/events/ghostly-mousemoves-in-subframe.html
918
919         * dom/Document.cpp:
920         (WebCore::Document::recalcStyle):
921
922 2014-04-22  Myles C. Maxfield  <mmaxfield@apple.com>
923
924         [OS X] Glyph spacing for system fonts may be incorrect
925         https://bugs.webkit.org/show_bug.cgi?id=131967
926
927         Unreviewed iOS build fix after r167679.
928
929         * platform/graphics/mac/SimpleFontDataMac.mm:
930
931 2014-04-22  Myles C. Maxfield  <mmaxfield@apple.com>
932
933         [OS X] Glyph spacing for system fonts may be incorrect
934         https://bugs.webkit.org/show_bug.cgi?id=131967
935
936         Unreviewed build fix after r167679.
937
938         * platform/graphics/mac/SimpleFontDataMac.mm:
939         (WebCore::hasCustomTracking):
940
941 2014-04-21  Myles C. Maxfield  <mmaxfield@apple.com>
942
943         [OS X] Glyph spacing for system fonts may be incorrect
944         https://bugs.webkit.org/show_bug.cgi?id=131967
945
946         Reviewed by Simon Fraser.
947
948         Covered by existing tests.
949
950         * platform/graphics/mac/SimpleFontDataMac.mm:
951         (WebCore::SimpleFontData::platformWidthForGlyph): Update to use CTFontGetAdvancesForGlyphs() for system fonts
952         (WebCore::hasCustomTracking):
953
954 2014-04-22  David Hyatt  <hyatt@apple.com>
955
956         [New Multicolumn] widows/orphans cause assertion failures.
957         https://bugs.webkit.org/show_bug.cgi?id=131233
958
959         Reviewed by Dean Jackson.
960
961         * rendering/RenderMultiColumnSet.cpp:
962         (WebCore::RenderMultiColumnSet::recordSpaceShortage):
963         Fix an obvious bug where the space shortage is recorded twice (and the
964         if statement that kept it from being negative is accidentally ignored).
965
966 2014-04-22  David Hyatt  <hyatt@apple.com>
967
968         [New Multicolumn] Make sure columnTranslationForOffset has the same column-span-aware
969         translation that fragment collection does.
970         https://bugs.webkit.org/show_bug.cgi?id=131738
971
972         Reviewed by Anders Carlsson.
973
974         * rendering/RenderMultiColumnSet.cpp:
975         (WebCore::RenderMultiColumnSet::collectLayerFragments):
976         Remove a FIXME that is no longer needed, since the translation offset of the 
977         column set did get patched.
978
979         (WebCore::RenderMultiColumnSet::columnTranslationForOffset):
980         Add the exact same fix to columnTranslationForOffset that was applied to collectLayerFragments.
981
982 2014-04-22  Mark Lam  <mark.lam@apple.com>
983
984         WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript() needs to acquire the JSLock before calling into JS.
985         <https://webkit.org/b/132021>
986
987         Reviewed by Mark Hahnenberg.
988
989         Covered by existing layout test.
990
991         * html/HTMLMediaElement.cpp:
992         (WebCore::HTMLMediaElement::parseAttribute):
993
994 2014-04-22  Manuel Rego Casasnovas  <rego@igalia.com>
995
996         REGRESSION (r167652): Broke fast/regions/cssom/region-range-for-box-crash.html in debug mode
997         https://bugs.webkit.org/show_bug.cgi?id=131982
998
999         Reviewed by David Hyatt.
1000
1001         The problem was creating the Range from the arguments received at RenderView::setSelection(). Specifically
1002         in this test endPos is 1 when the element has not children which creates an invalid Range.
1003
1004         * rendering/RenderView.cpp:
1005         (WebCore::RenderView::splitSelectionBetweenSubtrees): Pass 0 as startPos and endPos to Range::create() as we are
1006         not interested in the positions at this point.
1007
1008 2014-04-22  Brady Eidson  <beidson@apple.com>
1009
1010         Change Image Controls replacement to use selection and paste
1011         <rdar://problem/16302722> and https://bugs.webkit.org/show_bug.cgi?id=131992
1012
1013         Reviewed by Tim Horton.
1014
1015         * WebCore.exp.in: Remove deleted symbol.
1016
1017         * html/shadow/mac/ImageControlsButtonElementMac.cpp:
1018         (WebCore::ImageControlsButtonElementMac::defaultEventHandler):
1019
1020         * page/ContextMenuController.cpp:
1021         (WebCore::ContextMenuController::showImageControlsMenu): Select the image element
1022           before showing the menu.
1023         (WebCore::ContextMenuController::replaceControlledImage): Deleted.
1024         * page/ContextMenuController.h:
1025
1026 2014-04-22  David Hyatt  <hyatt@apple.com>
1027
1028         REGRESSION: Hitting asserts in new flow thread selection code.
1029         https://bugs.webkit.org/show_bug.cgi?id=132019
1030
1031         Reviewed by Anders Carlsson.
1032
1033         Null checking flowThreadController is not enough. The list of threads
1034         can be null even when the flowThreadController is not. That's why you
1035         use hasRenderNamedFlowThreads. I patched the two bad places in the code
1036         to use hasRenderNamedFlowThreads to stop the crashes.
1037         
1038         * rendering/RenderView.cpp:
1039         (WebCore::RenderView::selectionBounds):
1040         (WebCore::RenderView::repaintSelection):
1041
1042 2014-04-22  Brent Fulgham  <bfulgham@apple.com>
1043
1044         Check (rather than assume) element is a RenderTableSection before using it
1045         https://bugs.webkit.org/show_bug.cgi?id=121858
1046
1047         Reviewed by David Kilzer.
1048
1049         Test: fast/table/table-insert-object-before-td-crash.html
1050
1051         * rendering/RenderTable.cpp:
1052         (WebCore::RenderTable::addChild): Check that lastBox is a table section before
1053         using the node as if it was one.
1054
1055 2014-04-22  Alex Christensen  <achristensen@webkit.org>
1056
1057         Begin implementation of video using Media Foundation.
1058         https://bugs.webkit.org/show_bug.cgi?id=131830
1059
1060         Reviewed by Brent Fulgham.
1061
1062         * WebCore.vcxproj/WebCore.vcxproj:
1063         * WebCore.vcxproj/WebCore.vcxproj.filters:
1064         Added MediaPlayerPrivateMediaFoundation files.
1065         * platform/graphics/MediaPlayer.cpp:
1066         Include MediaPlayerPrivateMediaFoundation inside new USE(MEDIA_FOUNDATION) flag.
1067         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp: Added.
1068         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h: Added.
1069
1070 2014-04-22  Commit Queue  <commit-queue@webkit.org>
1071
1072         Unreviewed, rolling out r167658.
1073         https://bugs.webkit.org/show_bug.cgi?id=131993
1074
1075         Caused many crashes on media tests (Requested by ap on
1076         #webkit).
1077
1078         Reverted changeset:
1079
1080         "[Mac] don't ask for AVAssetTrack properties before they are
1081         available"
1082         https://bugs.webkit.org/show_bug.cgi?id=131902
1083         http://trac.webkit.org/changeset/167658
1084
1085 2014-04-22  David Hyatt  <hyatt@apple.com>
1086
1087         [New Multicolumn] fast/multicol/multicol-with-child-renderLayer-for-input.html puts the textfield in the wrong place
1088         https://bugs.webkit.org/show_bug.cgi?id=131808
1089
1090         Reviewed by Brady Eidson.
1091     
1092         Make sure FrameView is patched to pass in the update pagination flag when subtree layout
1093         is done on textfields. It had code for the old multicolumn system but did not have a check
1094         for the new multicolumn system.
1095
1096         Added fast/multicol/newmulticol/compare-with-old-impl/multicol-with-child-renderLayer-for-input.html
1097
1098         * page/FrameView.cpp:
1099         (WebCore::updateLayerPositionFlags):
1100
1101 2014-04-22  Zalan Bujtas  <zalan@apple.com>
1102
1103         border-style: double rendered as solid when combined with border-radius
1104         https://bugs.webkit.org/show_bug.cgi?id=131927
1105
1106         Reviewed by Simon Fraser.
1107
1108         BorderEdge::getDoubleBorderStripeWidths() should return the calculated inner, outer border widths. 
1109
1110         Test: fast/borders/hidpi-double-border-with-border-radius-always-produce-solid-line.html
1111
1112         * rendering/BorderEdge.cpp:
1113         (WebCore::BorderEdge::getDoubleBorderStripeWidths):
1114         * rendering/BorderEdge.h:
1115
1116 2014-04-22  Eric Carlson  <eric.carlson@apple.com>
1117
1118         [Mac] don't ask for AVAssetTrack properties before they are available
1119         https://bugs.webkit.org/show_bug.cgi?id=131902
1120         <rdar://problem/16505076>
1121
1122         Reviewed by Jer Noble.
1123
1124         No new tests, the behavior this changes can not be tested with a layout test.
1125
1126         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1127         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1128         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Initialize
1129             m_cachedTotalBytes.
1130         (WebCore::MediaPlayerPrivateAVFoundationObjC::beginLoadingMetadata): Don't report that
1131             metadata has been loaded until the track properties we need have been loaded too.
1132         (WebCore::MediaPlayerPrivateAVFoundationObjC::totalBytes): Cache totalBytes instead
1133             of recalculating it every time.
1134         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange): Invalidate cached
1135             total bytes.
1136         (WebCore::assetTrackMetadataKeyNames): Array of AVAssetTrack properties we use.
1137
1138 2014-04-22  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
1139
1140         Buildfix after r167650 broke non-Cocoa builds
1141         https://bugs.webkit.org/show_bug.cgi?id=131980
1142
1143         Reviewed by Mario Sanchez Prada.
1144
1145         * page/EventHandler.cpp:
1146         (WebCore::EventHandler::handleWheelEvent):
1147
1148 2014-04-22  Manuel Rego Casasnovas  <rego@igalia.com>
1149
1150         [CSS Regions] Selection highlight doesn't match DOM selection
1151         https://bugs.webkit.org/show_bug.cgi?id=131511
1152
1153         Reviewed by David Hyatt.
1154
1155         This patch implements a subtrees approach to fix selection interaction in CSS Regions.
1156
1157         The idea is to divide the Render tree in subtrees. One subtree will be the RenderView (which is always present),
1158         then for each RenderNamedFlowThread (which are children of RenderView) we will have an extra subtree.
1159
1160         For each subtree it determines the start and end positions according to the DOM tree. So, every subtree will
1161         always have a start and end position, and the selection algorithm will be able to reach the end from the start
1162         without problems (this allows us to remove the changes introduced in r155058).
1163
1164         Then selection related methods in RenderView are adapted to ensure that they are called for each subtree. Making
1165         the selection highlight to match DOM selection as expected.
1166
1167         Test: fast/regions/selection/selecting-text-including-region.html
1168
1169         * CMakeLists.txt: Add new class SelectionSubtreeRoot to build file.
1170         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
1171         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1172         * WebCore.xcodeproj/project.pbxproj: Ditto.
1173         * rendering/RenderNamedFlowThread.h: Inherit from SelectionSubtreeRoot.
1174         * rendering/RenderObject.cpp:
1175         (WebCore::RenderObject::selectionRoot): New method to return the RenderNamedFlowThread if any or the RenderView
1176         otherwise.
1177         (WebCore::RenderObject::selectionStartEnd): If it's inside a RenderNamedFlowThread use specific method instead
1178         of the RenderView's one.
1179         * rendering/RenderObject.h: Add new method signature.
1180         * rendering/RenderView.cpp:
1181         (WebCore::RenderView::selectionBounds): Adapt method to subtrees approach.
1182         (WebCore::RenderView::subtreeSelectionBounds): Modify previous method in order to use SelectionSubtreeRoot
1183         objects.
1184         (WebCore::RenderView::repaintSelection): Adapt method to subtrees approach.
1185         (WebCore::RenderView::repaintSubtreeSelection): Modify previous method in order to use SelectionSubtreeRoot
1186         objects.
1187         (getNextOrPrevRenderObjectBasedOnDirection): Deleted method from r155058 as it is not needed anymore. Each
1188         subtree will have start and end positions, so the selection algorithm will always find the end.
1189         (WebCore::RenderView::setSelection): Adapt method to subtrees approach.
1190         (WebCore::RenderView::splitSelectionBetweenSubtrees): Determine start and end positions for each subtree and
1191         call setSubtreeSelection().
1192         (WebCore::RenderView::setSubtreeSelection): Modify previous method in order to use SelectionSubtreeRoot objects.
1193         * rendering/RenderView.h: Inherit from SelectionSubtreeRoot. Add signature for new helper methods receiving
1194         SelectionSubtreeRoot objects.
1195         * rendering/SelectionSubtreeRoot.cpp: Added.
1196         (WebCore::SelectionSubtreeRoot::SelectionSubtreeRoot):
1197         (WebCore::SelectionSubtreeRoot::selectionStartEndPositions):
1198         * rendering/SelectionSubtreeRoot.h: Added. New class to identify root elements for the subtrees. With some basic
1199         attributes and methods to store the start and end positions and offsets.
1200         (WebCore::SelectionSubtreeRoot::selectionStart):
1201         (WebCore::SelectionSubtreeRoot::selectionStartPos):
1202         (WebCore::SelectionSubtreeRoot::selectionEnd):
1203         (WebCore::SelectionSubtreeRoot::selectionEndPos):
1204         (WebCore::SelectionSubtreeRoot::setSelectionStart):
1205         (WebCore::SelectionSubtreeRoot::setSelectionStartPos):
1206         (WebCore::SelectionSubtreeRoot::setSelectionEnd):
1207         (WebCore::SelectionSubtreeRoot::setSelectionEndPos):
1208
1209 2014-04-21  Brent Fulgham  <bfulgham@apple.com>
1210
1211         [Mac] Follow-up: After a horizontal overflow scroll with a mechanical wheel mouse, vertical scrolling no longer works
1212         https://bugs.webkit.org/show_bug.cgi?id=131960
1213         <rdar://problem/16142100>
1214
1215         Unreviewed build fix.
1216
1217         * page/EventHandler.cpp:
1218         (WebCore::EventHandler::handleWheelEvent): The test to clear the
1219         last scrolled node was too broad. It should only follow this path
1220         if both the phase and momentum phase are 'None'.
1221
1222 2014-04-21  Brent Fulgham  <bfulgham@apple.com>
1223
1224         [Mac] After a horizontal overflow scroll with a mechanical wheel mouse, vertical scrolling no longer works
1225         https://bugs.webkit.org/show_bug.cgi?id=131960
1226         <rdar://problem/16142100>
1227
1228         Reviewed by Darin Adler.
1229
1230         Test: platform/mac/fast/scrolling/scroll-div-no-latching.html
1231
1232         * page/EventHandler.cpp:
1233         (WebCore::EventHandler::handleWheelEvent): When not latching, always clear m_latchedWheelEventElement and m_previousWheelScrolledElement.
1234
1235 2014-04-21  Joseph Pecoraro  <pecoraro@apple.com>
1236
1237         WebProfilerAgent::disable is calling the wrong superclass method
1238         https://bugs.webkit.org/show_bug.cgi?id=131968
1239
1240         Reviewed by Simon Fraser.
1241
1242         * inspector/WebProfilerAgent.cpp:
1243         (WebCore::WebProfilerAgent::disable):
1244
1245 2014-04-21  Enrica Casucci  <enrica@apple.com>
1246
1247         Followup from http://trac.webkit.org/changeset/167624
1248
1249         Reviewed by Darin Adler.
1250
1251         Fixing incorrect use of ? : syntax.
1252
1253         * editing/VisibleUnits.cpp:
1254         (WebCore::characterBeforePosition):
1255
1256 2014-04-21  Ryuan Choi  <ryuan.choi@samsung.com>
1257
1258         Move CoordinatedGraphics related codes out of CMakeLists.txt
1259         https://bugs.webkit.org/show_bug.cgi?id=131931
1260
1261         Reviewed by Gyuyoung Kim.
1262
1263         Move CoordinatedGraphics related files to PlatformEfl.cmake because they are not common files.
1264
1265         * CMakeLists.txt: 
1266         * PlatformEfl.cmake:
1267
1268 2014-04-21  Jer Noble  <jer.noble@apple.com>
1269
1270         [MSE][Mac] AVSampleBufferDisplayLayer and AudioRenderer is overretained.
1271         https://bugs.webkit.org/show_bug.cgi?id=131963
1272
1273         Reviewed by Jon Honeycutt.
1274
1275         Adopt the results of -[[class alloc] init] rather than retaining them.
1276
1277         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1278         (WebCore::SourceBufferPrivateAVFObjC::hasVideo):
1279         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
1280
1281 2014-04-21  Zalan Bujtas  <zalan@apple.com>
1282
1283         REGRESSION (r166784): Gradient at background of iCloud login page doesn’t go all the way to the bottom
1284         https://bugs.webkit.org/show_bug.cgi?id=131924
1285
1286         Computing tile dimension for contain/cover requires higher precision than what LayoutUnit has. Switching to floats.
1287
1288         Reviewed by Simon Fraser.
1289
1290         Test: fast/backgrounds/hidpi-background-image-contain-cover-scale-needs-more-precision.html
1291
1292         * rendering/RenderBoxModelObject.cpp:
1293         (WebCore::RenderBoxModelObject::calculateFillTileSize):
1294
1295 2014-04-21  Dean Jackson  <dino@apple.com>
1296
1297         Build fix for Mountain Lion.
1298
1299         * platform/mac/SerializedPlatformRepresentationMac.mm:
1300         (WebCore::SerializedPlatformRepresentationMac::deserialize):
1301
1302 2014-04-21  Dan Bernstein  <mitz@apple.com>
1303
1304         WebCore part of <rdar://problem/16631323> Page::setDefersLoading doesn’t do anything when using the Network process
1305         https://bugs.webkit.org/show_bug.cgi?id=131939
1306
1307         Reviewed by David Kilzer.
1308
1309         * WebCore.exp.in: Exported WebCore::ResourceHandle::setDefersLoading.
1310
1311         * loader/ResourceLoadScheduler.cpp:
1312         (WebCore::ResourceLoadScheduler::setDefersLoading): Added a no-op implementation.
1313         * loader/ResourceLoadScheduler.h: Declared new virtual member function setDefersLoading.
1314
1315         * loader/ResourceLoader.cpp:
1316         (WebCore::ResourceLoader::setDefersLoading): Added a call to the above function.
1317
1318 2014-04-21  Brent Fulgham  <bfulgham@apple.com>
1319
1320         [Mac] Difficulty gesture scrolling vertically with trackpad after scrolling horizontally 
1321         https://bugs.webkit.org/show_bug.cgi?id=131959
1322         <rdar://problem/16654523>
1323
1324         Reviewed by Simon Fraser.
1325
1326         * page/mac/EventHandlerMac.mm:
1327         (WebCore::deltaIsPredominantlyVertical): Added.
1328         (WebCore::scrolledToEdgeInDominantDirection): Only consider current mouse wheel event. We don't care about
1329         overall history when deciding if we are bumping against the edge of a scrollable region. Short-circuit if
1330         the element style indicates that overflow is hidden, since this means there is no scroll possible in that
1331         direction.
1332         (WebCore::EventHandler::platformPrepareForWheelEvents): Update for new signature.
1333
1334 2014-04-21  Eric Carlson  <eric.carlson@apple.com>
1335
1336         [Mac] implement WebKitDataCue
1337         https://bugs.webkit.org/show_bug.cgi?id=131799
1338
1339         Reviewed by Dean Jackson.
1340
1341         Tests: http/tests/media/track-in-band-hls-metadata.html
1342                media/track/track-datacue-value.html
1343
1344         * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE.
1345         * DerivedSources.make: Add ENABLE_DATACUE_VALUE to HTML_FLAGS when appropriate.
1346
1347         * CMakeLists.txt: Add JSDataCueCustom.cpp.
1348         * bindings/js/JSBindingsAllInOne.cpp:
1349         * WebCore.xcodeproj/project.pbxproj: Add new files.
1350
1351         * bindings/js/JSDataCueCustom.cpp: Added.
1352         (WebCore::JSDataCue::value): 
1353         (WebCore::JSDataCue::setValue):
1354         (WebCore::JSDataCueConstructor::constructJSDataCue): Custom constructor.
1355
1356         * html/HTMLMediaElement.cpp:
1357         (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Drive-by fixes: don't schedule timeupdate
1358             events when paused, don't call sort on an Vector that can't be sorted.
1359
1360         * html/track/DataCue.cpp:
1361         (WebCore::DataCue::DataCue): Initialize m_type.
1362         (WebCore::DataCue::~DataCue): Unprotect the JSValue if necessary.
1363         (WebCore::DataCue::data): Ask the platform value for data if non-null.
1364         (WebCore::DataCue::setData): Clear m_platformValue and m_value.
1365         (WebCore::DataCue::isEqual): New.
1366         (WebCore::DataCue::value): Return a JSValue from the platform value, or the value passed
1367             to the constructor/set by script.
1368         (WebCore::DataCue::setValue): Set m_value.
1369         * html/track/DataCue.h:
1370         * html/track/DataCue.idl:
1371
1372         * html/track/InbandDataTextTrack.cpp:
1373         (WebCore::InbandDataTextTrack::addDataCue): Don't add the same cue more than once.
1374         (WebCore::InbandDataTextTrack::updateDataCue): Update a cue's duration.
1375         (WebCore::InbandDataTextTrack::removeDataCue): Remove an incomplete cue.
1376         (WebCore::InbandDataTextTrack::removeCue): Remove a cue from the incomplete cue map if necessary.
1377         * html/track/InbandDataTextTrack.h:
1378
1379         * html/track/InbandGenericTextTrack.cpp:
1380         (WebCore::InbandGenericTextTrack::addGenericCue): CueMatchRules is now in TextTrackCue instead
1381             of VTTCue.
1382         * html/track/InbandTextTrack.h:
1383
1384         * html/track/InbandWebVTTTextTrack.cpp:
1385         (WebCore::InbandWebVTTTextTrack::newCuesParsed): Ditto.
1386
1387         * html/track/TextTrack.cpp:
1388         (WebCore::TextTrack::hasCue): Ditto.
1389         * html/track/TextTrack.h:
1390
1391         * html/track/TextTrackCue.cpp:
1392         (WebCore::TextTrackCue::isEqual): New, test base class equality.
1393         * html/track/TextTrackCue.h:
1394
1395         * html/track/TextTrackCueGeneric.cpp:
1396         (WebCore::TextTrackCueGeneric::isEqual): Call TextTrackCue::isEqual first.
1397         * html/track/TextTrackCueGeneric.h:
1398
1399         * html/track/VTTCue.cpp:
1400         (WebCore::VTTCue::isEqual): Call TextTrackCue::isEqual first.
1401         * html/track/VTTCue.h:
1402
1403         * platform/SerializedPlatformRepresentation.h: Added.
1404         (WebCore::SerializedPlatformRepresentation::~SerializedPlatformRepresentation):
1405         (WebCore::SerializedPlatformRepresentation::SerializedPlatformRepresentation):
1406
1407         * platform/graphics/InbandTextTrackPrivateClient.h: Add methods for DataCue with SerializedPlatformRepresentation.
1408
1409         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: Added.
1410         (WebCore::InbandMetadataTextTrackPrivateAVF::create):
1411         (WebCore::InbandMetadataTextTrackPrivateAVF::InbandMetadataTextTrackPrivateAVF):
1412         (WebCore::InbandMetadataTextTrackPrivateAVF::~InbandMetadataTextTrackPrivateAVF):
1413         (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue):
1414         (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes):
1415         (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues):
1416         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h: Added.
1417
1418         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1419         (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): currentTrack -> currentTextTrack.
1420         (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Ditto.
1421         (WebCore::MediaPlayerPrivateAVFoundation::configureInbandTracks): Ditto.
1422         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1423         (WebCore::MediaPlayerPrivateAVFoundation::setCurrentTextTrack):
1424         (WebCore::MediaPlayerPrivateAVFoundation::setCurrentTrack): Deleted.
1425
1426         Renamed currentTrack and setCurrentTrack to currentTextTrack and setCurrentTextTrack.
1427         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1428         (WebCore::AVFWrapper::currentTextTrack):
1429         (WebCore::MediaPlayerPrivateAVFoundationCF::setCurrentTextTrack):
1430         (WebCore::MediaPlayerPrivateAVFoundationCF::currentTextTrack):
1431         (WebCore::AVFWrapper::setCurrentTextTrack):
1432         (WebCore::AVFWrapper::AVFWrapper):
1433         (WebCore::AVFWrapper::processCue):
1434         (WebCore::AVFWrapper::currentTrack): Deleted.
1435         (WebCore::MediaPlayerPrivateAVFoundationCF::setCurrentTrack): Deleted.
1436         (WebCore::MediaPlayerPrivateAVFoundationCF::currentTrack): Deleted.
1437         (WebCore::AVFWrapper::setCurrentTrack): Deleted.
1438         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
1439
1440         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1441         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1442         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
1443         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): currentTrack -> currentTextTrack
1444         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): currentTrack -> currentTextTrack.
1445         (WebCore::MediaPlayerPrivateAVFoundationObjC::processMetadataTrack): New.
1446         (WebCore::MediaPlayerPrivateAVFoundationObjC::processCue): m_currentTrack -> m_currentTextTrack.
1447         (WebCore::MediaPlayerPrivateAVFoundationObjC::flushCues): Ditto.
1448         (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack): Renamed from setCurrentTextTrack.
1449         (WebCore::metadataType): Map an AVFoundation metadata key space to a metadata cue type.
1450         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive): Process new metadata.
1451         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
1452         (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Deleted.
1453
1454         Create a JSValue representation from an AVMetadataItem.
1455         * platform/mac/SerializedPlatformRepresentationMac.h: Added.
1456         (WebCore::SerializedPlatformRepresentationMac::platformType):
1457         (WebCore::SerializedPlatformRepresentationMac::nativeValue):
1458         * platform/mac/SerializedPlatformRepresentationMac.mm: Added.
1459         (WebCore::SerializedPlatformRepresentationMac::SerializedPlatformRepresentationMac):
1460         (WebCore::SerializedPlatformRepresentationMac::~SerializedPlatformRepresentationMac):
1461         (WebCore::SerializedPlatformRepresentationMac::create):
1462         (WebCore::SerializedPlatformRepresentationMac::data):
1463         (WebCore::SerializedPlatformRepresentationMac::deserialize):
1464         (WebCore::SerializedPlatformRepresentationMac::isEqual):
1465         (WebCore::toSerializedPlatformRepresentationMac):
1466         (WebCore::jsValueWithValueInContext):
1467         (WebCore::jsValueWithDataInContext):
1468         (WebCore::jsValueWithArrayInContext):
1469         (WebCore::jsValueWithDictionaryInContext):
1470         (WebCore::jsValueWithAVMetadataItemInContext):
1471
1472 2014-04-21  Benjamin Poulain  <benjamin@webkit.org>
1473
1474         Add Element.matches, the standard name for webkitMatchesSelector
1475         https://bugs.webkit.org/show_bug.cgi?id=131922
1476
1477         Reviewed by Andreas Kling.
1478
1479         This patch just renames webkitMatchesSelector() to matches().
1480
1481         * bindings/scripts/CodeGeneratorObjC.pm:
1482         (GenerateImplementation):
1483         The Objective-C binding generator only supported ImplementedAs for getters and setters.
1484         This adds support for the option so that Element.matches can be generated for Obj-C.
1485
1486         * dom/Element.cpp:
1487         (WebCore::Element::matches):
1488         (WebCore::Element::webkitMatchesSelector): Deleted.
1489         * dom/Element.h:
1490         * dom/Element.idl:
1491         * inspector/InspectorCSSAgent.cpp:
1492         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
1493
1494 2014-04-21  Beth Dakin  <bdakin@apple.com>
1495
1496         topContentInset does not play well with fullscreen elements
1497         https://bugs.webkit.org/show_bug.cgi?id=131955
1498         -and corresponding-
1499         <rdar://problem/16651925>
1500
1501         Reviewed by Sam Weinig.
1502
1503         Calling setNeedsLayout() is not sufficient when the topContentInset has changed 
1504         dynamically. We need to perform the layout right away and update the scrollbars. 
1505         This works completely when the inset changes due to entering/exiting fullscreen, 
1506         but I left a FIXME behind because it is possible to change the inset dynamically 
1507         just through the WK2 API and end up in a situation where everything looks right 
1508         except for the scrollbars. 
1509         * page/FrameView.cpp:
1510         (WebCore::FrameView::topContentInsetDidChange):
1511         * page/FrameView.h:
1512         * page/Page.cpp:
1513         (WebCore::Page::setTopContentInset):
1514
1515 2014-04-18  Jon Honeycutt  <jhoneycutt@apple.com>
1516
1517         Empty RenderInline objects should not be line break objects.
1518
1519         https://bugs.webkit.org/show_bug.cgi?id=131861
1520         <rdar://problem/15663617>
1521
1522         Reviewed by David Hyatt.
1523
1524         * rendering/line/BreakingContextInlineHeaders.h:
1525         (WebCore::BreakingContext::canBreakAtThisPosition):
1526         Don't break at this position if this is an empty RenderInline.
1527
1528 2014-04-21  Enrica Casucci  <enrica@apple.com>
1529
1530         [iOS WebKit2] support replacements for misspelled words.
1531         https://bugs.webkit.org/show_bug.cgi?id=131827
1532         <rdar://problem/16319657>
1533
1534         Reviewed by Darin Adler.
1535
1536         Adds utility function to return the character before the current selection
1537         and converts the nbsp to the space character.
1538
1539         * WebCore.exp.in:
1540         * editing/VisibleUnits.cpp:
1541         (WebCore::characterBeforePosition):
1542         * editing/VisibleUnits.h:
1543
1544 2014-04-21  Eric Carlson  <eric.carlson@apple.com>
1545
1546         [iOS] enable plug-in replacement
1547         https://bugs.webkit.org/show_bug.cgi?id=131947
1548
1549         Reviewed by Jer Noble.
1550
1551         * bindings/generic/RuntimeEnabledFeatures.cpp:
1552         (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures): initialize m_isPluginReplacementEnabled
1553             to true on iOS.
1554
1555 2014-04-21  Rik Cabanier  <cabanier@adobe.com>
1556
1557         [CSS Blending] Remove support for non-separable blend modes from mix-blend-mode
1558         https://bugs.webkit.org/show_bug.cgi?id=131824
1559
1560         Reviewed by Dean Jackson.
1561
1562         Removed support for non-separable blend modes from the CSS parser.
1563
1564         Covered by existing tests
1565
1566         * css/CSSParser.cpp:
1567         (WebCore::isValidKeywordPropertyAndValue):
1568         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
1569         (PlatformCAFilters::setBlendingFiltersOnLayer):
1570
1571 2014-04-21  David Hyatt  <hyatt@apple.com>
1572
1573         [New Multicolumn] Column set drawing under horizontal scrollbar.
1574         https://bugs.webkit.org/show_bug.cgi?id=131812.
1575
1576         Reviewed by Sam Weinig.
1577
1578         Added fast/multicol/newmulticol/compare-with-old-impl/LeftToRight-tb.html.
1579
1580         * rendering/RenderBlockFlow.cpp:
1581         (WebCore::RenderBlockFlow::layoutBlock):
1582         (WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
1583         * rendering/RenderBlockFlow.h:
1584         Pass in relayoutChildren as a reference boolean to checkForPaginationLogicalHeightChange.
1585         The new columns need to be able to set it to true if the amount of available column
1586         height ever changes, so that the RenderFlowThread and the sets get a layout call.
1587
1588         * rendering/style/RenderStyle.cpp:
1589         (WebCore::RenderStyle::setColumnStylesFromPaginationMode):
1590         Make sure that the pagination mode is set up with an auto column-fill specified. You
1591         don't ever want to balance when you set a pagination mode on the RenderView.
1592
1593 2014-04-21  Tim Horton  <timothy_horton@apple.com>
1594
1595         [iOS WebKit2] Implement CSS viewport units
1596         https://bugs.webkit.org/show_bug.cgi?id=131863
1597         <rdar://problem/16279088>
1598
1599         Reviewed by Darin Adler.
1600
1601         * WebCore.exp.in:
1602         * page/FrameView.cpp:
1603         (WebCore::FrameView::setViewportSize):
1604         * page/FrameView.h:
1605         (WebCore::FrameView::viewportSize):
1606         Add setViewportSize() and viewportSize().
1607         If the viewport size changes, we have to do style recalc.
1608         If we have an overridden viewport size, use it.
1609
1610         * rendering/RenderView.cpp:
1611         (WebCore::RenderView::viewportSize):
1612         * rendering/RenderView.h:
1613         Get the size from FrameView.
1614
1615 2014-04-21  Joseph Pecoraro  <pecoraro@apple.com>
1616
1617         Remove unused WebKitSystemInterface functions
1618         https://bugs.webkit.org/show_bug.cgi?id=131938
1619
1620         Reviewed by Alexey Proskuryakov.
1621
1622         * WebCore.exp.in:
1623         * platform/ios/WebCoreSystemInterfaceIOS.mm:
1624         * platform/mac/WebCoreSystemInterface.h:
1625         * platform/mac/WebCoreSystemInterface.mm:
1626
1627 2014-04-21  Andreas Kling  <akling@apple.com>
1628
1629         Move the JSString cache from DOMWrapperWorld to VM.
1630         <https://webkit.org/b/131940>
1631
1632         Since there's no need for JSStrings to be world-specific, this patch
1633         moves the string cache to JSC::VM. This makes jsStringWithCache()
1634         a lot faster since it no longer has to jump through twenty-eleven
1635         hoops to find the DOMWrapperWorld.
1636
1637         Reviewed by Geoff Garen.
1638
1639         * bindings/js/DOMWrapperWorld.cpp:
1640         (WebCore::DOMWrapperWorld::clearWrappers):
1641         * bindings/js/DOMWrapperWorld.h:
1642         * bindings/js/JSDOMBinding.cpp:
1643         (WebCore::jsStringWithCache):
1644
1645 2014-04-21  David Hyatt  <hyatt@apple.com>
1646
1647         [New Multicolumn] Column balancing is slow on float-multicol.html
1648         https://bugs.webkit.org/show_bug.cgi?id=131801
1649
1650         Reviewed by Enrica Casucci.
1651
1652         Added fast/multicol/tall-float.html
1653
1654         * rendering/RenderBlock.cpp:
1655         (WebCore::RenderBlock::expandsToEncloseOverhangingFloats):
1656         Make RenderFlowThreads expand to encompass floats. Also from Morten's patch for
1657         Blink (#361551).
1658
1659         * rendering/RenderBlockFlow.cpp:
1660         (WebCore::RenderBlockFlow::computeOverflow):
1661         Fix a bug where the new multi-column code was adding in overflow for floats
1662         when it should not. This was resulting in the creation of scrollbars when none
1663         should exist. This is my own addition.
1664
1665         (WebCore::RenderBlockFlow::addOverhangingFloats):
1666         Make RenderFlowThreads and RenderRegions ignore overhanging float additions. This
1667         comes from Morten's patch for Blink (#361551).
1668
1669 2014-04-21  Darin Adler  <darin@apple.com>
1670
1671         REGRESSION (r160908): Safari doesn't draw rotated images properly first time
1672         https://bugs.webkit.org/show_bug.cgi?id=131930
1673
1674         Reviewed by Anders Carlsson.
1675
1676         With render tree creation sufficiently lazy, we had to put some explicit
1677         calls to updateStyleIfNeeded into the ImageDocument class.
1678
1679         * dom/DOMImplementation.cpp:
1680         (WebCore::DOMImplementation::createDocument): Pass a Frame&.
1681
1682         * html/ImageDocument.cpp:
1683         (WebCore::ImageDocument::imageSize): Added this helper function. This updates
1684         style so we can use the renderer to compute an image size taking things like
1685         orientation into account, and also passes in the zoom factor.
1686         (WebCore::ImageDocument::updateDuringParsing): Moved the body of the
1687         ImageDocumentParser::appendBytes function into this function. Since it's a
1688         member of ImageDocument, it has better access to appropriate private members,
1689         and we don't have to expose as many functions to the public. Also changed to
1690         not use the frame so much. Also merged in the code that creates the document
1691         instead of having it be a side effect in the cachedImage helper function; all
1692         the other call sites were checking for null before calling cachedImage.
1693         (WebCore::ImageDocument::finishedParsing): Moved the body of the
1694         ImageDocumentParser::finish function here. Added a call to updateStyleIfNeeded
1695         before using the renderer to get the image size.
1696         (WebCore::ImageDocumentParser::document): Made this return a reference. It's
1697         just a convenience function used in the two functions below.
1698         (WebCore::ImageDocumentParser::appendBytes): Just call updateDuringParsing.
1699         (WebCore::ImageDocumentParser::finish): Just call finishedParsing.
1700         (WebCore::ImageDocument::ImageDocument): Take a reference for the argument,
1701         use nullptr, and also initialize m_shouldShrinkImage directly instead of using
1702         a shouldShrinkToFit() helper function to do it.
1703         (WebCore::ImageDocument::createDocumentStructure): Removed unneeded check of
1704         null for the frame, since the caller does it. Removed some unneeded
1705         IGNORE_EXCEPTON and a stray semicolon. Use m_shouldShrinkImage instead of
1706         calling shouldShrinkToFit since at this early point they will be identical.
1707         (WebCore::ImageDocument::scale): Make non-const so we can call the new
1708         imageSize helper. Use Document::view instead of Frame::view. Improved the
1709         conversion to floating point so it doesn't involve a static_cast and an extra
1710         conversion from int to LayoutUnit.
1711         (WebCore::ImageDocument::resizeImageToFit): Ditto.
1712         (WebCore::ImageDocument::imageClicked): Ditto.
1713         (WebCore::ImageDocument::imageUpdated): Ditto. Also use m_shouldShrinkImage
1714         ibnstead of shouldShrinkToFit.
1715         (WebCore::ImageDocument::restoreImageSize): Ditto.
1716         (WebCore::ImageDocument::imageFitsInWindow): Ditto.
1717         (WebCore::ImageDocument::windowSizeChanged): Ditto.
1718         (WebCore::ImageDocument::cachedImage): Deleted. Moved logic into updateDuringParsing.
1719         (WebCore::ImageDocument::shouldShrinkToFit): Deleted. Moved logic into constructor.
1720         (WebCore::ImageEventListener::handleEvent): Updated for changes above.
1721         (WebCore::ImageEventListener::operator==): Simplified. No reason this has to check
1722         whether both listeners are in the same document.
1723         (WebCore::ImageDocumentElement::didMoveToNewDocument): Use nullptr.
1724
1725         * html/ImageDocument.h: Deleted some unused things, updated for changes above,
1726         and made some memer functions private.
1727
1728         * loader/FrameLoaderClient.h: Deleted the allowScriptFromSource, allowPlugins,
1729         allowImage, and allowDisplayingInsecureContent functions. These were only used in
1730         Chromium and are now unneeded complexity. We could bring them back if anyone wants them.
1731
1732         * loader/MixedContentChecker.cpp:
1733         (WebCore::MixedContentChecker::canDisplayInsecureContent): Removed call to
1734         allowDisplayingInsecureContent, just use the setting directly.
1735         (WebCore::MixedContentChecker::canRunInsecureContent): Removed call to
1736         allowRunningInsecureContent, just use the setting directly.
1737
1738         * loader/SubframeLoader.cpp:
1739         (WebCore::SubframeLoader::allowPlugins): Removed call to allowPlugins, just
1740         use the arePluginsEnabled setting directly.
1741
1742         * loader/cache/CachedResourceLoader.cpp:
1743         (WebCore::CachedResourceLoader::canRequest): Removed call to allowScriptFromSource, just
1744         use the isScriptEnabled setting directly.
1745         (WebCore::CachedResourceLoader::clientDefersImage): Removed call to allowImage.
1746
1747 2014-04-21  David Hyatt  <hyatt@apple.com>
1748
1749         [New Multicolumn] Pagination mode messed up with non-inline axis and reversed direction.
1750         https://bugs.webkit.org/show_bug.cgi?id=131811
1751
1752         Reviewed by Dean Jackson.
1753
1754         Added fast/multicol/newmulticol/compare-with-old-impl/BottomToTop-tb.html
1755         
1756         With block axis pagination mode, it is possible to set a column height that is not the same
1757         as the available fill height for a block. The new multi-column code had the assumption that
1758         the column height was the same as the amount of fill room you had available. This is not
1759         the case.
1760         
1761         To correct the issue, I added a member variable to RenderMultiColumnSet that stores the
1762         available column height as a separate variable from the computed column height. This allows
1763         the pagination API to specify a different column height that is not the same as the view's
1764         content height.
1765
1766         Even though it isn't involved in the solution, I also patched pageOrViewLogicalHeight on
1767         RenderView to work with the new column code as well.
1768
1769         To address the layout test failures (that caused the previous rollout), I made sure to
1770         initialize m_availableHeight to 0 when m_computedColumnHeight also gets reset to 0.
1771         
1772         The assertion is not something I could reproduce on any machine, but I can see the problem.
1773         I patched Page's pageCount method to not have column code directly in Page.cpp, 
1774         and to make a new pageCount() method on RenderView that Page calls
1775         into. This method is now patched to handle the new column code as well as the old. I have
1776         no real way of testing this method though, since I can't reproduce the assertion that the
1777         bots were experiencing.
1778
1779         * page/Page.cpp:
1780         (WebCore::Page::pageCount):
1781         * rendering/RenderMultiColumnSet.cpp:
1782         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
1783         (WebCore::RenderMultiColumnSet::setAndConstrainColumnHeight):
1784         (WebCore::RenderMultiColumnSet::prepareForLayout):
1785         (WebCore::RenderMultiColumnSet::computeLogicalHeight):
1786         * rendering/RenderMultiColumnSet.h:
1787         * rendering/RenderView.cpp:
1788         (WebCore::RenderView::pageOrViewLogicalHeight):
1789         (WebCore::RenderView::pageCount):
1790         * rendering/RenderView.h:
1791
1792 2014-04-18  Dean Jackson  <dino@apple.com>
1793
1794         [Media] Clean up localized strings in controls
1795         https://bugs.webkit.org/show_bug.cgi?id=131857
1796         <rdar://problem/16663005>
1797
1798         Reviewed by Eric Carlson.
1799
1800         There is no need for separate localization files
1801         on OS X and iOS. Move the small number of iOS-specific
1802         localizations into a shared file.
1803
1804         We also don't need a function to return a static table.
1805         Ultimately I think we want a top-level WebKit object that
1806         hold the table, but for now use a global variable
1807         called UIStringTable. Since we're in an isolated world, we
1808         won't clash with anything.
1809
1810         I noticed a few cases were we grab a localized string and
1811         then instantly run a replacement on it. This should be
1812         supported directly in the UIString() accessor.
1813
1814         * English.lproj/mediaControlsLocalizedStrings.js: Add iOS strings. Just
1815         use a static table.
1816         (mediaControlsLocalizedStrings): Deleted.
1817         * English.lproj/mediaControlsLocalizedStringsiOS.js: Removed.
1818         * Modules/mediacontrols/mediaControlsApple.js:
1819         (Controller.prototype.extend): Fix braces.
1820         (Controller.prototype.UIString): Use the string table, and allow replacement.
1821         (Controller.prototype.createControls): Use new UIString replacement.
1822         * Modules/mediacontrols/mediaControlsiOS.js:
1823         (ControllerIOS.prototype.updateWirelessPlaybackStatus): Use new UIString.
1824         (ControllerIOS.prototype.UIString): Deleted. Use the parent class version.
1825         * WebCore.xcodeproj/project.pbxproj: Remove file from Resources.
1826         * rendering/RenderThemeIOS.mm:
1827         (WebCore::RenderThemeIOS::mediaControlsScript): No need to include the iOS
1828         specific localization file.
1829
1830 2014-04-21  Brent Fulgham  <bfulgham@apple.com>
1831
1832         [Win] Unreviewed build fix.
1833
1834         * inspector/TimelineRecordFactory.cpp: Add missing include.
1835
1836 2014-04-21  Zan Dobersek  <zdobersek@igalia.com>
1837
1838         Move cross-port Source/WebCore/page/ code to std::unique_ptr
1839         https://bugs.webkit.org/show_bug.cgi?id=130534
1840
1841         Reviewed by Darin Adler.
1842
1843         Replace uses of OwnPtr and PassOwnPtr in cross-port code under Source/WebCore/page/ with
1844         std::unique_ptr. Unnecessary OwnPtr.h and PassOwnPtr.h header inclusions are removed as well.
1845
1846         * dom/Document.cpp:
1847         (WebCore::Document::initSecurityContext):
1848         * dom/SecurityContext.cpp:
1849         (WebCore::SecurityContext::setContentSecurityPolicy):
1850         * dom/SecurityContext.h:
1851         * page/CaptionUserPreferences.h:
1852         * page/ContentSecurityPolicy.cpp:
1853         (WebCore::CSPDirectiveList::create):
1854         (WebCore::CSPDirectiveList::checkEvalAndReportViolation):
1855         (WebCore::CSPDirectiveList::checkInlineAndReportViolation):
1856         (WebCore::CSPDirectiveList::checkSourceAndReportViolation):
1857         (WebCore::CSPDirectiveList::setCSPDirective):
1858         (WebCore::ContentSecurityPolicy::didReceiveHeader):
1859         * page/ContentSecurityPolicy.h:
1860         * page/DOMSecurityPolicy.h:
1861         * page/DOMWindow.cpp:
1862         (WebCore::PostMessageTimer::fired):
1863         (WebCore::DOMWindow::postMessageTimerFired):
1864         * page/DOMWindow.h:
1865         * page/EventHandler.cpp:
1866         (WebCore::EventHandler::EventHandler):
1867         * page/EventHandler.h:
1868         * page/Frame.cpp:
1869         (WebCore::Frame::Frame):
1870         (WebCore::createRegExpForLabels):
1871         (WebCore::Frame::searchForLabelsAboveCell):
1872         (WebCore::Frame::searchForLabelsBeforeElement):
1873         (WebCore::matchLabelsAgainstString):
1874         (WebCore::Frame::setTiledBackingStoreEnabled):
1875         * page/Frame.h:
1876         * page/FrameView.cpp:
1877         (WebCore::FrameView::addEmbeddedObjectToUpdate):
1878         (WebCore::FrameView::addSlowRepaintObject):
1879         (WebCore::FrameView::addViewportConstrainedObject):
1880         (WebCore::FrameView::addScrollableArea):
1881         * page/FrameView.h:
1882         * page/Page.cpp:
1883         (WebCore::Page::Page):
1884         * page/Page.h:
1885         * page/PageConsole.h:
1886         * page/PageThrottler.h:
1887         * page/SecurityPolicy.cpp:
1888         (WebCore::SecurityPolicy::addOriginAccessWhitelistEntry):
1889         * page/animation/AnimationController.h:
1890         * page/animation/CSSPropertyAnimation.cpp:
1891         (WebCore::PropertyWrapperVisitedAffectedColor::PropertyWrapperVisitedAffectedColor):
1892         (WebCore::CSSPropertyAnimationWrapperMap::instance):
1893         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
1894         * page/mac/PageMac.cpp:
1895         (WebCore::Page::addSchedulePair):
1896         * workers/WorkerGlobalScope.cpp:
1897         (WebCore::WorkerGlobalScope::applyContentSecurityPolicyFromString):
1898
1899 2014-04-21  Darin Adler  <darin@apple.com>
1900
1901         Add HashSet::takeAny
1902         https://bugs.webkit.org/show_bug.cgi?id=131928
1903
1904         Reviewed by Benjamin Poulain.
1905
1906         * dom/Document.cpp:
1907         (WebCore::Document::takeAnyMediaCanStartListener): Use HashSet::takeAny.
1908         * dom/ScriptExecutionContext.cpp:
1909         (WebCore::takeAny): Deleted.
1910         (WebCore::ScriptExecutionContext::~ScriptExecutionContext): Use HashSet::takeAny.
1911
1912 2014-04-21  Zan Dobersek  <zdobersek@igalia.com>
1913
1914         iOS and non-iOS RemoteCommandListener::create() functions should use std::make_unique<>()
1915         https://bugs.webkit.org/show_bug.cgi?id=131916
1916
1917         Reviewed by Darin Adler.
1918
1919         A follow-up to r167197. Make RemoteCommandListener ctor public and use std::make_unique<>()
1920         in both versions of RemoteCommandListener::create() functions (iOS and non-iOS).
1921
1922         * platform/RemoteCommandListener.cpp:
1923         (WebCore::RemoteCommandListener::create):
1924         * platform/RemoteCommandListener.h:
1925         (WebCore::RemoteCommandListener::RemoteCommandListener):
1926         * platform/ios/RemoteCommandListenerIOS.mm:
1927         (WebCore::RemoteCommandListener::create):
1928
1929 2014-04-21  Andreas Kling  <akling@apple.com>
1930
1931         Micro-optimize the way we hand NodeLists to JSC.
1932         <https://webkit.org/b/131932>
1933
1934         Use HashMap::fastAdd() when returning cached node lists and collections.
1935         10.9% progression on Bindings/get-elements-by-tag-name.html
1936
1937         Reviewed by Antti Koivisto.
1938
1939         * dom/NodeRareData.h:
1940         (WebCore::NodeListsNodeData::addCacheWithAtomicName):
1941         (WebCore::NodeListsNodeData::addCacheWithName):
1942         (WebCore::NodeListsNodeData::addCacheWithQualifiedName):
1943         (WebCore::NodeListsNodeData::addCachedCollection):
1944
1945 2014-04-21  Commit Queue  <commit-queue@webkit.org>
1946
1947         Unreviewed, rolling out r167584.
1948         https://bugs.webkit.org/show_bug.cgi?id=131929
1949
1950         Broke Objective-C bindings test (Requested by ap on #webkit).
1951
1952         Reverted changeset:
1953
1954         "Add Element.matches, the standard name for
1955         webkitMatchesSelector"
1956         https://bugs.webkit.org/show_bug.cgi?id=131922
1957         http://trac.webkit.org/changeset/167584
1958
1959 2014-04-20  Benjamin Poulain  <benjamin@webkit.org>
1960
1961         Compile the :root pseudo class and fix a related issue with :nth-child()
1962         https://bugs.webkit.org/show_bug.cgi?id=131926
1963
1964         Reviewed by Andreas Kling.
1965
1966         Add the :root pseudo class. This is another trivial selector, we just need to compare
1967         the element pointer with the documentElement.
1968
1969         I discovered some issues with :nth-child(n) through the layout tests for ":root".
1970         When the pseudo class nth-child could match anything, no code was generated. That decision
1971         was taken when generating the fragments.
1972
1973         The specification of :nth-child() has two tests: the parent test and the counter test.
1974         Since some fragments would not generate any code for :nth-child(n), they would succeed on the root,
1975         which is incorrect since the root should fail the parent test.
1976
1977         This was fixed by moving the filtering of non-counting :nth-child() after we generate the parent
1978         check.
1979         We still don't generate any counter test unless required.
1980
1981         Test: fast/selectors/nth-child-on-root.html
1982
1983         * cssjit/SelectorCompiler.cpp:
1984         (WebCore::SelectorCompiler::addPseudoClassType):
1985         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
1986         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
1987         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsRoot):
1988         * dom/Document.h:
1989         (WebCore::Document::documentElementMemoryOffset):
1990
1991 2014-04-20  Benjamin Poulain  <benjamin@webkit.org>
1992
1993         Add Element.matches, the standard name for webkitMatchesSelector
1994         https://bugs.webkit.org/show_bug.cgi?id=131922
1995
1996         Reviewed by Andreas Kling.
1997
1998         This patch just renames webkitMatchesSelector() to matches().
1999
2000         * bindings/scripts/CodeGeneratorObjC.pm:
2001         (GenerateImplementation):
2002         The Objective-C binding generator only supported ImplementedAs for getters and setters.
2003         This adds support for the option so that Element.matches can be generated for Obj-C.
2004
2005         * dom/Element.cpp:
2006         (WebCore::Element::matches):
2007         (WebCore::Element::webkitMatchesSelector): Deleted.
2008         * dom/Element.h:
2009         * dom/Element.idl:
2010         * inspector/InspectorCSSAgent.cpp:
2011         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
2012
2013 2014-04-20  Zalan Bujtas  <zalan@apple.com>
2014
2015         Subpixel rendering: RenderLayer's size is set using enclosingRect() which can result in cruft.
2016         https://bugs.webkit.org/show_bug.cgi?id=131468
2017
2018         Reviewed by Darin Adler.
2019
2020         Layers marked opaque may not paint edge pixels, when RenderLayer bounds are non-integral and
2021         get device pixel snapped.
2022         For details see this: https://trac.webkit.org/r159463
2023
2024         Test: compositing/hidpi-non-simple-compositing-layer-with-fractional-size-and-background.html
2025
2026         * rendering/RenderLayerBacking.cpp:
2027         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2028
2029 2014-04-19  Darin Adler  <darin@apple.com>
2030
2031         Simple layout can get confused by coordinate overflow
2032         https://bugs.webkit.org/show_bug.cgi?id=131890
2033         rdar://problem/15558510
2034
2035         Reviewed by Andreas Kling.
2036
2037         Test: fast/css/simple-layout-overflow.html
2038
2039         * rendering/SimpleLineLayoutResolver.h:
2040         (WebCore::SimpleLineLayout::RunResolver::rangeForRect):
2041         If lastLine is smaller than firstLine, just ignore it.
2042
2043 2014-04-20  Darin Adler  <darin@apple.com>
2044
2045         ScriptExecutionContext::stopActiveDOMObjects iterates a hash map that can change during iteration (for multiple reasons, including GC)
2046         https://bugs.webkit.org/show_bug.cgi?id=52719
2047
2048         Reviewed by Alexey Proskuryakov.
2049
2050         At least two specific ways this can happen:
2051
2052         1) XMLHttpRequest::stop can trigger a JavaScript garbage collection.
2053         2) NotificationCenter::stop can delete the last references to notifications;
2054            those notifications are also active DOM objects.
2055
2056         Besides fixing the iteration in that function, did some other fixes for the
2057         ScriptExecutionContext class, including some coding style changes. Many uses
2058         of nullptr instead of 0, without listing each function separately below.
2059
2060         * Modules/webdatabase/DatabaseContext.cpp:
2061         (WebCore::DatabaseContext::contextDestroyed): Call through to the base class
2062         version of contextDestroyed rather than repeating what it does (with a large
2063         comment that doesn't acknowledge the base class alread does it).
2064         * Modules/webdatabase/DatabaseContext.h: Removed some unneeded includes.
2065         Wrote out "private" explicitly for deriving from ActiveDOMObject. Made the
2066         ActiveDOMObject function overrides private, and marked them override and final.
2067
2068         * dom/ActiveDOMObject.h: Updated comments. Replaced suspendIfNeededCalled with
2069         assertSuspendIfNeededWasCalled, which has an empty inline version in the header.
2070         Renamed m_suspendIfNeededCalled to m_suspendIfNeededWasCalled.
2071
2072         * dom/ActiveDOMObject.cpp:
2073         (WebCore::ActiveDOMObject::ActiveDOMObject): Pass a reference instead of a pointer.
2074         (WebCore::ActiveDOMObject::~ActiveDOMObject): Ditto.
2075         (WebCore::ActiveDOMObject::suspendIfNeeded): Ditto.
2076
2077         * dom/ContextDestructionObserver.cpp:
2078         (WebCore::ContextDestructionObserver::observeContext): Pass a reference instead of a pointer.
2079
2080         * dom/MessagePort.cpp:
2081         (WebCore::MessagePort::MessagePort): Pass a reference instead of a pointer.
2082         (WebCore::MessagePort::~MessagePort): Ditto.
2083         (WebCore::MessagePort::disentangle): Ditto.
2084
2085         * dom/ScriptExecutionContext.cpp:
2086         (WebCore::ScriptExecutionContext::ScriptExecutionContext): Updated flags used
2087         for assertions so they are conditional and updated their names.
2088         (WebCore::takeAny): Added. Helper function that we can consider for HashSet in
2089         the future; makes loop below easier to read.
2090         (WebCore::checkConsistency): Added. Assertions that were done multiple places below,
2091         and should not be written over and over again.
2092         (WebCore::ScriptExecutionContext::~ScriptExecutionContext): Changed to use C++11
2093         for loops and the takeAny function above.
2094         (WebCore::ScriptExecutionContext::dispatchMessagePortEvents): Ditto.
2095         (WebCore::ScriptExecutionContext::createdMessagePort): Changed to take a reference
2096         for clarity and so it doesn't have to do an assert the pointer is non-null.
2097         (WebCore::ScriptExecutionContext::destroyedMessagePort): Ditto.
2098         (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjects): Changed to use
2099         C++11 for loop and reworded comment and redid assertions.
2100         (WebCore::ScriptExecutionContext::suspendActiveDOMObjects): Ditto.
2101         (WebCore::ScriptExecutionContext::resumeActiveDOMObjects): Ditto.
2102         (WebCore::ScriptExecutionContext::stopActiveDOMObjects): Changed to support
2103         removal of an active DOM object during the stop function. Included new comments
2104         to clarify what the rules are.
2105         (WebCore::ScriptExecutionContext::suspendActiveDOMObjectIfNeeded): Changed to take
2106         a reference for clarity and so it doesn't have to assert a pointer is non-null.
2107         (WebCore::ScriptExecutionContext::didCreateActiveDOMObject): Ditto. Also changed to
2108         use RELEASE_ASSERT instead of CRASH.
2109         (WebCore::ScriptExecutionContext::willDestroyActiveDOMObject): Ditto.
2110         (WebCore::ScriptExecutionContext::didCreateDestructionObserver): Ditto.
2111         (WebCore::ScriptExecutionContext::willDestroyDestructionObserver): Ditto.
2112         (WebCore::ScriptExecutionContext::closeMessagePorts): Moved the body of this
2113         function into its one call site, ScriptExecutionContext::stopActiveDOMObjects,
2114         since it's simple enough when written as a C++11 for loop.
2115         (WebCore::ScriptExecutionContext::hasPendingActivity): Added. This function was
2116         already exported for workers, and implementing it outside this class required
2117         exposing the private HashSet members; more sensible to implement it here and
2118         simply make it public in WorkerGlobalScope.
2119
2120         * dom/ScriptExecutionContext.h: Removed unnecessary includes and forward declarations.
2121         Removed a long-ago-fixed FIXME. Changed various functions to take references instead of
2122         pointers. Added a protected hasPendingActivity function, deleted the closeMessagePorts
2123         function, deleted the ActiveDOMObjectsSet typedef, made the assertion flags be
2124         !ASSERT_DISABLED only, and deleted the messagePorts and activeDOMObjects functions.
2125
2126         * workers/WorkerGlobalScope.cpp:
2127         (WebCore::WorkerGlobalScope::hasPendingActivity): Deleted. This is now implemented
2128         in the base class.
2129
2130         * workers/WorkerGlobalScope.h: Make hasPendingActivity function from the base class
2131         public instead of declaring it in this class.
2132
2133 2014-04-20  Brent Fulgham  <bfulgham@apple.com>
2134
2135         [Mac] Unable to select 'Off' or 'Auto' from track menu when tracks consist of unsupported track types
2136         https://bugs.webkit.org/show_bug.cgi?id=131908
2137         <rdar://problem/15999882>
2138
2139         Reviewed by Eric Carlson.
2140
2141         * html/HTMLMediaElement.cpp:
2142         (WebCore::HTMLMediaElement::setSelectedTextTrack): When the user selects 'Off', make sure the currently 'showing'
2143         track is switched to 'disabled'.
2144
2145 2014-04-20  Andreas Kling  <akling@apple.com>
2146
2147         Speed up jsStringWithCache() through WeakGCMap inlining.
2148         <https://webkit.org/b/131923>
2149
2150         Inline the common path of WeakGCMap::add() in jsStringWithCache().
2151         26% progression on Bindings/id-getter.html
2152
2153         Reviewed by Darin Adler.
2154
2155         * WebCore.exp.in:
2156         * bindings/js/JSDOMBinding.h:
2157         * bindings/js/JSDOMBinding.cpp:
2158         (WebCore::jsStringWithCache):
2159
2160             Move jsStringWithCache() out of line since we're now blowing up
2161             its size quite a bit.
2162
2163 2014-04-20  Benjamin Poulain  <benjamin@webkit.org>
2164
2165         Fix the build after r167574
2166
2167         * cssjit/SelectorCompiler.cpp:
2168         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
2169
2170 2014-04-20  Benjamin Poulain  <benjamin@webkit.org>
2171
2172         Compile the pseudo class :target
2173         https://bugs.webkit.org/show_bug.cgi?id=131904
2174
2175         Reviewed by Andreas Kling.
2176
2177         The pseudo class :target is trivial, it just compare the current element with
2178         Document::cssTarget().
2179
2180         * cssjit/SelectorCompiler.cpp:
2181         (WebCore::SelectorCompiler::addPseudoType):
2182         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
2183         (WebCore::SelectorCompiler::getDocument):
2184         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
2185         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsTarget):
2186         * dom/Document.h:
2187         (WebCore::Document::cssTargetMemoryOffset):
2188
2189 2014-04-20  Benjamin Poulain  <benjamin@webkit.org>
2190
2191         Rename the CSSSelector PseudoType to PseudoClassType
2192         https://bugs.webkit.org/show_bug.cgi?id=131907
2193
2194         Reviewed by Andreas Kling.
2195
2196         Pseudo Elements and Page Pseudo Classes have been moved out of PseudoType in previous patches.
2197         The remaining values in the PseudoType enumeration are the pseudo classes.
2198
2199         This patch is the final clean up, PseudoType is renamed to PseudoClassType.
2200
2201         * css/CSSGrammar.y.in:
2202         * css/CSSParserValues.cpp:
2203         (WebCore::CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector):
2204         * css/CSSParserValues.h:
2205         (WebCore::CSSParserSelector::pseudoClassType):
2206         (WebCore::CSSParserSelector::pseudoType): Deleted.
2207         * css/CSSSelector.cpp:
2208         (WebCore::CSSSelector::specificityForOneSelector):
2209         (WebCore::appendPseudoClassFunctionTail):
2210         (WebCore::CSSSelector::selectorText):
2211         * css/CSSSelector.h:
2212         (WebCore::CSSSelector::pseudoClassType):
2213         (WebCore::CSSSelector::pseudoElementType):
2214         (WebCore::CSSSelector::pagePseudoClassType):
2215         (WebCore::pseudoClassIsRelativeToSiblings):
2216         (WebCore::CSSSelector::isSiblingSelector):
2217         (WebCore::CSSSelector::CSSSelector):
2218         (WebCore::CSSSelector::pseudoType): Deleted.
2219         * css/RuleSet.cpp:
2220         (WebCore::RuleSet::findBestRuleSetAndAdd):
2221         * css/SelectorChecker.cpp:
2222         (WebCore::SelectorChecker::checkOne):
2223         (WebCore::SelectorChecker::checkScrollbarPseudoClass):
2224         (WebCore::SelectorChecker::determineLinkMatchType):
2225         (WebCore::SelectorChecker::matchesFocusPseudoClass):
2226         * css/SelectorChecker.h:
2227         (WebCore::SelectorChecker::isCommonPseudoClassSelector):
2228         * css/SelectorCheckerFastPath.cpp:
2229         (WebCore::SelectorCheckerFastPath::commonPseudoClassSelectorMatches):
2230         * css/SelectorPseudoClassAndCompatibilityElementMap.in:
2231         * css/SelectorPseudoTypeMap.h:
2232         * css/StyleResolver.cpp:
2233         (WebCore::StyleResolver::styleForElement):
2234         * css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
2235         (enumerablePseudoType):
2236         * cssjit/SelectorCompiler.cpp:
2237         (WebCore::SelectorCompiler::addPseudoClassType):
2238         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
2239         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
2240         (WebCore::SelectorCompiler::addPseudoType): Deleted.
2241         * inspector/InspectorCSSAgent.cpp:
2242         (WebCore::computePseudoClassMask):
2243         (WebCore::InspectorCSSAgent::forcePseudoState):
2244         * inspector/InspectorCSSAgent.h:
2245         * inspector/InspectorInstrumentation.cpp:
2246         (WebCore::InspectorInstrumentation::forcePseudoStateImpl):
2247         * inspector/InspectorInstrumentation.h:
2248         (WebCore::InspectorInstrumentation::forcePseudoState):
2249
2250 2014-04-19  Alexey Proskuryakov  <ap@apple.com>
2251
2252         Crashes in HTMLFormElement::submit.
2253         https://bugs.webkit.org/show_bug.cgi?id=131910
2254         <rdar://problem/15661790>
2255
2256         Based on a patch by Kent Tamura.
2257
2258         Reviewed by Anders Carlsson.
2259
2260         Tests: fast/forms/form-submission-crash-2.html
2261                fast/forms/form-submission-crash.html
2262
2263         Code that executes arbitrary JS needs to protect objects that it uses afterwards.
2264
2265         * html/HTMLFormElement.cpp:
2266         (WebCore::HTMLFormElement::prepareForSubmission):
2267         (WebCore::HTMLFormElement::submit):
2268         * loader/FrameLoader.cpp:
2269         (WebCore::FrameLoader::submitForm):
2270
2271 2014-04-20  Antti Koivisto  <antti@apple.com>
2272
2273         Text bounding box computation for simple line layout is wrong
2274         https://bugs.webkit.org/show_bug.cgi?id=131912
2275
2276         Reviewed by Andreas Kling.
2277
2278         Top-left is currently the first line top-left which is not always correct.
2279
2280         * WebCore.exp.in:
2281         * rendering/RenderText.cpp:
2282         (WebCore::RenderText::firstRunLocation):
2283         (WebCore::RenderText::firstRunOrigin): Deleted.
2284         (WebCore::RenderText::firstRunX): Deleted.
2285         (WebCore::RenderText::firstRunY): Deleted.
2286         
2287             Keep just one accessor and rename it.
2288             Encapsulate the line box and simple line versions.
2289
2290         * rendering/RenderText.h:
2291         * rendering/RenderTextLineBoxes.cpp:
2292         (WebCore::RenderTextLineBoxes::firstRunLocation):
2293
2294             Line box version.
2295
2296         * rendering/RenderTextLineBoxes.h:
2297         * rendering/RenderTreeAsText.cpp:
2298         
2299             Simplify RenderText dumping.
2300
2301         (WebCore::RenderTreeAsText::writeRenderObject):
2302         * rendering/SimpleLineLayoutFunctions.cpp:
2303         (WebCore::SimpleLineLayout::computeTextBoundingBox):
2304         
2305             Return the correct x position.
2306
2307         (WebCore::SimpleLineLayout::computeTextFirstRunLocation):
2308         
2309             Simple line version.
2310
2311         * rendering/SimpleLineLayoutFunctions.h:
2312         * rendering/svg/SVGRenderTreeAsText.cpp:
2313         (WebCore::writeSVGInlineText):
2314
2315 2014-04-19  Zalan Bujtas  <zalan@apple.com>
2316
2317         Subpixel rendering: RenderLayer's clipping should snap to device pixel boundaries.
2318         https://bugs.webkit.org/show_bug.cgi?id=131466
2319
2320         Reviewed by Simon Fraser.
2321
2322         Fractional pixel clipping can produce cruft on RenderLayers. Since RenderLayer
2323         sizing and painting are snapped, painting clip rect needs to be snapped the same way.
2324
2325         Test: fast/clip/clip-when-rect-has-fractional-pixel-value.html
2326
2327         * rendering/RenderLayer.cpp:
2328         (WebCore::RenderLayer::clipToRect):
2329
2330 2014-04-19  Brent Fulgham  <bfulgham@apple.com>
2331
2332         Latched scrolling may interact badly with custom programmatic scrolling
2333         https://bugs.webkit.org/show_bug.cgi?id=131869
2334         <rdar://problem/16249557>
2335
2336         Reviewed by Darin Adler.
2337
2338         * dom/Element.cpp:
2339         (WebCore::Element::setScrollLeft): Mark scrollable area as having
2340         been scrolled programmatically.
2341         (WebCore::Element::setScrollTop): Ditto.
2342         * page/EventHandler.cpp:
2343         (WebCore::EventHandler::handleWheelEvent): Check for programmatic scroll, and
2344         clear latched state if the handler manually scrolled. Clear programmatic
2345         scroll state at the end of event handling.
2346         (WebCore::EventHandler::clearLatchedState): Refactored code.
2347         * page/EventHandler.h:
2348         * page/mac/EventHandlerMac.mm:
2349         (WebCore::EventHandler::platformPrepareForWheelEvents): Check
2350         if scrollable area was scrolled programmatically. If it was, do
2351         not honor latching behavior.
2352         * platform/ScrollableArea.cpp:
2353         (WebCore::ScrollableArea::ScrollableArea): Initialize new member.
2354         * platform/ScrollableArea.h:
2355         (WebCore::ScrollableArea::isScrolledProgrammatically): Added.
2356         (WebCore::ScrollableArea::setScrolledProgrammatically): Added.
2357
2358 2014-04-19  Chris Fleizach  <cfleizach@apple.com>
2359
2360         AX: grid rows are not recognized do to lack of explicit role="row", role="gridcell"
2361         https://bugs.webkit.org/show_bug.cgi?id=131819
2362
2363         Reviewed by Darin Adler.
2364
2365         Test: accessibility/table-with-missing-aria-role-rows.html
2366
2367         If a table is using role="grid", and it has <tr> elements that do not have
2368         role="row", we should still treat them as row elements.
2369
2370         * accessibility/AccessibilityARIAGrid.cpp:
2371         (WebCore::AccessibilityARIAGrid::addTableCellChild):
2372
2373 2014-04-19  Chris Fleizach  <cfleizach@apple.com>
2374
2375         AX: Malformed tables exposing incorrect col and colSpans
2376         https://bugs.webkit.org/show_bug.cgi?id=131796
2377
2378         Reviewed by Darin Adler.
2379
2380         Test: accessibility/table-incorrect-colspan-cell.html
2381
2382         When a developer has specified malformed colspans, accessibility is reporting those values instead of the effective column information.
2383
2384         * accessibility/AccessibilityTableCell.cpp:
2385         (WebCore::AccessibilityTableCell::columnIndexRange):
2386
2387 2014-04-19  Benjamin Poulain  <bpoulain@apple.com>
2388
2389         Make the CSS JIT compile for ARM64
2390         https://bugs.webkit.org/show_bug.cgi?id=131834
2391
2392         Reviewed by Gavin Barraclough.
2393
2394         Add the CPU specific code required to compile SelectorCompiler on ARM64.
2395         The code is absolutely non-functional, it would crash immediately, but it compiles.
2396
2397         * cssjit/FunctionCall.h:
2398         (WebCore::FunctionCall::FunctionCall):
2399         (WebCore::FunctionCall::callAndBranchOnCondition):
2400         * cssjit/RegisterAllocator.h:
2401         What am I supposed to do with all those registers? There are so many of them :)
2402         The array calleeSavedRegisters is defined for compatibility but it cannot be reached at the moment.
2403
2404         (WebCore::RegisterAllocator::isValidRegister):
2405         * cssjit/SelectorCompiler.cpp:
2406         (WebCore::SelectorCompiler::SelectorCodeGenerator::modulo):
2407         Implement modulo by doing dividend - (divisor * int(dividend/divisor)).
2408
2409         * cssjit/StackAllocator.h:
2410         StackAllocator will need a small redesign to handle the 16 bytes alligned stack of
2411         ARM64.
2412         The code has been modified to build but it is pretty useless.
2413
2414         (WebCore::StackAllocator::allocateUninitialized):
2415         (WebCore::StackAllocator::push):
2416         (WebCore::StackAllocator::pop):
2417         (WebCore::StackAllocator::popAndDiscard):
2418         (WebCore::StackAllocator::popAndDiscardUpTo):
2419         (WebCore::StackAllocator::alignStackPreFunctionCall):
2420         (WebCore::StackAllocator::unalignStackPostFunctionCall):
2421
2422 2014-04-19  Simon Fraser  <simon.fraser@apple.com>
2423
2424         [UI-side compositing] Implement blend modes
2425         https://bugs.webkit.org/show_bug.cgi?id=131891
2426         <rdar://problem/16490085>
2427
2428         Reviewed by Tim Horton.
2429
2430         Implement blend modes with UI-side compositing.
2431         
2432         PlatformCALayer::setBlendMode() becomes pure virtual, and overridden in
2433         PlatformCALayerMac and PlatformCALayerRemote.
2434         PlatformCAFilters::setBlendingFiltersOnLayer() now takes a raw platform
2435         layer, so it can be called from the UI process on a CALayer*.
2436         
2437         Fix an issue with GraphicsLayerCA::LayerChange flags. 1 << 31 shifts
2438         a signed integer, so it ended up setting all the high bits in m_uncommittedChanges,
2439         causing us to push blend modes to the UI process for every layer. Fix by shifting
2440         an unsigned long long (1LLU << 31). This should also fix a build warning on Windows.
2441
2442         * WebCore.exp.in:
2443         * platform/graphics/ca/GraphicsLayerCA.h:
2444         * platform/graphics/ca/PlatformCAFilters.h:
2445         * platform/graphics/ca/PlatformCALayer.h:
2446         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
2447         (PlatformCAFilters::setBlendingFiltersOnLayer):
2448         * platform/graphics/ca/mac/PlatformCALayerMac.h:
2449         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2450         (PlatformCALayerMac::setFilters):
2451         (PlatformCALayerMac::setBlendMode):
2452         (PlatformCALayer::setBlendMode): Deleted.
2453
2454 2014-04-19  Joseph Pecoraro  <pecoraro@apple.com>
2455
2456         Fix AVPlayerController leak on pages with video
2457         https://bugs.webkit.org/show_bug.cgi?id=131878
2458
2459         Reviewed by Eric Carlson.
2460
2461         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2462         (-[WebAVPlayerController init]):
2463         Assigning to the retain property will increment the count,
2464         so balance the alloc with an autorelease.
2465
2466 2014-04-19  Andreas Kling  <akling@apple.com>
2467
2468         Slap ALWAYS_INLINE on Element attribute lookup things.
2469         <https://webkit.org/b/131892>
2470
2471         Most of the "inline" helpers for setting/getting attributes were not
2472         actually getting inlined by the compiler, so let's make that happen.
2473
2474         Reviewed by Geoffrey Garen.
2475
2476         * dom/Element.cpp:
2477         (WebCore::Element::synchronizeAttribute):
2478         * dom/ElementData.h:
2479         (WebCore::ElementData::findAttributeByName):
2480         (WebCore::ElementData::findAttributeIndexByName):
2481
2482 2014-04-19  Darin Adler  <darin@apple.com>
2483
2484         Telephone number detection should respect its setting consistently
2485         https://bugs.webkit.org/show_bug.cgi?id=131893
2486         rdar://problem/16597639
2487
2488         Reviewed by Tim Horton.
2489
2490         * editing/Editor.cpp:
2491         (WebCore::Editor::respondToChangedSelection): Only start the timer
2492         if shouldDetectTelephoneNumbers returns true.
2493         (WebCore::Editor::shouldDetectTelephoneNumbers): Added. Calls both
2494         isTelephoneNumberParsingEnabled and TelephoneNumberDetector::isSupported.
2495         (WebCore::Editor::scanSelectionForTelephoneNumbers): Use
2496         shouldDetectTelephoneNumbers.
2497         (WebCore::Editor::clearDataDetectedTelephoneNumbers): Use document()
2498         instead of m_frame.document().
2499
2500         * editing/Editor.h: Added declaration of shouldDetectTelephoneNumbers.
2501
2502 2014-04-19  Andrei Bucur  <abucur@adobe.com>
2503
2504         [CSS Regions] Harden the layout in case there are no regions
2505         https://bugs.webkit.org/show_bug.cgi?id=131517
2506
2507         Reviewed by Mihnea Ovidenie.
2508
2509         The patch fixes the cases when the content of a flow thread is not
2510         properly invalidated when all the regions of its chain are removed.
2511
2512         Test: fast/regions/simplified-layout-no-regions.html
2513
2514         * rendering/RenderFlowThread.cpp:
2515         (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
2516         * rendering/RenderRegion.cpp:
2517         (WebCore::RenderRegion::ensureOverflowForBox):
2518
2519 2014-04-19  Zalan Bujtas  <zalan@apple.com>
2520
2521         https://bugs.webkit.org/show_bug.cgi?id=131594
2522         Subpixel rendering: WK1: Wrong repaint rect is calculated when layer has non-compositing transform.
2523
2524         Reviewed by Simon Fraser.
2525
2526         We need to snap the repaint rect for transformed object the same way when we paint them.
2527
2528         Test: fast/repaint/hidpi-wrong-repaint-rect-when-parent-has-noncompositing-transform.html
2529
2530         * rendering/RenderBox.cpp:
2531         (WebCore::RenderBox::computeRectForRepaint):
2532
2533 2014-04-18  Simon Fraser  <simon.fraser@apple.com>
2534
2535         Use 'override' in GraphicsLayerCA
2536         https://bugs.webkit.org/show_bug.cgi?id=131882
2537
2538         Reviewed by Tim Horton.
2539
2540         Add 'override' to all overridden functions. Found a few that need
2541         not have been virtual. Removed "allowTiledLayer" stuff that was
2542         never called.
2543
2544         * WebCore.exp.in:
2545         * platform/graphics/ca/GraphicsLayerCA.cpp:
2546         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
2547         (WebCore::GraphicsLayerCA::requiresTiledLayer):
2548         (WebCore::GraphicsLayerCA::setAllowTiledLayer): Deleted.
2549         * platform/graphics/ca/GraphicsLayerCA.h:
2550         (WebCore::GraphicsLayerCA::platformCALayer):
2551         (WebCore::GraphicsLayerCA::hasContentsLayer): Deleted.
2552         (WebCore::GraphicsLayerCA::allowTiledLayer): Deleted.
2553         (WebCore::GraphicsLayerCA::isGraphicsLayerCA): Deleted.
2554         (WebCore::GraphicsLayerCA::platformCALayerLayoutSublayersOfLayer): Deleted.
2555         (WebCore::GraphicsLayerCA::platformCALayerRespondsToLayoutChanges): Deleted.
2556         (WebCore::GraphicsLayerCA::platformCALayerContentsOrientation): Deleted.
2557         (WebCore::GraphicsLayerCA::platformCALayerShowDebugBorders): Deleted.
2558         (WebCore::GraphicsLayerCA::platformCALayerIncrementRepaintCount): Deleted.
2559         (WebCore::GraphicsLayerCA::platformCALayerContentsOpaque): Deleted.
2560         (WebCore::GraphicsLayerCA::platformCALayerDrawsContent): Deleted.
2561         (WebCore::GraphicsLayerCA::platformCALayerLayerDidDisplay): Deleted.
2562
2563 2014-04-18  Timothy Hatcher  <timothy@apple.com>
2564
2565         Web Inspector: Move InspectorProfilerAgent to JavaScriptCore
2566         https://bugs.webkit.org/show_bug.cgi?id=131673
2567
2568         Passes existing profiler and inspector tests.
2569
2570         Reviewed by Joseph Pecoraro.
2571
2572         * CMakeLists.txt:
2573         * DerivedSources.make:
2574         * ForwardingHeaders/inspector/agents/InspectorProfilerAgent.h: Added.
2575         * WebCore.exp.in:
2576         * WebCore.vcxproj/WebCore.vcxproj:
2577         * WebCore.vcxproj/WebCore.vcxproj.filters:
2578         * WebCore.xcodeproj/project.pbxproj:
2579         * bindings/js/ScriptProfile.cpp: Removed.
2580         * bindings/js/ScriptProfile.h:
2581         * bindings/js/ScriptProfiler.cpp: Removed.
2582         * bindings/js/ScriptProfiler.h: Removed.
2583         * inspector/InspectorAllInOne.cpp:
2584         * inspector/InspectorConsoleInstrumentation.h:
2585         (WebCore::InspectorInstrumentation::profilerEnabled):
2586         (WebCore::InspectorInstrumentation::startProfiling):
2587         (WebCore::InspectorInstrumentation::stopProfiling):
2588         * inspector/InspectorController.cpp:
2589         (WebCore::InspectorController::InspectorController):
2590         * inspector/InspectorController.h:
2591         * inspector/InspectorInstrumentation.cpp:
2592         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
2593         (WebCore::InspectorInstrumentation::startProfilingImpl):
2594         (WebCore::InspectorInstrumentation::stopProfilingImpl):
2595         (WebCore::InspectorInstrumentation::consoleTimeStampImpl): Deleted.
2596         * inspector/InspectorInstrumentation.h:
2597         * inspector/InspectorProfilerAgent.cpp: Removed.
2598         * inspector/InspectorProfilerAgent.h: Removed.
2599         * inspector/InspectorTimelineAgent.cpp:
2600         (WebCore::startProfiling):
2601         (WebCore::stopProfiling):
2602         (WebCore::InspectorTimelineAgent::willCallFunction):
2603         (WebCore::InspectorTimelineAgent::didCallFunction):
2604         (WebCore::InspectorTimelineAgent::willEvaluateScript):
2605         (WebCore::InspectorTimelineAgent::didEvaluateScript):
2606         (WebCore::InspectorTimelineAgent::didDispatchXHRLoadEvent): Deleted.
2607         * inspector/InstrumentingAgents.h:
2608         (WebCore::InstrumentingAgents::inspectorProfilerAgent):
2609         (WebCore::InstrumentingAgents::setInspectorProfilerAgent):
2610         * inspector/PageDebuggerAgent.cpp:
2611         (WebCore::PageDebuggerAgent::sourceMapURLForScript): Deleted.
2612         * inspector/PageDebuggerAgent.h:
2613         * inspector/PageProfilerAgent.cpp: Added.
2614         (WebCore::PageProfilerAgent::PageProfilerAgent):
2615         (WebCore::PageProfilerAgent::profilingGlobalExecState):
2616         * inspector/PageProfilerAgent.h: Added.
2617         (WebCore::PageProfilerAgent::~PageProfilerAgent):
2618         * inspector/ScriptProfile.idl:
2619         * inspector/TimelineRecordFactory.cpp:
2620         (WebCore::TimelineRecordFactory::appendProfile):
2621         * inspector/TimelineRecordFactory.h:
2622         * inspector/WebConsoleAgent.cpp:
2623         * inspector/WebProfilerAgent.cpp: Added.
2624         (WebCore::WebProfilerAgent::WebProfilerAgent):
2625         (WebCore::WebProfilerAgent::enable):
2626         (WebCore::WebProfilerAgent::disable):
2627         * inspector/WebProfilerAgent.h: Added.
2628         (WebCore::WebProfilerAgent::~WebProfilerAgent):
2629         * inspector/WorkerInspectorController.cpp:
2630         (WebCore::WorkerInspectorController::WorkerInspectorController):
2631         * inspector/WorkerProfilerAgent.cpp: Added.
2632         (WebCore::WorkerProfilerAgent::WorkerProfilerAgent):
2633         (WebCore::WorkerProfilerAgent::profilingGlobalExecState):
2634         * inspector/WorkerProfilerAgent.h: Added.
2635         (WebCore::WorkerProfilerAgent::~WorkerProfilerAgent):
2636         * loader/appcache/ApplicationCacheGroup.cpp:
2637         * page/PageConsole.cpp:
2638         (WebCore::PageConsole::profile):
2639         (WebCore::PageConsole::profileEnd):
2640         (WebCore::PageConsole::time): Deleted.
2641         (WebCore::PageConsole::timeEnd): Deleted.
2642         (WebCore::PageConsole::timeStamp): Deleted.
2643         * page/PageConsole.h:
2644         * testing/Internals.cpp:
2645         * testing/Internals.h:
2646         * xml/XMLHttpRequest.cpp:
2647
2648 2014-04-18  Simon Fraser  <simon.fraser@apple.com>
2649
2650         Contents of directly composited image layers are sometimes missing
2651         https://bugs.webkit.org/show_bug.cgi?id=131880
2652
2653         Reviewed by Tim Horton.
2654         
2655         RenderLayerBacking::updateGraphicsLayerGeometry() tested whether a
2656         GraphicsLayer had a contents layer to determine whether to call code
2657         that updates the contents rect. However, on Mac, we don't make a contents
2658         layer until later at layer flush time. That would result in an empty
2659         contentsRect being set.
2660         
2661         Fix by renaming GraphicsLayer::hasContentsLayer() to usesContentsLayer(),
2662         and on Mac consulting the m_contentsLayerPurpose flag, which is set
2663         at the appropriate time.
2664
2665         Test: compositing/images/update-content-rect.html
2666
2667         * platform/ScrollView.cpp:
2668         (WebCore::positionScrollbarLayer):
2669         * platform/graphics/GraphicsLayer.cpp:
2670         (WebCore::GraphicsLayer::getDebugBorderInfo):
2671         * platform/graphics/GraphicsLayer.h:
2672         (WebCore::GraphicsLayer::usesContentsLayer):
2673         (WebCore::GraphicsLayer::hasContentsLayer): Deleted.
2674         * platform/graphics/ca/GraphicsLayerCA.h:
2675         (WebCore::GraphicsLayerCA::hasContentsLayer): Deleted.
2676         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2677         (WebCore::GraphicsLayerTextureMapper::usesContentsLayer):
2678         (WebCore::GraphicsLayerTextureMapper::hasContentsLayer): Deleted.
2679         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2680         * rendering/RenderLayerBacking.cpp:
2681         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2682         (WebCore::RenderLayerBacking::positionOverflowControlsLayers):
2683         (WebCore::RenderLayerBacking::compositingLayerType):
2684
2685 2014-04-18  Commit Queue  <commit-queue@webkit.org>
2686
2687         Unreviewed, rolling out r167527.
2688         https://bugs.webkit.org/show_bug.cgi?id=131883
2689
2690         Broke 32-bit build (Requested by ap on #webkit).
2691
2692         Reverted changeset:
2693
2694         "[Mac] implement WebKitDataCue"
2695         https://bugs.webkit.org/show_bug.cgi?id=131799
2696         http://trac.webkit.org/changeset/167527
2697
2698 2014-04-18  Eric Carlson  <eric.carlson@apple.com>
2699
2700         [Mac] implement WebKitDataCue
2701         https://bugs.webkit.org/show_bug.cgi?id=131799
2702
2703         Reviewed by Dean Jackson.
2704
2705         Tests: http/tests/media/track-in-band-hls-metadata.html
2706                media/track/track-datacue-value.html
2707
2708         * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE.
2709         * DerivedSources.make: Add ENABLE_DATACUE_VALUE to HTML_FLAGS when appropriate.
2710
2711         * CMakeLists.txt: Add JSDataCueCustom.cpp.
2712         * bindings/js/JSBindingsAllInOne.cpp:
2713         * WebCore.xcodeproj/project.pbxproj: Add new files.
2714
2715         * bindings/js/JSDataCueCustom.cpp: Added.
2716         (WebCore::JSDataCue::value): 
2717         (WebCore::JSDataCue::setValue):
2718         (WebCore::JSDataCueConstructor::constructJSDataCue): Custom constructor.
2719
2720         * html/HTMLMediaElement.cpp:
2721         (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Drive-by fixes: don't schedule timeupdate
2722             events when paused, don't call sort on an Vector that can't be sorted.
2723
2724         * html/track/DataCue.cpp:
2725         (WebCore::DataCue::DataCue): Initialize m_type.
2726         (WebCore::DataCue::~DataCue): Unprotect the JSValue if necessary.
2727         (WebCore::DataCue::data): Ask the platform value for data if non-null.
2728         (WebCore::DataCue::setData): Clear m_platformValue and m_value.
2729         (WebCore::DataCue::isEqual): New.
2730         (WebCore::DataCue::value): Return a JSValue from the platform value, or the value passed
2731             to the constructor/set by script.
2732         (WebCore::DataCue::setValue): Set m_value.
2733         * html/track/DataCue.h:
2734         * html/track/DataCue.idl:
2735
2736         * html/track/InbandDataTextTrack.cpp:
2737         (WebCore::InbandDataTextTrack::addDataCue): Don't add the same cue more than once.
2738         (WebCore::InbandDataTextTrack::updateDataCue): Update a cue's duration.
2739         (WebCore::InbandDataTextTrack::removeDataCue): Remove an incomplete cue.
2740         (WebCore::InbandDataTextTrack::removeCue): Remove a cue from the incomplete cue map if necessary.
2741         * html/track/InbandDataTextTrack.h:
2742
2743         * html/track/InbandGenericTextTrack.cpp:
2744         (WebCore::InbandGenericTextTrack::addGenericCue): CueMatchRules is now in TextTrackCue instead
2745             of VTTCue.
2746         * html/track/InbandTextTrack.h:
2747
2748         * html/track/InbandWebVTTTextTrack.cpp:
2749         (WebCore::InbandWebVTTTextTrack::newCuesParsed): Ditto.
2750
2751         * html/track/TextTrack.cpp:
2752         (WebCore::TextTrack::hasCue): Ditto.
2753         * html/track/TextTrack.h:
2754
2755         * html/track/TextTrackCue.cpp:
2756         (WebCore::TextTrackCue::isEqual): New, test base class equality.
2757         * html/track/TextTrackCue.h:
2758
2759         * html/track/TextTrackCueGeneric.cpp:
2760         (WebCore::TextTrackCueGeneric::isEqual): Call TextTrackCue::isEqual first.
2761         * html/track/TextTrackCueGeneric.h:
2762
2763         * html/track/VTTCue.cpp:
2764         (WebCore::VTTCue::isEqual): Call TextTrackCue::isEqual first.
2765         * html/track/VTTCue.h:
2766
2767         * platform/SerializedPlatformRepresentation.h: Added.
2768         (WebCore::SerializedPlatformRepresentation::~SerializedPlatformRepresentation):
2769         (WebCore::SerializedPlatformRepresentation::SerializedPlatformRepresentation):
2770
2771         * platform/graphics/InbandTextTrackPrivateClient.h: Add methods for DataCue with SerializedPlatformRepresentation.
2772
2773         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: Added.
2774         (WebCore::InbandMetadataTextTrackPrivateAVF::create):
2775         (WebCore::InbandMetadataTextTrackPrivateAVF::InbandMetadataTextTrackPrivateAVF):
2776         (WebCore::InbandMetadataTextTrackPrivateAVF::~InbandMetadataTextTrackPrivateAVF):
2777         (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue):
2778         (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes):
2779         (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues):
2780         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h: Added.
2781
2782         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2783         (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): currentTrack -> currentTextTrack.
2784         (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Ditto.
2785         (WebCore::MediaPlayerPrivateAVFoundation::configureInbandTracks): Ditto.
2786         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2787         (WebCore::MediaPlayerPrivateAVFoundation::setCurrentTextTrack):
2788         (WebCore::MediaPlayerPrivateAVFoundation::setCurrentTrack): Deleted.
2789
2790         Renamed currentTrack and setCurrentTrack to currentTextTrack and setCurrentTextTrack.
2791         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2792         (WebCore::AVFWrapper::currentTextTrack):
2793         (WebCore::MediaPlayerPrivateAVFoundationCF::setCurrentTextTrack):
2794         (WebCore::MediaPlayerPrivateAVFoundationCF::currentTextTrack):
2795         (WebCore::AVFWrapper::setCurrentTextTrack):
2796         (WebCore::AVFWrapper::AVFWrapper):
2797         (WebCore::AVFWrapper::processCue):
2798         (WebCore::AVFWrapper::currentTrack): Deleted.
2799         (WebCore::MediaPlayerPrivateAVFoundationCF::setCurrentTrack): Deleted.
2800         (WebCore::MediaPlayerPrivateAVFoundationCF::currentTrack): Deleted.
2801         (WebCore::AVFWrapper::setCurrentTrack): Deleted.
2802         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
2803
2804         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2805         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2806         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
2807         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): currentTrack -> currentTextTrack
2808         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): currentTrack -> currentTextTrack.
2809         (WebCore::MediaPlayerPrivateAVFoundationObjC::processMetadataTrack): New.
2810         (WebCore::MediaPlayerPrivateAVFoundationObjC::processCue): m_currentTrack -> m_currentTextTrack.
2811         (WebCore::MediaPlayerPrivateAVFoundationObjC::flushCues): Ditto.
2812         (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack): Renamed from setCurrentTextTrack.
2813         (WebCore::metadataType): Map an AVFoundation metadata key space to a metadata cue type.
2814         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive): Process new metadata.
2815         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
2816         (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Deleted.
2817
2818         Create a JSValue representation from an AVMetadataItem.
2819         * platform/mac/SerializedPlatformRepresentationMac.h: Added.
2820         (WebCore::SerializedPlatformRepresentationMac::platformType):
2821         (WebCore::SerializedPlatformRepresentationMac::nativeValue):
2822         * platform/mac/SerializedPlatformRepresentationMac.mm: Added.
2823         (WebCore::SerializedPlatformRepresentationMac::SerializedPlatformRepresentationMac):
2824         (WebCore::SerializedPlatformRepresentationMac::~SerializedPlatformRepresentationMac):
2825         (WebCore::SerializedPlatformRepresentationMac::create):
2826         (WebCore::SerializedPlatformRepresentationMac::data):
2827         (WebCore::SerializedPlatformRepresentationMac::deserialize):
2828         (WebCore::SerializedPlatformRepresentationMac::isEqual):
2829         (WebCore::toSerializedPlatformRepresentationMac):
2830         (WebCore::jsValueWithValueInContext):
2831         (WebCore::jsValueWithDataInContext):
2832         (WebCore::jsValueWithArrayInContext):
2833         (WebCore::jsValueWithDictionaryInContext):
2834         (WebCore::jsValueWithAVMetadataItemInContext):
2835
2836 2014-04-18  Jon Honeycutt  <jhoneycutt@apple.com>
2837
2838         Harden RenderInline::inlineElementContinuation()
2839
2840         <https://bugs.webkit.org/show_bug.cgi?id=131858>
2841
2842         Reviewed by Sam Weinig.
2843
2844         No new tests, as there are no known cases of this happening.
2845
2846         * rendering/RenderInline.cpp:
2847         (WebCore::RenderInline::inlineElementContinuation):
2848         Return nullptr if the continuation is neither a RenderInline nor a
2849         RenderBlock.
2850
2851 2014-04-18  Stephanie Lewis  <slewis@apple.com>
2852
2853         We shouldn’t create page throttlers for other pages than WebKit2 pages.
2854         Part of <rdar://problem/16473045> Visibility state counters are often incorrect
2855         https://bugs.webkit.org/show_bug.cgi?id=131696
2856
2857         Reviewed by Gavin Barraclough.
2858
2859         No new test since not web exposed.
2860
2861         Page throttlers were being created for SVG images and other page instances that
2862         were not accurately tracking the states that enable and disable page throttling.
2863         Make the throttler an unique ptr and only initialize it for WebKit2.
2864
2865         This also fixes an inefficiency where we would throttle a new page on creation because 
2866         we assumed it was visible even if that was not the case.
2867
2868         * WebCore.exp.in:
2869         * html/HTMLMediaElement.cpp:
2870         (WebCore::HTMLMediaElement::parseAttribute): Check page throttler exists.
2871         * loader/FrameLoader.cpp:
2872         (WebCore::FrameLoader::started): ditto
2873         * page/Page.cpp:
2874         (WebCore::Page::Page): Don’t automatically create page throttler.
2875         (WebCore::Page::createPageThrottler): Create page throttler.
2876         (WebCore::Page::setViewState): Check page throttler exists.
2877         * page/Page.h:
2878         (WebCore::Page::pageThrottler): Make the page throttler a unique ptr.
2879         * page/PageThrottler.h:
2880         * page/Settings.cpp: 
2881         (WebCore::Settings::setHiddenPageDOMTimerThrottlingEnabled): Check page throttler exists.
2882
2883 2014-04-18  Stephanie Lewis  <slewis@apple.com>
2884
2885         Move DOM throttling out of the page throttler
2886         <rdar://problem/16473004>
2887         https://bugs.webkit.org/show_bug.cgi?id=131697
2888
2889         Reviewed by Gavin Barraclough.
2890
2891         No new tests since it's not web exposed.
2892
2893         DOM timer throttling is currently part of the page throttler which uses per process 
2894         state and per page state to determine when to throttle.  This led us to being overly 
2895         conservative when turning DOM throttling off.  It should only respond to view state changes.
2896
2897         Additionally since creating extra page throttlers SVG images caused bugs 
2898         in tracking state we'll reserve the page throttler for WebKit2 views.  To avoid regressing 
2899         WebKit1 we should move DOM timer throttling back to the page.
2900
2901         * page/Page.cpp:
2902         (WebCore::Page::Page): set DOM timer throttling.
2903         (WebCore::Page::setIsVisuallyIdleInternal): ditto.
2904         (WebCore::Page::hiddenPageDOMTimerThrottlingStateChanged): ditto.
2905         (WebCore::Page::setIsVisible): Update view state masks for WebKit1 to include IsVisibleOrOccluded and IsVisuallyIdle
2906         * page/Page.h:
2907         * page/PageThrottler.cpp:
2908         (WebCore::PageThrottler::PageThrottler): remove DOM timer throttling.
2909         (WebCore::PageThrottler::started): ditto.
2910         (WebCore::PageThrottler::stopped): ditto.
2911         (WebCore::PageThrottler::hiddenPageDOMTimerThrottlingStateChanged): Deleted.
2912         * page/PageThrottler.h:
2913         * page/Settings.cpp:
2914         (WebCore::Settings::setHiddenPageDOMTimerThrottlingEnabled):
2915
2916 2014-04-18  Dean Jackson  <dino@apple.com>
2917
2918         [WebGL] Limit maximum texture sizes on older Intel hardware
2919         https://bugs.webkit.org/show_bug.cgi?id=131867
2920
2921         Reviewed by Geoffrey Garen.
2922
2923         Both Chrome and Firefox limit the MAX_TEXTURE_SIZE on
2924         older Intel hardware to be at most 4096. This does the
2925         same for WebKit.
2926
2927         * platform/graphics/Extensions3D.h: Add requiresRestrictedMaximumTextureSize() accessor.
2928         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
2929         (WebCore::Extensions3DOpenGLCommon::Extensions3DOpenGLCommon): Record the value of GL_RENDERER
2930         and test for "Intel HD Graphics 3000", which is the problematic hardware.
2931         * platform/graphics/opengl/Extensions3DOpenGLCommon.h:
2932         (WebCore::Extensions3DOpenGLCommon::requiresRestrictedMaximumTextureSize): Getter.
2933         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2934         (WebCore::GraphicsContext3D::getIntegerv): If you're asking for MAX_TEXTURE_SIZE or
2935         MAX_CUBE_MAP_TEXTURE_SIZE, and you're on problematic hardware, return a clamped value
2936         (4096 and 1024 respectively).
2937
2938 2014-04-18  Hans Muller  <hmuller@adobe.com>
2939
2940         [CSS Shapes] Add parsing support for gradients
2941         https://bugs.webkit.org/show_bug.cgi?id=131444
2942
2943         Reviewed by Bem Jones-Bey.
2944
2945         Added support for shape-outside gradient values.
2946
2947         Test: fast/shapes/shape-outside-floats/shape-outside-linear-gradient.html
2948
2949         * css/DeprecatedStyleBuilder.cpp:
2950         (WebCore::ApplyPropertyShape::applyValue): Accept generated images as shape-outside values.
2951         * rendering/shapes/ShapeOutsideInfo.cpp:
2952         (WebCore::checkShapeImageOrigin): Generated images get a pass, others do not.
2953         (WebCore::getShapeImageAndRect): Use StyleImage::image() to get a generated image.
2954         (WebCore::ShapeOutsideInfo::isEnabledFor):
2955         * rendering/style/ShapeValue.h:
2956         (WebCore::ShapeValue::isImageValid): Generated images are always considered valid.
2957
2958 2014-04-18  Brady Eidson  <beidson@apple.com>
2959
2960         REGRESSION (r155700): Pasting an image into content-editable regions is broken.
2961         <rdar://problem/16654156> and https://bugs.webkit.org/show_bug.cgi?id=131844
2962
2963         Reviewed by Enrica Casucci.
2964
2965         * editing/mac/EditorMac.mm:
2966         (WebCore::Editor::createFragmentForImageResourceAndAddResource): Add the ArchiveResource before
2967           creating the element that uses it.
2968
2969 2014-04-18  Simon Fraser  <simon.fraser@apple.com>
2970
2971         [iOS WK2] Make window.scroll() and window.scrollBy() work
2972         https://bugs.webkit.org/show_bug.cgi?id=131848
2973         <rdar://problem/16638319>
2974
2975         Reviewed by Beth Dakin.
2976
2977         The scrolling-related functions in DOMWindow were #ifdeffed for iOS
2978         to use the hacky WK1-specific "actual scroll" functions, which do nothing
2979         in WK2.
2980         
2981         Fix by adding a scroll position wrapper (contentsScrollPosition) which does
2982         the right thing on WK1 and WK2, and change almost all the places that used "actualScrollPosition"
2983         to us it (with the exception of contentsScrollOffset() in MouseRelatedEvent.cpp, which has
2984         confusing scaling behavior).
2985
2986         * dom/MouseRelatedEvent.cpp:
2987         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
2988         * dom/TreeScope.cpp:
2989         (WebCore::nodeFromPoint): Remove #ifdefs. 
2990         * html/HTMLBodyElement.cpp:
2991         (WebCore::HTMLBodyElement::scrollLeft):
2992         (WebCore::HTMLBodyElement::scrollTop):
2993         * page/DOMWindow.cpp:
2994         (WebCore::DOMWindow::scrollX):
2995         (WebCore::DOMWindow::scrollY):
2996         (WebCore::DOMWindow::scrollBy):
2997         (WebCore::DOMWindow::scrollTo):
2998         * platform/ScrollView.cpp:
2999         (WebCore::ScrollView::contentsScrollPosition):
3000         (WebCore::ScrollView::setContentsScrollPosition):
3001         * platform/ScrollView.h:
3002
3003 2014-04-18  Simon Fraser  <simon.fraser@apple.com>
3004
3005         Worse animation performance on pages with 3D transforms
3006         https://bugs.webkit.org/show_bug.cgi?id=131838
3007         <rdar://problem/16428630&15705876>
3008
3009         Reviewed by Dean Jackson.
3010         
3011         r155977 added logic to adjust the contentsScale of compositing layers
3012         based on a root-relative transform. However, this resulted in
3013         the contentsScale continually changing on layers whose transforms
3014         are changed dynamically, which caused lots of expensive painting.
3015         
3016         Fix by bucketing the part of the scale computed from the root-relative transform
3017         into buckets of 0.25 via rounding.
3018
3019         Test: compositing/contents-scale/rounded-contents-scale.html
3020
3021         * platform/graphics/ca/GraphicsLayerCA.cpp:
3022         (WebCore::clampedContentsScaleForScale):
3023         (WebCore::GraphicsLayerCA::updateContentsOpaque):
3024         (WebCore::GraphicsLayerCA::updateContentsScale):
3025         (WebCore::GraphicsLayerCA::updateContentsVisibility): Deleted.
3026         (WebCore::GraphicsLayerCA::animatedLayerClones): Deleted.
3027
3028 2014-04-18  Simon Fraser  <simon.fraser@apple.com>
3029
3030         Remove some includes from image-related headers, and Document.h
3031         https://bugs.webkit.org/show_bug.cgi?id=131797
3032
3033         Reviewed by Martin Robinson.
3034
3035         Remove some #includes from Document.h, DragImage.h, GradientImage.h,
3036         Image.h, and ImageBuffer.h and deal with the fallout.
3037
3038         * dom/ContainerNode.h:
3039         * dom/Document.cpp:
3040         (WebCore::Document::setInputCursor):
3041         * dom/Document.h:
3042         (WebCore::Document::inputCursor):
3043         * dom/MutationObserverRegistration.cpp:
3044         * html/canvas/WebGLRenderingContext.cpp:
3045         * page/FrameSnapshotting.cpp:
3046         * page/Page.cpp:
3047         * platform/DragImage.h:
3048         * platform/graphics/BitmapImage.cpp:
3049         * platform/graphics/GradientImage.cpp:
3050         (WebCore::GradientImage::GradientImage):
3051         (WebCore::GradientImage::~GradientImage):
3052         * platform/graphics/GradientImage.h:
3053         * platform/graphics/Image.h:
3054         * platform/graphics/ImageBuffer.cpp:
3055         * platform/graphics/ImageBuffer.h:
3056         (WebCore::ImageBuffer::create):
3057         (WebCore::ImageBuffer::internalSize):
3058         (WebCore::ImageBuffer::logicalSize):
3059         (WebCore::ImageBuffer::baseTransform):
3060         (WebCore::ImageBuffer::spaceSize):
3061         (WebCore::ImageBuffer::setSpaceSize):
3062         * rendering/RenderThemeMac.mm:
3063         * rendering/shapes/Shape.cpp:
3064         * rendering/svg/RenderSVGContainer.cpp:
3065         * svg/SVGURIReference.h:
3066
3067 2014-04-18  Gabor Rapcsanyi  <rgabor@webkit.org>
3068
3069         Unreviewed. ARM64 buildfix after r167473.
3070
3071         * platform/audio/DenormalDisabler.h: Put back the MathExtras.h include.
3072
3073 2014-04-18  Radu Stavila  <stavila@adobe.com>
3074
3075         [CSSRegions] Incorrect background paint on positioned element hover
3076         https://bugs.webkit.org/show_bug.cgi?id=131617
3077
3078         Reviewed by Andrei Bucur.
3079
3080         When computing the repaint rect for absolute elements flowed into regions, the Y location of the
3081         region within the flow thread must no longer be added to the repaint rect's location because absolute
3082         positioned elements get pushed down through the regions by their absolute top. So adding the region's
3083         position in the flow thread and then adding the element's absolute top would cause us to add
3084         something twice.
3085
3086         Tests: fast/regions/repaint/repaint-absolute-pushed-to-next-region.html
3087
3088         * rendering/RenderBox.cpp:
3089         (WebCore::RenderBox::computeRectForRepaint):
3090
3091 2014-04-18  Philippe Normand  <pnormand@igalia.com>
3092
3093         Remove NETWORK_INFO support
3094         https://bugs.webkit.org/show_bug.cgi?id=131841
3095
3096         Reviewed by Gyuyoung Kim.
3097
3098         * CMakeLists.txt:
3099         * Modules/networkinfo/NavigatorNetworkInfoConnection.cpp: Removed.
3100         * Modules/networkinfo/NavigatorNetworkInfoConnection.h: Removed.
3101         * Modules/networkinfo/NavigatorNetworkInfoConnection.idl: Removed.
3102         * Modules/networkinfo/NetworkInfo.cpp: Removed.
3103         * Modules/networkinfo/NetworkInfo.h: Removed.
3104         * Modules/networkinfo/NetworkInfoClient.h: Removed.
3105         * Modules/networkinfo/NetworkInfoConnection.cpp: Removed.
3106         * Modules/networkinfo/NetworkInfoConnection.h: Removed.
3107         * Modules/networkinfo/NetworkInfoConnection.idl: Removed.
3108         * Modules/networkinfo/NetworkInfoController.cpp: Removed.
3109         * Modules/networkinfo/NetworkInfoController.h: Removed.
3110         * PlatformEfl.cmake:
3111         * dom/EventTargetFactory.in:
3112         * platform/efl/NetworkInfoProviderEfl.cpp: Removed.
3113         * platform/efl/NetworkInfoProviderEfl.h: Removed.
3114         * testing/Internals.cpp:
3115         (WebCore::Internals::setNetworkInformation): Deleted.
3116         * testing/Internals.h:
3117         * testing/Internals.idl:
3118
3119 2014-04-17  Commit Queue  <commit-queue@webkit.org>
3120
3121         Unreviewed, rolling out r167478.
3122         https://bugs.webkit.org/show_bug.cgi?id=131840
3123
3124         Broke multicol tests (Requested by ap on #webkit).
3125
3126         Reverted changeset:
3127
3128         "[New Multicolumn] Pagination mode messed up with non-inline
3129         axis and reversed direction."
3130         https://bugs.webkit.org/show_bug.cgi?id=131811
3131         http://trac.webkit.org/changeset/167478
3132
3133 2014-04-17  Daniel Bates  <dabates@apple.com>
3134
3135         [iOS] Hook up screen.{availHeight, availWidth, height, width}
3136         https://bugs.webkit.org/show_bug.cgi?id=131821
3137         <rdar://problem/16413795>
3138
3139         Reviewed by Benjamin Poulain and Tim Horton.
3140
3141         Implement support for screen.{availHeight, availWidth, height, width} in WebKit2 for iOS.
3142
3143         Additionally substitute "screenSize" for "viewporScreenSize" to make the code more understandable.
3144
3145         * WebCore.exp.in: Export symbol for WebCore System Interface function
3146         _wkGetAvailableScreenSize.
3147         * dom/Document.cpp:
3148         (WebCore::Document::processViewport): Modified to call Chrome::screenSize(); formerly it
3149         called ChromeClient::viewportScreenSize().
3150         * page/Chrome.cpp:
3151         (WebCore::Chrome::screenSize): Added; turns around and calls ChromeClient::screenSize().
3152         (WebCore::Chrome::availableScreenSize): Added; turns around and calls ChromeClient::availableScreenSize().
3153         * page/Chrome.h:
3154         * page/ChromeClient.h:
3155         (WebCore::ChromeClient::screenSize): Renamed; formerly named viewportScreenSize.
3156         (WebCore::ChromeClient::availableScreenSize): Added; default implementation, which
3157         returns the size of Chrome::windowRect().
3158         * page/ViewportConfiguration.cpp:
3159         (WebCore::ViewportConfiguration::textDocumentParameters):
3160         * platform/HostWindow.h: Added declarations for availableScreenSize() and screenSize()
3161         so that a caller (e.g. WebCore::screenRect()) can query for such screen information using
3162         only the HostWindow interface. That is, a caller doesn't need to know about ChromeClient.
3163         * platform/ios/PlatformScreenIOS.mm:
3164         (WebCore::screenRect): Modified to query HostWindow::screenSize() when computing the
3165         screen rectangle in WebKit2 for iOS.
3166         (WebCore::screenAvailableRect): Modified to query HostWindow::availableScreenSize()
3167         when computing the available screen rectangle in WebKit2 for iOS.
3168         * platform/ios/WebCoreSystemInterfaceIOS.mm:
3169         * platform/mac/WebCoreSystemInterface.h:
3170
3171 2014-04-17  Darin Adler  <darin@apple.com>
3172
3173         origin spoofing possible (HTTP Origin, postMessage event.origin) due to inappropriate URL escape sequence decoding
3174         https://bugs.webkit.org/show_bug.cgi?id=131837
3175         rdar://problem/15211936
3176
3177         Reviewed by Anders Carlsson and Dave Hyatt.
3178
3179         Tests: fast/dom/DOMURL/parsing.html
3180                fast/dom/HTMLAnchorElement/anchor-element-href-parsing.html
3181
3182         * platform/URL.cpp:
3183         (WebCore::URL::host): Removed unnecessary call to decodeURLEscapeSequences, which caused
3184         problems and was not needed.
3185
3186 2014-04-17  David Hyatt  <hyatt@apple.com>
3187
3188         [New Multicolumn] Pagination mode messed up with non-inline axis and reversed direction.
3189         https://bugs.webkit.org/show_bug.cgi?id=131811
3190
3191         Reviewed by Dean Jackson.
3192
3193         Added fast/multicol/newmulticol/compare-with-old-impl/BottomToTop-tb.html
3194         
3195         With block axis pagination mode, it is possible to set a column height that is not the same
3196         as the available fill height for a block. The new multi-column code had the assumption that
3197         the column height was the same as the amount of fill room you had available. This is not
3198         the case.
3199         
3200         To correct the issue, I added a member variable to RenderMultiColumnSet that stores the
3201         available column height as a separate variable from the computed column height. This allows
3202         the pagination API to specify a different column height that is not the same as the view's
3203         content height.
3204
3205         Even though it isn't involved in the solution, I also patched pageOrViewLogicalHeight on
3206         RenderView to work with the new column code as well.
3207
3208         * rendering/RenderMultiColumnSet.cpp:
3209         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
3210         (WebCore::RenderMultiColumnSet::setAndConstrainColumnHeight):
3211         (WebCore::RenderMultiColumnSet::computeLogicalHeight):
3212         * rendering/RenderMultiColumnSet.h:
3213         * rendering/RenderView.cpp:
3214         (WebCore::RenderView::pageOrViewLogicalHeight):
3215
3216 2014-04-17  Anders Carlsson  <andersca@apple.com>
3217
3218         Build fix.
3219
3220         * svg/animation/SMILTime.h:
3221
3222 2014-04-17  Bem Jones-Bey  <bjonesbe@adobe.com>
3223
3224         Unreviewed, rolling out r167384.
3225
3226         Sounds like this isn't the right fix, and causes generation to
3227         run far too often.
3228
3229         Reverted changeset:
3230
3231         "Fix CodeGenerator.pm to only write files if the generated
3232         content has changed"
3233         https://bugs.webkit.org/show_bug.cgi?id=131756
3234         http://trac.webkit.org/changeset/167384
3235
3236 2014-04-17  Ryuan Choi  <ryuan.choi@samsung.com>
3237
3238         Remove unnecessary MathExtras.h includes
3239         https://bugs.webkit.org/show_bug.cgi?id=131789
3240
3241         Reviewed by Anders Carlsson.
3242
3243         * platform/FileSystem.h:
3244         * platform/Scrollbar.h:
3245         * platform/animation/AnimationUtilities.h:
3246         * platform/audio/DenormalDisabler.h:
3247         * platform/graphics/Font.h:
3248         * platform/graphics/IntPoint.h: Included cmath instad of MathExtras.h.
3249         * platform/graphics/LayoutPoint.h:
3250         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
3251         * rendering/svg/SVGMarkerData.h:
3252         * svg/animation/SMILTime.h:
3253
3254 2014-04-16  Huang Dongsung  <luxtella@company100.net>
3255
3256         Make RenderLayerBacking get the timingFunction of the correct animation.
3257         https://bugs.webkit.org/show_bug.cgi?id=100632
3258
3259         Reviewed by Simon Fraser.
3260
3261         When an element has multiple animations that have different timingFunctions,
3262         the progress of each animation should be calculated using its respective
3263         timingFunction. But at this point, the timingFunction of the first animation is
3264         only used in RenderLayerBacking::startAnimation(), regardless of how many
3265         animations the element has.
3266
3267         getAnimationFromStyleByName() was introduced in r89462 so that the
3268         timingFunction of the correct animation searched by its name would be
3269         used. This patch moves the function to KeyframeValue::timingFunction()
3270         so that RenderLayerBacking reuses this method.
3271
3272         Test: animations/keyframe-multiple-timing-functions-transform.html
3273
3274         * page/animation/KeyframeAnimation.cpp:
3275         (WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty):
3276         * rendering/RenderLayerBacking.cpp:
3277         (WebCore::RenderLayerBacking::startAnimation):
3278         * rendering/style/KeyframeList.cpp:
3279         (WebCore::KeyframeValue::timingFunction):
3280         (WebCore):
3281         * rendering/style/KeyframeList.h:
3282         (WebCore):
3283         (KeyframeValue):
3284
3285 2014-04-17  Andreas Kling  <akling@apple.com>
3286
3287         Rollout: Add a way to cache never-changing IDL attributes in the wrapper.
3288         <https://webkit.org/b/131759>
3289
3290         This behavior may be observable from the web, so we can't do it this way.
3291
3292         * bindings/scripts/CodeGeneratorJS.pm:
3293         (GenerateImplementation):
3294         * bindings/scripts/IDLAttributes.txt:
3295         * bindings/scripts/test/*:
3296         * dom/Element.idl:
3297         * dom/Node.idl:
3298
3299 2014-04-17  Andreas Kling  <akling@apple.com>
3300
3301         Cheesy Mountain Lion build fix.
3302
3303         * platform/MemoryPressureHandler.h:
3304         (WebCore::MemoryPressureHandler::ReliefLogger::logString):
3305
3306 2014-04-17  David Hyatt  <hyatt@apple.com>
3307
3308         [New Multicolumn] Column rules don't respect the specified stacking order.
3309         https://bugs.webkit.org/show_bug.cgi?id=131804
3310
3311         Reviewed by Beth Dakin.
3312
3313         Added fast/multicol/newmulticol/compare_with_old_impl/column-rules-stacking.html
3314
3315         * rendering/RenderBlockFlow.cpp:
3316         (WebCore::RenderBlockFlow::paintBoxDecorations):
3317         * rendering/RenderBlockFlow.h:
3318         Override paintBoxDecorations for block flows so that we can iterate over our column sets
3319         and paint their rules just after painting our background and border. We can't wait until
3320         the child column sets paint their backgrounds, since that is specified as being above negative
3321         z-index children. We have to pretend that the column sets don't exist as
3322         far as column rule painting is concerned.
3323
3324         * rendering/RenderMultiColumnSet.cpp:
3325         (WebCore::RenderMultiColumnSet::paintObject): Deleted.
3326         * rendering/RenderMultiColumnSet.h:
3327         Turn paintObject in RenderMultiColumnSet into an override that doesn't paint anything.
3328
3329 2014-04-17  Beth Dakin  <bdakin@apple.com>
3330
3331         Hit-testing is incorrect for plugins inside iframes when there is a 
3332         topContentInset
3333         https://bugs.webkit.org/show_bug.cgi?id=131826
3334         -and corresponding-
3335         <rdar://problem/16649996>
3336
3337         Reviewed by Tim Horton.
3338
3339         I missed one coordinate-conversion spot when getting hit-testing to work. Like 
3340         headerHeight() which also manipulates the location of the root layer, 
3341         topContentInset() has to be factored into all of these conversions.
3342         * page/FrameView.cpp:
3343         (WebCore::FrameView::convertFromRenderer):
3344
3345 2014-04-17  Andreas Kling  <akling@apple.com>
3346
3347         Stub out MemoryPressureHandler::ReliefLogger on older OS X'es.
3348
3349         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
3350         (WebCore::MemoryPressureHandler::ReliefLogger::platformLog):
3351         (WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):
3352
3353 2014-04-17  Dirk Schulze  <krit@webkit.org>
3354
3355         Remove CANVAS_PATH where possible
3356         https://bugs.webkit.org/show_bug.cgi?id=131788
3357
3358         Reviewed by Dean Jackson.
3359
3360         Since Firefox and Chrome ship the same interoperable subset of Path2D soon, 
3361         it is time to remove CANVAS_PATH where possible.
3362
3363         * html/canvas/CanvasRenderingContext2D.cpp:
3364         (WebCore::CanvasRenderingContext2D::clip):
3365         (WebCore::CanvasRenderingContext2D::isPointInStroke):
3366         * html/canvas/CanvasRenderingContext2D.h:
3367         * html/canvas/CanvasRenderingContext2D.idl:
3368         * html/canvas/DOMPath.h:
3369         * html/canvas/DOMPath.idl:
3370
3371 2014-04-17  Brendan Long  <b.long@cablelabs.com>
3372
3373         [GStreamer] Store TrackPrivateBaseGStreamer's label and language as AtomicStrings
3374         https://bugs.webkit.org/show_bug.cgi?id=130404
3375
3376         Reviewed by Philippe Normand.
3377
3378         No new tests, this just makes things more efficient.
3379
3380         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
3381         (WebCore::TrackPrivateBaseGStreamer::getLanguageCode):
3382         (WebCore::TrackPrivateBaseGStreamer::getTag):
3383         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
3384
3385 2014-04-17  Andreas Kling  <akling@apple.com>
3386
3387         Fix Cocoa build.
3388
3389         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
3390         (WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):
3391
3392 2014-04-17  Rik Cabanier  <cabanier@adobe.com>
3393
3394         [CSS Blending] Remove the -webkit- prefix for mix-blend-mode and isolation CSS properties
3395         https://bugs.webkit.org/show_bug.cgi?id=131355
3396
3397         Reviewed by Dean Jackson.
3398
3399         Removed webkit prefix from mix-blend-mode and isolation. These properties
3400         never shipped and their spec is now in CR.
3401
3402         Covered by existing tests.
3403
3404         * css/CSSComputedStyleDeclaration.cpp:
3405         (WebCore::ComputedStyleExtractor::propertyValue):
3406         * css/CSSParser.cpp:
3407         (WebCore::isValidKeywordPropertyAndValue):
3408         (WebCore::isKeywordPropertyID):
3409         (WebCore::CSSParser::parseValue):
3410         * css/CSSPropertyNames.in:
3411         * css/DeprecatedStyleBuilder.cpp:
3412         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
3413
3414 2014-04-17  David Kilzer  <ddkilzer@apple.com>
3415
3416         Tidy up isIsolatedInline() and highestContainingIsolateWithinRoot()
3417         <http://webkit.org/b/131117>
3418
3419         Reviewed by Daniel Bates.
3420
3421         Based on review feedback for r166650.
3422
3423         * rendering/InlineIterator.h:
3424         (WebCore::isIsolatedInline):
3425         - Switch argument to a reference since it is never called with a
3426           nullptr.
3427         (WebCore::highestContainingIsolateWithinRoot):
3428         - Switch first argument to a reference since it's never a
3429           nullptr.
3430         - Use nullptr for pointer initialization.
3431         - Switch while() loop to for() loop. Pass reference to
3432           isIsolatedInline().
3433         (WebCore::numberOfIsolateAncestors):
3434         - Switch while() loop to for() loop. Pass reference to
3435           isIsolatedInline().
3436         * rendering/RenderBlockLineLayout.cpp:
3437         (WebCore::constructBidiRunsForSegment):
3438         - Rename startObj to startObject.
3439         - No longer need to pass the address of startObject here.
3440
3441 2014-04-17  Andreas Kling  <akling@apple.com>
3442
3443         Log number of bytes reclaimed at each step of memory pressure relief.
3444         <https://webkit.org/b/131751>
3445
3446         Reviewed by Antti Koivisto.
3447
3448         * platform/MemoryPressureHandler.h:
3449         * platform/MemoryPressureHandler.cpp:
3450         (WebCore::MemoryPressureHandler::ReliefLogger::platformLog):
3451         (WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):
3452         (WebCore::MemoryPressureHandler::ReliefLogger::ReliefLogger):
3453         (WebCore::MemoryPressureHandler::ReliefLogger::~ReliefLogger):
3454         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
3455         (WebCore::MemoryPressureHandlerCocoa::ReliefLogger::platformMemoryUsage):
3456         (WebCore::MemoryPressureHandlerCocoa::ReliefLogger::platformLog):
3457