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