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