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