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