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