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