REGRESSION (iOS WebKit2): requestAnimationFrame fires more than once between layer...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-05-23  Tim Horton  <timothy_horton@apple.com>
2
3         REGRESSION (iOS WebKit2): requestAnimationFrame fires more than once between layer tree commits
4         https://bugs.webkit.org/show_bug.cgi?id=132794
5         <rdar://problem/16877909>
6
7         Reviewed by Simon Fraser.
8
9         Virtualize DisplayRefreshMonitor so that WebKit2 can implement its own DisplayRefreshMonitor for UI-side compositing views.
10         This allows the synchronization of requestAnimationFrame callbacks with UI-side compositing painting.
11
12         * WebCore.exp.in:
13         * WebCore.xcodeproj/project.pbxproj:
14         
15         * page/ChromeClient.h:
16         (WebCore::ChromeClient::graphicsLayerFactory):
17         (WebCore::ChromeClient::createDisplayRefreshMonitor):
18         * platform/graphics/DisplayRefreshMonitorFactory.h: Added.
19         * platform/graphics/GraphicsLayerUpdater.cpp:
20         (WebCore::GraphicsLayerUpdater::createDisplayRefreshMonitor):
21         * platform/graphics/GraphicsLayerUpdater.h:
22         * rendering/RenderLayerCompositor.cpp:
23         (WebCore::RenderLayerCompositor::createDisplayRefreshMonitor):
24         * rendering/RenderLayerCompositor.h:
25         Give the ChromeClient a chance to provide us with a custom DisplayRefreshMonitor.
26         If it does not, we'll fall back to making a DisplayRefreshMonitorMac or
27         DisplayRefreshMonitorIOS depending on the platform.
28
29         * dom/ScriptedAnimationController.cpp:
30         * dom/ScriptedAnimationController.h:
31         * platform/graphics/DisplayRefreshMonitor.cpp:
32         * platform/graphics/DisplayRefreshMonitor.h:
33         * platform/graphics/DisplayRefreshMonitorClient.cpp: Added.
34         * platform/graphics/DisplayRefreshMonitorClient.h: Added.
35         * platform/graphics/DisplayRefreshMonitorManager.cpp: Added.
36         * platform/graphics/DisplayRefreshMonitorManager.h: Added.
37         Split DisplayRefreshMonitor.cpp into one file per class.
38         Use references in a few places.
39         Remove some useless comments.
40
41         * platform/graphics/DisplayRefreshMonitor.cpp:
42         (WebCore::DisplayRefreshMonitor::displayDidRefresh):
43         Use takeAny() and remove a FIXME about it not existing.
44
45         * platform/graphics/DisplayRefreshMonitorClient.cpp: Added.
46         (WebCore::DisplayRefreshMonitorClient::fireDisplayRefreshIfNeeded):
47         Use an early return instead of having the whole function body in an if().
48
49         * platform/graphics/ios/DisplayRefreshMonitorIOS.h: Added.
50         * platform/graphics/ios/DisplayRefreshMonitorIOS.mm:
51         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
52         * platform/graphics/mac/DisplayRefreshMonitorMac.h: Added.
53         Virtualize DisplayRefreshMonitorIOS and DisplayRefreshMonitorMac,
54         and move things specific to each of them out of DisplayRefreshMonitor itself.
55
56 2014-05-23  Yusuke Suzuki  <utatane.tea@gmail.com>
57
58         CSS JIT: Apply backtracking optimization to adjacent backtracking
59         https://bugs.webkit.org/show_bug.cgi?id=132951
60
61         Reviewed by Benjamin Poulain.
62
63         Apply the backtracking optimization to the adjacent backtracking.
64         This optimization is already done for the descendant backtracking.
65         We apply this to the adjacent backtracking similarly.
66
67         Test: fast/selectors/backtracking-adjacent-optimized.html
68
69         * cssjit/SelectorCompiler.cpp:
70         (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
71         (WebCore::SelectorCompiler::solveAdjacentBacktrackingActionForDirectAdjacent):
72         (WebCore::SelectorCompiler::solveBacktrackingAction):
73         (WebCore::SelectorCompiler::computeBacktrackingStartOffsetInChain):
74         (WebCore::SelectorCompiler::computeBacktrackingHeightFromDescendant):
75         (WebCore::SelectorCompiler::computeBacktrackingWidthFromIndirectAdjacent):
76         (WebCore::SelectorCompiler::SelectorCodeGenerator::computeBacktrackingInformation):
77         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateIndirectAdjacentTreeWalker):
78         (WebCore::SelectorCompiler::SelectorCodeGenerator::linkFailures):
79         (WebCore::SelectorCompiler::computeBacktrackingStartHeightFromDescendant): Deleted.
80
81 2014-05-23  Alex Christensen  <achristensen@webkit.org>
82
83         Make CSS JIT run on ARM64.
84         https://bugs.webkit.org/show_bug.cgi?id=133156
85
86         Reviewed by Benjamin Poulain.
87
88         * cssjit/FunctionCall.h:
89         (WebCore::FunctionCall::saveAllocatedRegisters):
90         (WebCore::FunctionCall::restoreAllocatedRegisters):
91         Use StackAllocator's new push and pop functions to push and pop a vector instead of iterating it.
92         * cssjit/RegisterAllocator.h:
93         (WebCore::RegisterAllocator::reserveCalleeSavedRegisters):
94         (WebCore::RegisterAllocator::restoreCalleeSavedRegisters):
95         Return a vector of registers to allocate instead of doing the allocation to make the RegisterAllocator
96         not need to know about the StackAllocator and to use the new vector push and pop functions.
97         (WebCore::RegisterAllocator::~RegisterAllocator):
98         Store RegisterIDs instead of StackReferences to avoid needing to know about the stack.
99         * cssjit/SelectorCompiler.cpp:
100         (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
101         Removed the requirement for assert to be disabled to print disassembly when debugging css jit.
102         (WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
103         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateEpilogue):
104         Added to correctly push the link register and frame pointer.
105         This is required if the jit code calls a function on arm64 and helpful for debugging tools on x86_64.
106         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
107         Generate the prologue and epilogue which respectively push and pop
108         the link register, frame pointer, and callee saved registers if needed.
109         * cssjit/StackAllocator.h:
110         (WebCore::StackAllocator::push):
111         (WebCore::StackAllocator::pop):
112         Added new vector push and pop functions to use stp and ldb instructions on arm64.
113
114 2014-05-23  Jeremy Jones  <jeremyj@apple.com>
115
116         Hide fullscreen immediately when switching tabs.
117         https://bugs.webkit.org/show_bug.cgi?id=133239
118
119         Reviewed by Eric Carlson.
120
121         This change allows fullscreen to disappear immediately while still cleaning
122         up fullscreen normally.
123
124         * WebCore.exp.in:
125         * platform/ios/WebVideoFullscreenControllerAVKit.h:
126         renamed function to requestHideAndExitFullscreen
127
128         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
129         renamed function to requestHideAndExitFullscreen
130
131         (-[WebVideoFullscreenController requestHideAndExitFullscreen]):
132         rename of requestExitFullscreen that also hides.
133
134         (-[WebVideoFullscreenController requestExitFullscreen]): Deleted.
135         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: declare requestHideAndExitFullscreen()
136         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
137         (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen):
138         this hides the window before requesting exitfullscreen from the model.
139
140 2014-05-23  Tim Horton  <timothy_horton@apple.com>
141
142         [iOS] WKPDFView should have a page indicator
143         https://bugs.webkit.org/show_bug.cgi?id=133109
144         <rdar://problem/16383003>
145
146         Reviewed by Anders Carlsson.
147
148         * English.lproj/Localizable.strings:
149
150 2014-05-23  Enrica Casucci  <enrica@apple.com>
151
152         Remove invalid ASSERT in wordRangeForPosition.
153         https://bugs.webkit.org/show_bug.cgi?id=133232
154
155         Reviewed by Ryosuke Niwa.
156
157         In WK2 for iOS this function is called on every selection change.
158         The selection could be set by Javascript in an element that is not visible.
159         In that case we won't be able to create a VisiblePosition therefore wordRangeForPosition
160         should not ASSERT that the VisiblePosition is not null, but rather
161         perform an early return if it is null.
162
163         * editing/VisibleUnits.cpp:
164         (WebCore::wordRangeFromPosition):
165
166 2014-05-23  Manuel Rego Casasnovas  <rego@igalia.com>
167
168         [CSS Grid Layout] Use gridRowCount() and gridColumnCount() when possible
169         https://bugs.webkit.org/show_bug.cgi?id=133213
170
171         Reviewed by Sergio Villar Senin.
172
173         Use gridRowCount() and gridColumnCount() instead of m_grid.size() and
174         m_grid[0].size() to make the code more descriptive and easier to
175         understand.
176
177         No new tests (No change in behavior).
178
179         * rendering/RenderGrid.cpp:
180         (WebCore::RenderGrid::growGrid):
181         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
182
183 2014-05-23  Alexey Proskuryakov  <ap@apple.com>
184
185         REGRESSION (r153917): Chart for the Category Explorer within Quicken Essentials
186         does not draw until you force a redraw
187         https://bugs.webkit.org/show_bug.cgi?id=133228
188         <rdar://problem/15221231>
189
190         Reviewed by Simon Fraser.
191
192         * platform/RuntimeApplicationChecks.cpp: (WebCore::applicationIsQuickenEssentials):
193         * platform/RuntimeApplicationChecks.h:
194         Added a check for Quicken Essentials.
195
196         * platform/mac/WidgetMac.mm: (WebCore::Widget::paint): Don't do an early return
197         for Quicken Essentials, it depends on drawing to update its layer.
198
199 2014-05-23  Mihnea Ovidenie  <mihnea@adobe.com>
200
201         REGRESSION(r169105): fast/regions/cssom/region-range-for-box-crash.html is more crashy than before
202         https://bugs.webkit.org/show_bug.cgi?id=133124
203
204         Reviewed by David Hyatt.
205
206         When adjusting the end points of a subtree selection in the case of a document
207         with named flows, we have to make sure that we pass the computed end
208         points to the visible selection algorithm only if the end points are
209         part of the same subtree, otherwise assume a selection clear behavior.
210
211         The test fast/regions/cssom/region-range-for-box-crash.html is used to
212         test this behavior.
213
214         * rendering/SelectionSubtreeRoot.cpp:
215         (WebCore::SelectionSubtreeRoot::adjustForVisibleSelection):
216         (WebCore::SelectionSubtreeRoot::selectionStartEndPositions): Moved to header file.
217         * rendering/SelectionSubtreeRoot.h:
218         (WebCore::SelectionSubtreeRoot::selectionStartEndPositions):
219
220 2014-05-23  Jeremy Jones  <jeremyj@apple.com>
221
222         reset m_havePreparedToPlay when changing media engines.
223         https://bugs.webkit.org/show_bug.cgi?id=133199
224
225         Reviewed by Eric Carlson.
226
227         If a play request comes in before the media player is created, m_havePreparedToPlay
228         is set to true. But when the player is created, this prevents the new player from
229         getting the prepare call.
230
231         * html/HTMLMediaElement.cpp:
232         (WebCore::HTMLMediaElement::mediaPlayerEngineUpdated): set m_havePreparedToPlay false.
233
234 2014-05-23  Oliver Hunt  <oliver@apple.com>
235
236         Navigator object needs to have properties directly on the instance object
237         https://bugs.webkit.org/show_bug.cgi?id=133221
238
239         Reviewed by Mark Lam.
240
241         Flag the Navigator object as requiring properties to be on the instance
242         as there were a few compatibility issues when on the prototype.
243
244         * bindings/scripts/CodeGeneratorJS.pm:
245         (InterfaceRequiresAttributesOnInstance):
246
247 2014-05-23  Simon Fraser  <simon.fraser@apple.com>
248
249         Switch CSSGradientValue to use more references
250         https://bugs.webkit.org/show_bug.cgi?id=133206
251
252         Reviewed by Andreas Kling.
253
254         Switch from pointers to references in various places.
255
256         * css/CSSGradientValue.cpp:
257         (WebCore::CSSGradientValue::image):
258         (WebCore::CSSGradientValue::addStops):
259         (WebCore::positionFromValue):
260         (WebCore::CSSGradientValue::computeEndPoint):
261         (WebCore::CSSLinearGradientValue::createGradient):
262         (WebCore::CSSRadialGradientValue::resolveRadius):
263         (WebCore::CSSRadialGradientValue::createGradient):
264         * css/CSSGradientValue.h:
265
266 2014-05-23  Zalan Bujtas  <zalan@apple.com>
267
268         Subpixel rendering: Make webkit-box-shadow painting subpixel aware.
269         https://bugs.webkit.org/show_bug.cgi?id=133201
270         <rdar://problem/16072830>
271
272         Reviewed by Simon Fraser.
273
274         This patch enables webkit-box-shadow to be painted on a subpixel position. However, we
275         still truncate -webkit-box-shadow property values. Tracked here: http://webkit.org/b/133202
276
277         Test: fast/box-shadow/hidpi-webkit-box-shadow-subpixel-position.html
278
279         * platform/graphics/FloatRoundedRect.cpp:
280         (WebCore::FloatRoundedRect::inflateWithRadii): same as in from RoundedRect.
281         (WebCore::FloatRoundedRect::adjustRadii): same as in from RoundedRect.
282         * platform/graphics/FloatRoundedRect.h:
283         * rendering/RenderBoxModelObject.cpp:
284         (WebCore::RenderBoxModelObject::paintBoxShadow):
285
286 2014-05-22  peavo@outlook.com  <peavo@outlook.com>
287
288         [Curl] Crash when exceeding maximum cache limit.
289         https://bugs.webkit.org/show_bug.cgi?id=133185
290
291         Reviewed by Brent Fulgham.
292
293         When the maximum cache limit is exceeded, I get a crash.
294         This happens when deleting cache entries, because a reference to the url string object in the LRU list
295         is used as a parameter to invalidateCacheEntry(), when called from makeRoomForNewEntry().
296         When the string is removed from the LRU list in makeRoomForNewEntry(), the string is deleted.
297         Next, the string is accessed again to remove the url from the index, and we crash.
298
299         This can be fixed by removing the string from the LRU list after it is removed from the index.
300
301         Fixing the crash also revealed an infinite loop problem.
302         If the url for some reason only exist in the LRU list, and not in the index,
303         we will inifitely loop in makeRoomForNewEntry(), trying to remove this url from the cache, but never succeeding.
304         This can be fixed by removing the url from the LRU list, also when it's not in the index.
305
306         * platform/network/curl/CurlCacheManager.cpp:
307         (WebCore::CurlCacheManager::makeRoomForNewEntry): Avoid infinite loop by checking if there are more cache entries to remove.
308         (WebCore::CurlCacheManager::invalidateCacheEntry): Avoid crash and infinite loop by removing url from LRU list last.
309
310 2014-05-22  Simon Fraser  <simon.fraser@apple.com>
311
312         Make viewport units work in CSS gradients
313         https://bugs.webkit.org/show_bug.cgi?id=133204
314         <rdar://problem/17012259>
315         
316         Reviewed by Tim Horton.
317         
318         Make viewport percentage lengths work in gradients.
319
320         Test: fast/gradients/viewport-units-gradient.html
321
322         * css/CSSGradientValue.cpp:
323         (WebCore::CSSGradientValue::addStops):
324         (WebCore::CSSLinearGradientValue::createGradient):
325         (WebCore::CSSRadialGradientValue::createGradient):
326         * css/CSSGradientValue.h:
327
328 2014-05-22  Benjamin Poulain  <bpoulain@apple.com>
329
330         [iOS][WK2] Add support for minimal-ui viewports
331         https://bugs.webkit.org/show_bug.cgi?id=133162
332
333         Reviewed by Simon Fraser.
334
335         Add support for minimal-ui directly into the Viewport configuration.
336
337         ViewportConfiguration knows about two kinds of layout size in scrollview coordinates:
338         -normal size
339         -minimal ui size.
340
341         Initially, the page is initialized with resetMinimalUI() and starts with a normal layout.
342
343         At any time before the main resource is loaded, the Web page can update its viewport meta tag
344         to include minimal-ui. The viewport configuration is updated immediately to reflect the minimal-ui
345         layout size. Any layout after that takes minimal-ui into account.
346
347         * WebCore.exp.in:
348         * css/LengthFunctions.cpp:
349         (WebCore::minimumValueForLength):
350         (WebCore::floatValueForLength):
351         * css/StyleResolver.cpp:
352         (WebCore::StyleResolver::viewportPercentageValue):
353         * dom/ViewportArguments.h:
354         (WebCore::ViewportArguments::operator==):
355         * page/FrameView.cpp:
356         (WebCore::FrameView::setViewportSizeForCSSViewportUnits):
357         (WebCore::FrameView::viewportSizeForCSSViewportUnits):
358         (WebCore::FrameView::setViewportSize): Deleted.
359         (WebCore::FrameView::viewportSize): Deleted.
360         * page/FrameView.h:
361         * page/ViewportConfiguration.cpp:
362         (WebCore::ViewportConfiguration::ViewportConfiguration):
363         (WebCore::ViewportConfiguration::setMinimumLayoutSize):
364         (WebCore::ViewportConfiguration::setMinimumLayoutSizeForMinimalUI):
365         (WebCore::ViewportConfiguration::activeMinimumLayoutSizeInScrollViewCoordinates):
366         (WebCore::ViewportConfiguration::resetMinimalUI):
367         (WebCore::ViewportConfiguration::pageWillRenderFirstFrame):
368         (WebCore::ViewportConfiguration::initialScale):
369         (WebCore::ViewportConfiguration::minimumScale):
370         (WebCore::ViewportConfiguration::updateConfiguration):
371         (WebCore::ViewportConfiguration::layoutWidth):
372         (WebCore::ViewportConfiguration::layoutHeight):
373         (WebCore::ViewportConfiguration::description):
374         * page/ViewportConfiguration.h:
375         (WebCore::ViewportConfiguration::minimumLayoutSizeForMinimalUI):
376         (WebCore::ViewportConfiguration::usesMinimalUI):
377         * rendering/RenderView.cpp:
378         (WebCore::RenderView::viewportSizeForCSSViewportUnits):
379         (WebCore::RenderView::viewportSize): Deleted.
380         * rendering/RenderView.h:
381
382 2014-05-22  Ryosuke Niwa  <rniwa@webkit.org>
383
384         Can't type in status in facebook.com on iOS Safari because keyboard disappears
385         https://bugs.webkit.org/show_bug.cgi?id=133196
386
387         Reviewed by Geoffrey Garen.
388
389         Fixed the bug by rolling out r156252.
390
391         When the user taps on the status on facebook.com, the page focuses a textarea,
392         which is then made momentarily invisible by setting display:none.
393         The page then removes display:none later and expects the textarea to be still focused.
394
395         With r156252, the focus is removed after the page sets display:none and the keyboard disappears.
396         Since the focus is never reset on the textarea, the user can never type in anything.
397
398         The specification may need to change here given that this (rather odd) behavior/expectation exists
399         on one of the most popular websites on the Web.
400
401         * dom/Document.cpp:
402         (WebCore::Document::Document):
403         (WebCore::Document::recalcStyle):
404         (WebCore::Document::updateLayout):
405         (WebCore::Document::resetHiddenFocusElementSoon): Deleted.
406         (WebCore::Document::resetHiddenFocusElementTimer): Deleted.
407         * dom/Document.h:
408
409 2014-05-22  Myles C. Maxfield  <mmaxfield@apple.com>
410
411         http/tests/security/xss-DENIED-xsl-document-redirect.xml fails with NetworkProcess
412         https://bugs.webkit.org/show_bug.cgi?id=132523
413
414         Reviewed by Alexey Proskuryakov.
415
416         We should not manufacture a response in the event of an error during a
417         synchronous XHR. In addition, this test removes two places that are
418         sensitive to such a manufactured response.
419
420         Updates test expectations.
421
422         * loader/DocumentThreadableLoader.cpp:
423         (WebCore::DocumentThreadableLoader::loadRequest): Don't inspect a
424         loader response if there is an error
425         * platform/network/cf/ResourceHandleCFNet.cpp:
426         (WebCore::ResourceHandle::platformLoadResourceSynchronously): Do not
427         manufacture a response
428         * platform/network/mac/ResourceHandleMac.mm:
429         (WebCore::ResourceHandle::platformLoadResourceSynchronously): Do not
430         manufacture a response
431         * xml/XSLTProcessorLibxslt.cpp:
432         (WebCore::docLoaderFunc): Only use the response's URL if no error
433         occurred.
434
435 2014-05-22  Myles C. Maxfield  <litherum@gmail.com>
436
437         Unreviewed typo fix.
438
439         Reviewed by NOBODY.
440
441         No new tests.
442
443         * platform/graphics/mac/FontMac.mm:
444         (WebCore::Font::dashesForIntersectionsWithRect): Accidentally said run.length() instead of glyphBuffer.size().
445
446 2014-05-22  Andreas Kling  <akling@apple.com>
447
448         [iOS WebKit2] Web process should try to shrink its memory footprint when going into background.
449         <https://webkit.org/b/133197>
450         <rdar://problem/17011561>
451
452         Make releaseMemory() public so we can call it from the process-will-suspend callback.
453
454         Reviewed by Gavin Barraclough.
455
456         * WebCore.exp.in:
457         * platform/MemoryPressureHandler.h:
458
459 2014-05-22  Andreas Kling  <akling@apple.com>
460
461         Hook up a setting for showing detailed logging during memory pressure relief.
462         <https://webkit.org/b/133194>
463
464         Make the pressure relief logger opt-in. Also make it flush memory back to the
465         OS (for both malloc and FastMalloc) to get more accurate numbers at each step.
466
467         Reviewed by Gavin Barraclough.
468
469         * WebCore.exp.in:
470         * platform/MemoryPressureHandler.cpp:
471         * platform/MemoryPressureHandler.h:
472         (WebCore::MemoryPressureHandler::ReliefLogger::ReliefLogger):
473         (WebCore::MemoryPressureHandler::ReliefLogger::~ReliefLogger):
474         (WebCore::MemoryPressureHandler::ReliefLogger::setLoggingEnabled):
475         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
476         (WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):
477
478 2014-05-22  Brady Eidson  <beidson@apple.com>
479
480         Don't scan for phone numbers in editable regions
481         <rdar://problem/16949846> and https://bugs.webkit.org/show_bug.cgi?id=133192
482
483         Reviewed by Enrica Casucci.
484
485         No new tests (Currently untested WK2-only feature)
486
487         * editing/Editor.cpp:
488         (WebCore::Editor::scanRangeForTelephoneNumbers): Skip the range if the Node is editable.
489
490 2014-05-22  Jeremy Jones  <jeremyj@apple.com>
491
492         Captions layout incorrectly in fullscreen.
493         https://bugs.webkit.org/show_bug.cgi?id=133175
494
495         Reviewed by Eric Carlson.
496
497         When doing layout for fullscreen, geometry should be absolute so it is not influenced
498         by the rest of the page. This change adds style for CSSPropertyPosition, CSSPropertyLeft,
499         and CSSPropertyTop.
500
501         * html/shadow/MediaControlElements.cpp:
502         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
503         Refactor style changes into updateStyleForTextTrackRepresentation().
504         (WebCore::MediaControlTextTrackContainerElement::updateTimerFired):
505         Refactor style changes into updateStyleForTextTrackRepresentation().
506         (WebCore::MediaControlTextTrackContainerElement::clearTextTrackRepresentation):
507         Refactor style changes into updateStyleForTextTrackRepresentation().
508         (WebCore::MediaControlTextTrackContainerElement::updateStyleForTextTrackRepresentation):
509         Consolidate style changes here. Include the two existing and three new style changes.
510         * html/shadow/MediaControlElements.h:
511         Declare updateStyleForTextTrackRepresentation().
512
513 2014-05-22  Simon Fraser  <simon.fraser@apple.com>
514
515         REGRESSION (r155977): Very stuttery 3D css animation on jtechcommunications.com
516         https://bugs.webkit.org/show_bug.cgi?id=133179
517         <rdar://problem/16864666>
518
519         Reviewed by Dean Jackson.
520
521         Revert code added in r155977 to try to pick a good contentsScale for layers
522         based on a root-relative transform. This resulted in pages with too much 
523         backing store, and too many cases where layers repainted during animations,
524         causing stutter.
525
526         * platform/graphics/ca/GraphicsLayerCA.cpp:
527         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
528         (WebCore::GraphicsLayerCA::flushCompositingState):
529         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
530         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
531         (WebCore::GraphicsLayerCA::updateContentsOpaque):
532         (WebCore::GraphicsLayerCA::updateAnimations):
533         (WebCore::GraphicsLayerCA::appendToUncommittedAnimations):
534         (WebCore::GraphicsLayerCA::setTransformAnimationEndpoints):
535         (WebCore::GraphicsLayerCA::setTransformAnimationKeyframes):
536         (WebCore::GraphicsLayerCA::updateContentsScale):
537         (WebCore::clampedContentsScaleForScale): Deleted.
538         (WebCore::maxScaleFromTransform): Deleted.
539         (WebCore::GraphicsLayerCA::updateRootRelativeScale): Deleted.
540         (WebCore::GraphicsLayerCA::getTransformFromAnimationsWithMaxScaleImpact): Deleted.
541         * platform/graphics/ca/GraphicsLayerCA.h:
542
543 2014-05-22  Martin Hock  <mhock@apple.com>
544
545         [iOS] Enable -apple-system- styled elements to respond to system font size changes.
546         https://bugs.webkit.org/show_bug.cgi?id=133186
547         <rdar://problem/16583782>
548
549         Reviewed by Enrica Casucci.
550
551         * WebCore.exp.in:
552         * WebCore.xcodeproj/project.pbxproj:
553         * rendering/RenderThemeIOS.h:
554         * rendering/RenderThemeIOS.mm:
555         (WebCore::_contentSizeCategory):
556         (WebCore::RenderThemeIOS::contentSizeCategory):
557         (WebCore::RenderThemeIOS::setContentSizeCategory):
558
559 2014-05-22  Jer Noble  <jer.noble@apple.com>
560
561         [MSE] Stored samples are not freed when SourceBuffer is removed from MediaSource
562         https://bugs.webkit.org/show_bug.cgi?id=133174
563
564         Reviewed by Eric Carlson.
565
566         Clear out stored MediaSamples from SourceBuffer's TrackBuffer storage when
567         aborting loading. Also, report the memory cost of those samples, so that the
568         SourceBuffer will be GCd more readily.
569
570         Add a mechanism for reporting the size of a MediaSample:
571         * Modules/mediasource/SourceBuffer.h:
572         * platform/MediaSample.h:
573         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
574         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
575
576         Track the memory usage of a SampleMap when adding and removing samples, as well
577         as allowing the SampleMap to be cleared wholesale:
578         * Modules/mediasource/SampleMap.cpp:
579         (WebCore::SampleMap::clear): Release all stored MediaSamples.
580         (WebCore::SampleMap::addSample): Update m_totalSize.
581         (WebCore::SampleMap::removeSample): Ditto.
582         * Modules/mediasource/SampleMap.h:
583         (WebCore::SampleMap::SampleMap): Initialize m_totalSize.
584         (WebCore::SampleMap::sizeInBytes): Simple accessor.
585
586         Clear the stored samples when loading is aborted, and report the extra memory
587         cost
588         * Modules/mediasource/SourceBuffer.cpp:
589         (WebCore::SourceBuffer::SourceBuffer): Initialize m_reportedExtraMemoryCost.
590         (WebCore::SourceBuffer::removedFromMediaSource): Clear all stored samples.
591         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): Call reportExtraMemoryCost().
592         (WebCore::SourceBuffer::reportExtraMemoryCost): Inform the vm of the new
593             extra memory cost incurred by the object.
594
595 2014-05-22  Enrica Casucci  <enrica@apple.com>
596
597         REGRESSION (WebKit2): Keyboard should have Search button in duckduckgo.com.
598         https://bugs.webkit.org/show_bug.cgi?id=133183
599         <rdar://problem/17004207>
600
601         Reviewed by Geoff Garen.
602
603         Adding new export.
604
605         * WebCore.exp.in:
606
607 2014-05-22  Carlos Garcia Campos  <cgarcia@igalia.com>
608
609         REGRESSION(r163712): [GTK] Misspelling and grammar underline marks are no longer drawn
610         https://bugs.webkit.org/show_bug.cgi?id=133047
611
612         Reviewed by Darin Adler.
613
614         Change two conditions changed by mistake in r163712.
615
616         * editing/TextCheckingHelper.cpp:
617         (WebCore::findMisspellings): Enter the loop also when wordStart is 0.
618         (WebCore::TextCheckingHelper::findFirstMisspelling): Skip the work
619         when the text is a single character. Also reworked it to use a for
620         loop to improve the readability.
621
622 2014-05-22  Piotr Grad  <p.grad@samsung.com>
623
624         Video is resumed with old playback rate.
625         https://bugs.webkit.org/show_bug.cgi?id=132905
626
627         Reviewed by Philippe Normand.
628
629         Setting '0' playback rate is causing pipeline to pause.
630         GStreamer player impl. exposed this information to upper layers but it should not.
631         Solution is to hidden such situation behind m_playbackRatePause flag.
632
633         Test: media/video-paused-0-rate.html
634
635         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
636         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
637         (WebCore::MediaPlayerPrivateGStreamer::play):
638         (WebCore::MediaPlayerPrivateGStreamer::pause):
639         (WebCore::MediaPlayerPrivateGStreamer::doSeek):
640         (WebCore::MediaPlayerPrivateGStreamer::updatePlaybackRate):
641         (WebCore::MediaPlayerPrivateGStreamer::paused):
642         (WebCore::MediaPlayerPrivateGStreamer::setRate):
643         (WebCore::MediaPlayerPrivateGStreamer::updateStates):
644         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
645
646 2014-05-22  Antti Koivisto  <antti@apple.com>
647
648         Text markers don't paint on simple lines
649         https://bugs.webkit.org/show_bug.cgi?id=133177
650
651         Reviewed by Anders Carlsson.
652         
653         Marker painting code does not yet support simple lines.
654
655         Tests: fast/text/mark-matches-rendering-simple-lines.html
656                fast/text/mark-matches-rendering.html
657
658         * dom/DocumentMarkerController.cpp:
659         (WebCore::DocumentMarkerController::addMarker):
660         
661             Force text blocks with markers to use line boxes.
662
663         * testing/Internals.cpp:
664         (WebCore::Internals::setMarkedTextMatchesAreHighlighted):
665         
666             Expose this so we can make reftests for marker rendering.
667
668         * testing/Internals.h:
669         * testing/Internals.idl:
670
671 2014-05-22  Manuel Rego Casasnovas  <rego@igalia.com>
672
673         [CSS Grid Layout] Guard RenderObject::isRenderGrid() method
674         https://bugs.webkit.org/show_bug.cgi?id=132380
675
676         Reviewed by Benjamin Poulain.
677
678         Guard RenderObject::isRenderGrid() method under ENABLE_CSS_GRID_LAYOUT compilation flag.
679
680         * rendering/RenderBox.cpp:
681         (WebCore::RenderBox::computeLogicalWidthInRegion):
682         * rendering/RenderObject.h:
683
684 2014-05-21  Antti Koivisto  <antti@apple.com>
685
686         REGRESSION(r167870): Crash in simple line layout code with :after
687         https://bugs.webkit.org/show_bug.cgi?id=133155
688         <rdar://problem/16977696>
689
690         Reviewed by Darin Adler.
691         
692         Fix https://bugs.webkit.org/show_bug.cgi?id=132241 in a safer way.
693         The underline behavior is tested by the existing fast/text/simple-lines-hover-underline.html
694
695         Test: fast/text/simple-lines-hover-after.html
696
697         * rendering/RenderBlock.cpp:
698         (WebCore::RenderBlock::invalidateLineLayoutPath): Deleted.
699
700             Move to RenderBlockFlow.
701
702         * rendering/RenderBlock.h:
703         (WebCore::RenderBlock::invalidateLineLayoutPath):
704         * rendering/RenderBlockFlow.cpp:
705         (WebCore::RenderBlockFlow::styleDidChange):
706         
707             Invalidate layout if style changes in a manner that makes us ineligible to use the simple line layout path.
708
709         (WebCore::RenderBlockFlow::invalidateLineLayoutPath):
710         
711             Drop the simple line layout on path invalidation if it exists. It may not be valid anymore.
712             Also invalidate the layout if this happens so we'll reconstruct the lines later.
713
714         (WebCore::RenderBlockFlow::simpleLineLayout): Deleted.
715         (WebCore::RenderBlockFlow::ensureLineBoxes):
716         (WebCore::RenderBlockFlow::createLineBoxes): Deleted.
717                 
718             Revert some of the changes made it r167870.
719
720         * rendering/RenderBlockFlow.h:
721         (WebCore::RenderBlockFlow::simpleLineLayout):
722         
723             Add strong validity assert.
724
725 2014-05-21  Eric Carlson  <eric.carlson@apple.com>
726
727         [iOS] two media control button strings are not localized
728         https://bugs.webkit.org/show_bug.cgi?id=133160
729
730         Reviewed by Geoffrey Garen.
731
732         * English.lproj/mediaControlsLocalizedStrings.js:
733
734 2014-05-21  Dean Jackson  <dino@apple.com>
735
736         [iOS] Update some of the media controls buttons to be bigger
737         https://bugs.webkit.org/show_bug.cgi?id=133158
738         <rdar://problem/16475828>
739
740         Reviewed by Simon Fraser.
741
742         The buttons in the media controls on iOS are too small
743         to be comfortably pressed. Make them the size of the controls
744         panel and the expected iOS button size (44x44px).
745
746         The artwork for the buttons now includes the padding. I've
747         added a file from which you can edit the artwork, then
748         copy it into the CSS (because editing directly in CSS is
749         a huge pain).
750
751         So far just the play/pause and fullscreen button have been
752         updated. There will be a follow-up patch to fix the remaining
753         buttons and the scrubber.
754
755         * Modules/mediacontrols/assets-apple-iOS.svg: Added.
756         * Modules/mediacontrols/mediaControlsiOS.css:
757         (audio::-webkit-media-controls-panel):
758         (audio::-webkit-media-controls-fullscreen-button):
759         (audio::-webkit-media-controls-play-button):
760         (audio::-webkit-media-controls-play-button:active):
761         (audio::-webkit-media-controls-play-button.paused):
762         (audio::-webkit-media-controls-fullscreen-button:active):
763         (@media only screen and (-webkit-min-device-pixel-ratio: 2)): Deleted.
764
765 2014-05-21  Zalan Bujtas  <zalan@apple.com>
766
767         Garbage when rubber-banding at the right edge of a page zoomed to non-integral scale.
768         https://bugs.webkit.org/show_bug.cgi?id=133139
769         <rdar://problem/16503353>
770
771         Reviewed by Simon Fraser.
772
773         Do not pixel align the root content layer. The alignment code expands the graphics's layer size
774         which makes the right and bottom tiles bigger than the content.
775         Painting the body's background color produces pixel cracks, because the content can not
776         fill the expanded tiles completely.
777
778         Not testable.
779
780         * platform/graphics/GraphicsLayerClient.h:
781         (WebCore::GraphicsLayerClient::needsPixelAligment):
782         * platform/graphics/ca/GraphicsLayerCA.cpp:
783         (WebCore::GraphicsLayerCA::updateGeometry):
784         (WebCore::GraphicsLayerCA::computePixelAlignment):
785         * platform/graphics/ca/mac/TileGrid.mm:
786         (WebCore::TileGrid::rectForTileIndex):
787         * rendering/RenderLayerBacking.cpp:
788         (WebCore::RenderLayerBacking::needsPixelAligment):
789         * rendering/RenderLayerBacking.h:
790
791 2014-05-21  Radu Stavila  <stavila@adobe.com>
792
793         REGRESSION (r168046): Invalid layout in WebCore::RenderBox::containingBlockLogicalWidthForPositioned
794         https://bugs.webkit.org/show_bug.cgi?id=132933
795
796         Reviewed by Darin Adler.
797
798         Invalid layout is performed when calling containingBlockLogicalWidthForPositioned for a RenderTableSection object.
799
800         Test: fast/multicol/newmulticol/table-section-crash.html
801
802         * rendering/RenderBox.cpp:
803         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
804
805 2014-05-21  Simon Pena  <simon.pena@samsung.com>
806
807         [EFL] Ensure EGLOffScreenContext::initialize calls platformMakeCurrent on the surface
808         https://bugs.webkit.org/show_bug.cgi?id=124832
809
810         Reviewed by Antonio Gomes.
811
812         The original code was only calling platformMakeCurrent when the
813         GL_EXT_robustness extension is supported: the alternate code path
814         would only create a context, but it wouldn't make that context
815         current. This patch ensures platformMakeCurrent is also called for
816         the alternate code path, and, if it fails to make the context
817         current, will destroy the context. Effectively, this makes both
818         code paths behave in the same way.
819
820         * platform/graphics/surfaces/egl/EGLContext.cpp:
821         (WebCore::EGLOffScreenContext::initialize):
822
823 2014-05-20  Brent Fulgham  <bfulgham@apple.com>
824
825         [Mac] DataCues do not work properly when rewinding video
826         https://bugs.webkit.org/show_bug.cgi?id=133138
827         <rdar://problem/16979086>
828
829         Reviewed by Eric Carlson.
830
831         Make the TrackPrivateBase responsible for knowing if a type of track needs a non-zero
832         startTimeVariance value.
833
834         Also, correct a bug in the equality test for DataCue objects.
835
836         * html/track/DataCue.cpp:
837         (WebCore::DataCue::isEqual): Handle the JSValue data types consistently, so that we don't attempt
838         to compare a JSNull against a default JSValue object.
839         * html/track/InbandTextTrack.cpp:
840         (WebCore::InbandTextTrack::startTimeVariance): Added.
841         * html/track/InbandTextTrack.h:
842         * html/track/TextTrack.cpp:
843         (WebCore::TextTrack::hasCue): Use new startTimeVariance method location.
844         * html/track/TextTrack.h:
845         (WebCore::TextTrack::startTimeVariance): Added.
846         * html/track/TextTrackCue.cpp:
847         (WebCore::TextTrackCue::hasEquivalentStartTime): Use new startTimeVariance location.
848         * html/track/TextTrackCue.h:
849         (WebCore::TextTrackCue::startTimeVariance): Deleted.
850         * html/track/TextTrackCueGeneric.h:
851         * platform/graphics/TrackPrivateBase.h:
852         (WebCore::TrackPrivateBase::startTimeVariance): Added.
853         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
854
855 2014-05-20  Mark Hahnenberg  <mhahnenberg@apple.com>
856
857         Watchdog timer should be lazily allocated
858         https://bugs.webkit.org/show_bug.cgi?id=133135
859
860         Reviewed by Geoffrey Garen.
861
862         No new tests.
863
864         We incur a noticeable amount of overhead on some benchmarks due to checking if the Watchdog ever fired. 
865         There is no reason to do this checking if we never activated the Watchdog, which can only be done through 
866         JSContextGroupSetExecutionTimeLimit or JSContextGroupClearExecutionTimeLimit. 
867
868         By allocating the Watchdog lazily on the VM we can avoid all of the associated overhead when we don't use 
869         these two API functions (which is true of most clients).
870
871         * bindings/js/JSEventListener.cpp:
872         (WebCore::JSEventListener::handleEvent):
873         * bindings/js/WorkerScriptController.cpp:
874         (WebCore::WorkerScriptController::evaluate):
875         (WebCore::WorkerScriptController::scheduleExecutionTermination):
876         (WebCore::WorkerScriptController::isExecutionTerminating):
877
878 2014-05-20  Dean Jackson  <dino@apple.com>
879
880         [Mac] Allow popup menus to override default appearance
881         https://bugs.webkit.org/show_bug.cgi?id=133129
882
883         Reviewed by Tim Horton.
884
885         WebKitSystemInterface's WKPopupMenu has a flag to hide
886         the arrows at the end of a popup-menu (e.g. <select>).
887         Expose that via adding a hasDefaultAppearance flag to
888         PopupMenuStyle, which then passes it on to WKSI.
889
890         * platform/PopupMenuStyle.h:
891         (WebCore::PopupMenuStyle::PopupMenuStyle): New flag in constructor.
892         (WebCore::PopupMenuStyle::hasDefaultAppearance): New flag.
893         * platform/mac/WebCoreSystemInterface.h: wkPopupMenu signature has changed to accept
894         the new flag.
895         * platform/mac/WebCoreSystemInterface.mm: Ditto.
896         * rendering/RenderMenuList.cpp:
897         (RenderMenuList::itemStyle): Pass in true as default appearance when creating
898         the PopupMenuStyle. We don't need it.
899         (RenderMenuList::menuStyle): In this case we pass in the negated value of
900         style().hasAppearance(), which indicates if we are overriding the built-in drawing.
901         * rendering/RenderSearchField.cpp:
902         (WebCore::RenderSearchField::menuStyle): Use true as the default value.
903
904 2014-05-20  Eric Carlson  <eric.carlson@apple.com>
905
906         [Mac] do not deactivate an audio session that has running I/O
907         https://bugs.webkit.org/show_bug.cgi?id=133127
908
909         Reviewed by Jer Noble.
910
911         * page/Settings.h:
912         (WebCore::Settings::setShouldManageAudioSessionCategory): Renamed from setShouldManageAudioSession.
913         (WebCore::Settings::shouldManageAudioSessionCategory): Renamed from shouldManageAudioSession.
914         (WebCore::Settings::setShouldManageAudioSession): Deleted.
915         (WebCore::Settings::shouldManageAudioSession): Deleted.
916
917         * platform/audio/mac/MediaSessionManagerMac.cpp:
918         (MediaSessionManager::updateSessionState): Don't deactivate the session if there are any
919             Video or Audio sessions.
920
921         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
922         (WebCore::MediaPlayerPrivateAVFoundationObjC::assetStatus): Drive-by change to log errors 
923             returned by -statusOfValueForKey:error: in debug builds.
924
925 2014-05-20  Beth Dakin  <bdakin@apple.com>
926
927         REGRESSION: All non-mainframe scrollbars don't paint after r169065
928         https://bugs.webkit.org/show_bug.cgi?id=133132
929         -and corresponding-
930         <rdar://problem/16968850>
931
932         Reviewed by Geoff Garen.
933
934         We should not universally return true here. This feature will only work for 
935         scrollbars with layers.
936         * platform/ScrollableArea.h:
937         * platform/Scrollbar.cpp:
938         (WebCore::Scrollbar::supportsUpdateOnSecondaryThread):
939
940 2014-05-20  Daniel Bates  <dabates@apple.com>
941
942         Element within flattened frame may update its scroll state during the layout phase of the wrong RenderView
943         https://bugs.webkit.org/show_bug.cgi?id=133013
944         <rdar://problem/16760154>
945
946         Reviewed by David Hyatt.
947
948         Fixes an issue where the scroll state of an element may be updated during the layout of the wrong
949         RenderView. In particular, the scroll state of an element inside a CSS flex box in a flattened
950         frame f is updated during the layout of the RenderView associated with the parent frame of f instead
951         of during the layout of the RenderView associated with f.
952
953         The layout machinery assumes that the scroll state of each scrollable element is updated before the
954         completion of layout for its associated RenderView. Currently we have logic to defer updating the scroll
955         state of a scrollable element until completion of recursive layout. For a page with a flattened frame, we
956         defer such updates until completion of layout for all RenderViews along the ancestor frame hierarchy of
957         each flattened frame regardless of the RenderView associated with the element that originated the
958         deferred scroll state request. Instead, only the RenderView associated with the element that deferred its
959         scroll state update should dispatch the scroll state update.
960
961         Tests: fast/frames/flattening/scrollable-flexbox-inside-iframe-with-zero-height-and-needs-full-repaint-crash.html
962                fast/frames/flattening/scrollable-flexbox-inside-iframe-with-zero-height-assertion-failure.html
963
964         * rendering/RenderBlock.cpp: Removed WTF::-prefix in typedef definition for ContinuationOutlineTableMap.
965         (WebCore::UpdateScrollInfoAfterLayoutTransaction::UpdateScrollInfoAfterLayoutTransaction): Added; a struct
966         that represents a RenderView v, nested transaction count, and a list of RenderBlocks in v that will need
967         to have their scroll state updated.
968         (WebCore::updateScrollInfoAfterLayoutTransactionStack): Added; returns the global stack of transactions.
969         (WebCore::RenderBlock::willBeDestroyed): Call removeFromUpdateScrollInfoAfterLayoutTransaction(), which
970         was formerly named as removeFromDelayedUpdateScrollInfoSet.
971         (WebCore::currentUpdateScrollInfoAfterLayoutTransaction): Added; returns the top-most transaction in the
972         global stack.
973         (WebCore::RenderBlock::beginUpdateScrollInfoAfterLayoutTransaction): Modified as appropriate to make use
974         of the global stack of transactions; formerly named startDelayUpdateScrollInfo.
975         (WebCore::RenderBlock::endAndCommitUpdateScrollInfoAfterLayoutTransaction): Modified as appropriate to
976         make use of the global stack of transactions; formerly named finishDelayUpdateScrollInfo.
977         (WebCore::RenderBlock::removeFromUpdateScrollInfoAfterLayoutTransaction): Modified as appropriate to make
978         use of the global stack of transactions; formerly named removeFromDelayedUpdateScrollInfoSet.
979         (WebCore::RenderBlock::updateScrollInfoAfterLayout): Modified as appropriate to make use of the global
980         stack of transactions.
981         (WebCore::RenderBlock::layout): Ditto.
982         (WebCore::RenderBlock::startDelayUpdateScrollInfo): Deleted.
983         (WebCore::RenderBlock::finishDelayUpdateScrollInfo): Deleted.
984         (WebCore::RenderBlock::removeFromDelayedUpdateScrollInfoSet): Deleted.
985         * rendering/RenderBlock.h:
986         * rendering/RenderBlockFlow.cpp:
987         (WebCore::RenderBlockFlow::willBeDestroyed): Call removeFromUpdateScrollInfoAfterLayoutTransaction(), which
988         was formerly named removeFromDelayedUpdateScrollInfoSet.
989         * rendering/RenderDeprecatedFlexibleBox.cpp:
990         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox): Call {begin, end}UpdateScrollInfoAfterLayoutTransaction(),
991         which was formerly named {start, end}DelayUpdateScrollInfo.
992         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox): Ditto.
993         * rendering/RenderFlexibleBox.cpp:
994         (WebCore::RenderFlexibleBox::layoutBlock): Ditto.
995
996 2014-05-20  Beth Dakin  <bdakin@apple.com>
997
998         REGRESSION (r169065): Mountain Lion run-api-tests failures: ASSERTION FAILED: 
999         Uncaught exception - -[NSRegularLegacyScrollerImp setPresentationValue:]: 
1000         unrecognized selector sent to instance 0x7ff51aa38000
1001         https://bugs.webkit.org/show_bug.cgi?id=133121
1002
1003         Reviewed by Tim Horton.
1004
1005         * platform/mac/ScrollbarThemeMac.mm:
1006         (WebCore::ScrollbarThemeMac::setPaintCharacteristicsForScrollbar):
1007
1008 2014-05-19  Simon Fraser  <simon.fraser@apple.com>
1009
1010         REGRESSION (r169063) Fixed and sticky nodes misplaced on scrolling sometimes
1011         https://bugs.webkit.org/show_bug.cgi?id=133106
1012         <rdar://problem/16967648>
1013
1014         Reviewed by Sam Weinig.
1015
1016         Fix regression from r169063. That commit removed scrolledContentsLayers from 
1017         frame scrolling nodes, but they do actually use them.
1018         
1019         So put them back; not in the base class, because they have a somewhat different
1020         meaning for overflow scrolling and frame scrolling.
1021
1022         * WebCore.exp.in:
1023         * page/scrolling/AsyncScrollingCoordinator.cpp:
1024         (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
1025         (WebCore::AsyncScrollingCoordinator::updateFrameScrollingNode):
1026         * page/scrolling/AsyncScrollingCoordinator.h:
1027         * page/scrolling/ScrollingCoordinator.h:
1028         (WebCore::ScrollingCoordinator::updateFrameScrollingNode):
1029         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
1030         (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
1031         (WebCore::ScrollingStateFrameScrollingNode::setScrolledContentsLayer):
1032         * page/scrolling/ScrollingStateFrameScrollingNode.h:
1033         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1034         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren):
1035         * rendering/RenderLayerCompositor.cpp:
1036         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
1037
1038 2014-05-20  Radu Stavila  <stavila@adobe.com>
1039
1040         REGRESSION: [CSS Regions] Content flowed directly into the flow thread that ends up in the second region is not properly repainted
1041         https://bugs.webkit.org/show_bug.cgi?id=133111
1042
1043         Reviewed by David Hyatt.
1044
1045         When computing the repaint rect of an element flowed into a flow thread, if the element is flowed directly into
1046         the flow thread (meaning its containing block is the flow thread itself), the region's position within the flow
1047         must no longer be taken into consideration, because its already included in the element's |topLeft|.
1048
1049         Test: fast/regions/hover-element-flowed-second-region.html
1050
1051         * rendering/RenderBox.cpp:
1052         (WebCore::RenderBox::computeRectForRepaint):
1053
1054 2014-05-20  Alex Christensen  <achristensen@webkit.org>
1055
1056         Fix web timing assertion failure.
1057         https://bugs.webkit.org/show_bug.cgi?id=133094
1058         <rdar://problem/16966032>
1059
1060         Reviewed by Alexey Proskuryakov.
1061
1062         * platform/network/mac/ResourceHandleMac.mm:
1063         (WebCore::ResourceHandle::getConnectionTimingData):
1064         Set requestStart and responseStart to 0 instead of -1 to match the 
1065         ResourceLoadTiming constructor and prevent the assertion failure in
1066         PerformanceTiming::responseStart.
1067
1068 2014-05-20  Prashant Hiremath  <hiremathprashants@gmail.com>
1069
1070         Only set title on SVG documents
1071         https://bugs.webkit.org/show_bug.cgi?id=133068
1072
1073         Reviewed by Dirk Schulze.
1074
1075         Test: svg/custom/html_document_set_title.html
1076
1077         * svg/SVGTitleElement.cpp:
1078         (WebCore::SVGTitleElement::insertedInto):
1079         (WebCore::SVGTitleElement::removedFrom):
1080         (WebCore::SVGTitleElement::childrenChanged):
1081
1082 2014-05-20  peavo@outlook.com  <peavo@outlook.com>
1083
1084         [Curl] Invalid content in cache file, causes broken rendering.
1085         https://bugs.webkit.org/show_bug.cgi?id=133069
1086
1087         Reviewed by Brent Fulgham.
1088
1089         When data for a url is received as multiple parts, the cache file for the url is truncated when opened for writing,
1090         and will only contain the last part of data received.
1091         This is fixed by only opening the file once, and close it after all data has been received.
1092
1093         * platform/network/curl/CurlCacheEntry.cpp:
1094         (WebCore::CurlCacheEntry::CurlCacheEntry): Initialize cache file handle member.
1095         (WebCore::CurlCacheEntry::~CurlCacheEntry): Close cache file.
1096         (WebCore::CurlCacheEntry::saveCachedData): Only open cache file once to avoid truncating.
1097         (WebCore::CurlCacheEntry::didFail): Close cache file.
1098         (WebCore::CurlCacheEntry::didFinishLoading): Ditto.
1099         (WebCore::CurlCacheEntry::openContentFile): Added method to open cache file.
1100         (WebCore::CurlCacheEntry::closeContentFile): Added method to close cache file.
1101         * platform/network/curl/CurlCacheEntry.h: Added file handle member, and methods to open and close cache file.
1102
1103 2014-05-20  Radu Stavila  <stavila@adobe.com>
1104
1105         [CSS Regions] Block incorrectly sized when containing an unsplittable box
1106         https://bugs.webkit.org/show_bug.cgi?id=132601
1107
1108         Reviewed by Antti Koivisto.
1109
1110         When laying out elements in a region, when an inline element is encountered
1111         the size of its parent must not be increased beyond the bottom of the current region,
1112         unless if its the last region. This will ensure that the next sibling of the
1113         inline element is correctly laid out at the top of the next region, instead
1114         of leaving an empty space equal to the height of the overflow, as it did until now.
1115
1116         Tests: fast/regions/inline-block-inside-anonymous-overflow.html
1117                fast/regions/inline-block-overflow.html
1118
1119         * rendering/RenderBlockFlow.cpp:
1120         (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
1121         (WebCore::RenderBlockFlow::hasNextPage):
1122         * rendering/RenderBlockFlow.h:
1123         * rendering/RenderBlockLineLayout.cpp:
1124         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
1125         (WebCore::RenderBlockFlow::linkToEndLineIfNeeded):
1126         (WebCore::RenderBlockFlow::determineStartPosition):
1127         (WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine):
1128
1129 2014-05-20  Mihnea Ovidenie  <mihnea@adobe.com>
1130
1131         [CSS Regions] Crash while painting block selection gaps in regions
1132         https://bugs.webkit.org/show_bug.cgi?id=132720
1133
1134         Reviewed by David Hyatt.
1135
1136         The fix for WebKit bug https://bugs.webkit.org/show_bug.cgi?id=131511
1137         allowed selection highlight to match the DOM selection when the start
1138         and end point of the selection were in different flow threads. In order
1139         to enable that, the selection was performed separately on view and
1140         render flow threads, considered selection subtrees.
1141
1142         However, the start and end points for each selection subtree were computed
1143         by means of Range class but it is not always possible to construct a valid
1144         Range from two pairs of RenderObjects and offsets.
1145
1146         This patch keeps the substrees approach but instead of storing the endpoints
1147         for each subtree in a Range and continuously extending the Range, it stores them
1148         using the already available SelectionSubtreeRoot class. After the end points are
1149         computed for each subtree and before processing the subtree selection, the end points
1150         are adjusted in a similar fashion as the one used in FrameSelection::updateAppearance(),
1151         to make sure we are passing the same expected information to the method implementing
1152         the visible selection processing.
1153
1154         Test: fast/regions/selection-gaps-paint-crash.html
1155
1156         * rendering/RenderView.cpp:
1157         (WebCore::RenderView::splitSelectionBetweenSubtrees):
1158         * rendering/SelectionSubtreeRoot.cpp:
1159         (WebCore::SelectionSubtreeRoot::adjustForVisibleSelection):
1160         * rendering/SelectionSubtreeRoot.h:
1161         (WebCore::SelectionSubtreeRoot::selectionClear):
1162
1163 2014-05-19  Simon Fraser  <simon.fraser@apple.com>
1164
1165         Scrolling pages with large TiledBacking content layers creates way too many tiles
1166         https://bugs.webkit.org/show_bug.cgi?id=133101
1167
1168         Reviewed by Tim Horton.
1169
1170         Fix the GraphicsLayerCA::adjustTiledLayerVisibleRect() logic to avoid making giant rects if the old
1171         and new visible rects don't overlap.
1172
1173         * platform/graphics/TiledBacking.h:
1174         * platform/graphics/ca/GraphicsLayerCA.cpp:
1175         (WebCore::GraphicsLayerCA::adjustTiledLayerVisibleRect):
1176         * platform/graphics/ca/mac/TileController.h:
1177
1178 2014-05-19  Simon Fraser  <simon.fraser@apple.com>
1179
1180         Correctly maintain the "isInWindow" state for all TiledBackings
1181         https://bugs.webkit.org/show_bug.cgi?id=133095
1182
1183         Reviewed by Tim Horton.
1184         
1185         We never updated the "isInWindow" state for TiledBacking that wasn't the RenderView's
1186         backing. Fix it by having RenderLayerCompositor::setIsInWindow() recurse through all
1187         layers (if necessary), updating their state. Also set the state on newly created
1188         TiledBackings.
1189
1190         * rendering/RenderLayerCompositor.cpp:
1191         (WebCore::RenderLayerCompositor::layerTiledBackingUsageChanged):
1192         (WebCore::RenderLayerCompositor::setIsInWindowForLayerIncludingDescendants):
1193         (WebCore::RenderLayerCompositor::setIsInWindow):
1194         (WebCore::RenderLayerCompositor::pageTiledBacking): Deleted.
1195         * rendering/RenderLayerCompositor.h:
1196
1197 2014-05-19  Dean Jackson  <dino@apple.com>
1198
1199         [iOS] Use status display for live streams
1200         https://bugs.webkit.org/show_bug.cgi?id=133097
1201
1202         Reviewed by Sam Weinig.
1203
1204         Follow-on from https://bugs.webkit.org/show_bug.cgi?id=131390
1205         Allow the iOS controls to use the status display field.
1206
1207         * Modules/mediacontrols/mediaControlsiOS.js:
1208         (ControllerIOS.prototype.configureInlineControls): Live streams should
1209         not have a timeline or rewind button.
1210
1211 2014-05-19  Myles C. Maxfield  <litherum@gmail.com>
1212
1213         Text decorations do not contribute to visual overflow
1214         https://bugs.webkit.org/show_bug.cgi?id=132773
1215
1216         Reviewed by Antti Koivisto.
1217
1218         This patch creates a function, visualOverflowForDecorations, which computes
1219         how much visual overflow to add around a text box due to text decorations. Most of the time,
1220         text decorations are fully contained within the text box, so the result is usually 0.
1221
1222         This function exists within style/InlineTextBoxStyle.cpp, which is an added file. This is
1223         so that it can be called from setLogicalWidthForTextRun() inside RenderBlockLineLayout.cpp
1224         and from RenderStyle::changeAffectsVisualOverflow(). The former case passes in the full
1225         InlineTextBox and the latter case just passes in a RenderStyle (because the InlineTextBox
1226         is unavailable.)
1227
1228         This patch also modifies RenderTableSection::spannedColumns() to fix an off-by-one error
1229         that was causing table borders to not be drawn when they existed right on the edge of
1230         a repaint rect.
1231
1232         Tests: fast/css3-text/css3-text-decoration/repaint/underline-outside-of-layout-rect.html
1233         Tests: fast/repaint/border-collapse-table-off-by-one-expected.html
1234
1235         * WebCore.vcxproj/WebCore.vcxproj: Adding reference to new InlineTextBoxStyle.cpp file
1236         * WebCore.vcxproj/WebCore.vcxproj.filters: Adding reference to new InlineTextBoxStyle files
1237         * WebCore.xcodeproj/project.pbxproj: Adding reference to new InlineTextBoxStyle files
1238         * rendering/InlineTextBox.cpp:
1239         (WebCore::computeUnderlineOffset): Moved to InlineTextBox.cpp
1240         (WebCore::getWavyStrokeParameters): Moved to InlineTextBox.cpp
1241         (WebCore::InlineTextBox::paintDecoration): Update to use newly refactored functions
1242         * rendering/RenderBlockLineLayout.cpp:
1243         (WebCore::setLogicalWidthForTextRun): Call visualOverflowForDecorations()
1244         * rendering/RenderTableSection.cpp:
1245         * rendering/RenderTableSelection.cpp: Fix off-by-one error when the boundary of a repaint
1246         rect lies exactly on top of a table column position
1247         * rendering/style/RenderStyle.cpp:
1248         (WebCore::RenderStyle::changeAffectsVisualOverflow): Inspects shadows and text decorations
1249         (WebCore::RenderStyle::changeRequiresLayout): Calls changeAffectsVisualOverflow()
1250         (WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline): Moved code from here
1251         to changeAffectsVisualOverflow().
1252         * rendering/style/RenderStyle.h: Function signature
1253         * style/InlineTextBoxStyle.cpp: Added.
1254         (WebCore::computeUnderlineOffset): Moved from InlineTextBox.cpp
1255         (WebCore::getWavyStrokeParameters): Moved from InlineTextBox.cpp
1256         (WebCore::extendIntToFloat): Convenience function for dealing with the fact that
1257         underline bounding boxes use floats and GlyphOverflow uses ints
1258         (WebCore::visualOverflowForDecorations): Given
1259         vertical overflow bounds, possibly extend those to include location of
1260         decorations.
1261         * style/InlineTextBoxStyle.h: Added. Function signatures.
1262         (WebCore::textDecorationStrokeThickness): Refactored from InlineTextBox.cpp
1263         (WebCore::wavyOffsetFromDecoration): Refactored from InlineTextBox.cpp
1264         * platform/graphics/Font.h:
1265         (WebCore::GlyphOverflow::isEmpty): Convenience function
1266         (WebCore::GlyphOverflow::extendTo): Convenience function
1267
1268 2014-05-19  Alex Christensen  <achristensen@webkit.org>
1269
1270         Unreviewed build fix after r169082
1271
1272         * platform/network/ResourceHandle.h:
1273         Added NSDictionary declaration.
1274
1275 2014-05-19  Beth Dakin  <bdakin@apple.com>
1276
1277         REGRESSION: Standalone images need to take topContentInset into account
1278         https://bugs.webkit.org/show_bug.cgi?id=133092
1279         -and corresponding-
1280         <rdar://problem/16945791>
1281
1282         Reviewed by Darin Adler.
1283
1284         The FrameView’s size is accurate in terms of the NSWindow size, but that is not 
1285         really what the ImageDocument code is looking for here. The ImageDocument wants to 
1286         know the size of the unobscured viewport area. We should use visibleSize() for 
1287         that.
1288         * html/ImageDocument.cpp:
1289         (WebCore::ImageDocument::scale):
1290         (WebCore::ImageDocument::imageFitsInWindow):
1291         (WebCore::ImageDocument::imageClicked):
1292
1293 2014-05-19  Alex Christensen  <achristensen@webkit.org>
1294
1295         Collect web timing data on iOS.
1296         https://bugs.webkit.org/show_bug.cgi?id=133075
1297
1298         Reviewed by Sam Weinig.
1299
1300         * platform/network/ResourceHandle.h:
1301         Added setCollectsTimingData wrapper and getConnectionTimingData declarations.
1302         getConnectionTimingData with a dictionary parameter is a private helper function.
1303         * platform/network/cf/ResourceHandleCFNet.cpp:
1304         (WebCore::ResourceHandle::start):
1305         Call setCollectsTimingData wrapper when creating a connection to ensure that timing data is collected.
1306         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
1307         (WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveResponseCallback):
1308         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
1309         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
1310         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
1311         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h:
1312         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
1313         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
1314         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h:
1315         Pass the CFURLConnectionRef to didReceiveResponse to get timing data from.
1316         * platform/network/mac/ResourceHandleMac.mm:
1317         (WebCore::ResourceHandle::getConnectionTimingData):
1318         Moved from getTimingData to compile regardless of using CFNetwork and added wrapper with CFDictionaryRef.
1319         (WebCore::ResourceHandle::setCollectsTimingData):
1320         Added wrapper to call objc function from c++.
1321         (WebCore::ResourceHandle::getTimingData):
1322         Renamed to getConnectionTimingData.
1323         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
1324         (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
1325         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
1326         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
1327         Updated function name from getTimingData to getConnectionTimingData.
1328
1329 2014-05-19  Chris Fleizach  <cfleizach@apple.com>
1330
1331         AX: VoiceOver sees the WebArea out of order when topContentInset is used
1332         https://bugs.webkit.org/show_bug.cgi?id=133091
1333
1334         Reviewed by Simon Fraser.
1335
1336         Modify the scroll view's frame so that it recognizes the content inset.
1337         This is needed so that when VoiceOver sorts elements to create an ordering,
1338         the web area is not ordered at the top of the screen.
1339
1340         Test: platform/mac-wk2/accessibility/content-inset-scrollview-frame.html
1341
1342         * accessibility/AccessibilityScrollView.cpp:
1343         (WebCore::AccessibilityScrollView::elementRect):
1344
1345 2014-05-19  Beth Dakin  <bdakin@apple.com>
1346
1347         Scrollbars display incorrectly after switching between fast and slow scrolling 
1348         mode, affects Find and real sites
1349         https://bugs.webkit.org/show_bug.cgi?id=133077
1350         -and corresponding-
1351         <rdar://problem/16888608>
1352
1353         Reviewed by Tim Horton.
1354
1355         We should always return true here when updating on the secondary thread is 
1356         supported. It does not need to be gated on whether we are actively taking 
1357         advantage of that support at this moment.
1358         * platform/Scrollbar.cpp:
1359         (WebCore::Scrollbar::supportsUpdateOnSecondaryThread):
1360
1361         Always update the presentationValue whenever we update the doubleValue just to 
1362         keep them in sync.
1363         * platform/mac/ScrollbarThemeMac.mm:
1364         (WebCore::ScrollbarThemeMac::setPaintCharacteristicsForScrollbar):
1365
1366 2014-05-19  Simon Fraser  <simon.fraser@apple.com>
1367
1368         Split scrolling tree ScrollingNodes into FrameScrollingNodes and OverflowScrollingNodes
1369         https://bugs.webkit.org/show_bug.cgi?id=133022
1370
1371         Reviewed by Sam Weinig.
1372
1373         In both the scrolling state tree and the scrolling tree, split the "scrolling nodes"
1374         into FrameScrolling and OverflowScrolling nodes.
1375         
1376         Move what was the "viewportSize" property onto the base class for the scrolling
1377         nodes, calling it "scrollableAreaSize".
1378         
1379         Make minimum/maximumScrollPosition() virtual so we can share more code (and there
1380         is more code sharing to be done in future).
1381
1382         * Configurations/WebCore.xcconfig: Remove ScrollingStateScrollingNodeMac.mm and ScrollingTreeScrollingNodeMac.mm
1383         from the list, using #ifdefs in the file instead.
1384         * WebCore.exp.in: Lots of exports.
1385         * WebCore.xcodeproj/project.pbxproj: New files.
1386         * page/scrolling/AsyncScrollingCoordinator.cpp:
1387         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
1388         (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
1389         (WebCore::AsyncScrollingCoordinator::updateFrameScrollingNode):
1390         (WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode):
1391         (WebCore::AsyncScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView):
1392         (WebCore::AsyncScrollingCoordinator::updateScrollingNode): Deleted.
1393         (WebCore::AsyncScrollingCoordinator::setScrollbarPaintersFromScrollbarsForNode): Deleted.
1394         This tiny function didn't need to exist.
1395         * page/scrolling/AsyncScrollingCoordinator.h:
1396         * page/scrolling/ScrollingCoordinator.h:
1397         (WebCore::ScrollingCoordinator::updateFrameScrollingNode):
1398         (WebCore::ScrollingCoordinator::updateOverflowScrollingNode):
1399         (WebCore::ScrollingCoordinator::updateScrollingNode): Deleted.
1400         * page/scrolling/ScrollingStateFrameScrollingNode.cpp: Copied from Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp.
1401         (WebCore::ScrollingStateFrameScrollingNode::create):
1402         (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
1403         (WebCore::ScrollingStateFrameScrollingNode::~ScrollingStateFrameScrollingNode):
1404         (WebCore::ScrollingStateFrameScrollingNode::clone):
1405         (WebCore::ScrollingStateFrameScrollingNode::setFrameScaleFactor):
1406         (WebCore::ScrollingStateFrameScrollingNode::setNonFastScrollableRegion):
1407         (WebCore::ScrollingStateFrameScrollingNode::setWheelEventHandlerCount):
1408         (WebCore::ScrollingStateFrameScrollingNode::setSynchronousScrollingReasons):
1409         (WebCore::ScrollingStateFrameScrollingNode::setScrollBehaviorForFixedElements):
1410         (WebCore::ScrollingStateFrameScrollingNode::setHeaderHeight):
1411         (WebCore::ScrollingStateFrameScrollingNode::setFooterHeight):
1412         (WebCore::ScrollingStateFrameScrollingNode::setTopContentInset):
1413         (WebCore::ScrollingStateFrameScrollingNode::setCounterScrollingLayer):
1414         (WebCore::ScrollingStateFrameScrollingNode::setInsetClipLayer):
1415         (WebCore::ScrollingStateFrameScrollingNode::setContentShadowLayer):
1416         (WebCore::ScrollingStateFrameScrollingNode::setHeaderLayer):
1417         (WebCore::ScrollingStateFrameScrollingNode::setFooterLayer):
1418         (WebCore::ScrollingStateFrameScrollingNode::setScrollbarPaintersFromScrollbars):
1419         (WebCore::ScrollingStateFrameScrollingNode::dumpProperties):
1420         * page/scrolling/ScrollingStateFrameScrollingNode.h: Copied from Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h.
1421         * page/scrolling/ScrollingStateNode.h:
1422         (WebCore::LayerRepresentation::layerID):
1423         (WebCore::ScrollingStateNode::isFrameScrollingNode):
1424         (WebCore::ScrollingStateNode::isOverflowScrollingNode):
1425         * page/scrolling/ScrollingStateOverflowScrollingNode.cpp: Added.
1426         (WebCore::ScrollingStateOverflowScrollingNode::create):
1427         (WebCore::ScrollingStateOverflowScrollingNode::ScrollingStateOverflowScrollingNode):
1428         (WebCore::ScrollingStateOverflowScrollingNode::~ScrollingStateOverflowScrollingNode):
1429         (WebCore::ScrollingStateOverflowScrollingNode::clone):
1430         (WebCore::ScrollingStateOverflowScrollingNode::setScrolledContentsLayer):
1431         (WebCore::ScrollingStateOverflowScrollingNode::dumpProperties):
1432         * page/scrolling/ScrollingStateOverflowScrollingNode.h: Copied from Source/WebCore/page/scrolling/mac/ScrollingStateScrollingNodeMac.mm.
1433         (WebCore::ScrollingStateOverflowScrollingNode::scrolledContentsLayer):
1434         * page/scrolling/ScrollingStateScrollingNode.cpp:
1435         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
1436         (WebCore::ScrollingStateScrollingNode::setScrollableAreaSize):
1437         (WebCore::ScrollingStateScrollingNode::setTotalContentsSize):
1438         (WebCore::ScrollingStateScrollingNode::dumpProperties):
1439         (WebCore::ScrollingStateScrollingNode::create): Deleted.
1440         (WebCore::ScrollingStateScrollingNode::clone): Deleted.
1441         (WebCore::ScrollingStateScrollingNode::setViewportSize): Deleted.
1442         (WebCore::ScrollingStateScrollingNode::setFrameScaleFactor): Deleted.
1443         (WebCore::ScrollingStateScrollingNode::setNonFastScrollableRegion): Deleted.
1444         (WebCore::ScrollingStateScrollingNode::setWheelEventHandlerCount): Deleted.
1445         (WebCore::ScrollingStateScrollingNode::setSynchronousScrollingReasons): Deleted.
1446         (WebCore::ScrollingStateScrollingNode::setScrollBehaviorForFixedElements): Deleted.
1447         (WebCore::ScrollingStateScrollingNode::setHeaderHeight): Deleted.
1448         (WebCore::ScrollingStateScrollingNode::setFooterHeight): Deleted.
1449         (WebCore::ScrollingStateScrollingNode::setTopContentInset): Deleted.
1450         (WebCore::ScrollingStateScrollingNode::setScrolledContentsLayer): Deleted.
1451         (WebCore::ScrollingStateScrollingNode::setCounterScrollingLayer): Deleted.
1452         (WebCore::ScrollingStateScrollingNode::setInsetClipLayer): Deleted.
1453         (WebCore::ScrollingStateScrollingNode::setContentShadowLayer): Deleted.
1454         (WebCore::ScrollingStateScrollingNode::setHeaderLayer): Deleted.
1455         (WebCore::ScrollingStateScrollingNode::setFooterLayer): Deleted.
1456         (WebCore::ScrollingStateScrollingNode::setScrollbarPaintersFromScrollbars): Deleted.
1457         * page/scrolling/ScrollingStateScrollingNode.h:
1458         (WebCore::ScrollingStateScrollingNode::scrollableAreaSize):
1459         (WebCore::ScrollingStateScrollingNode::totalContentsSize):
1460         * page/scrolling/ScrollingStateTree.cpp:
1461         (WebCore::ScrollingStateTree::attachNode):
1462         (WebCore::ScrollingStateTree::commit):
1463         * page/scrolling/ScrollingStateTree.h:
1464         (WebCore::ScrollingStateTree::rootStateNode):
1465         (WebCore::ScrollingStateTree::setRootStateNode):
1466         * page/scrolling/ScrollingTree.cpp:
1467         (WebCore::ScrollingTree::commitNewTreeState):
1468         * page/scrolling/ScrollingTreeFrameScrollingNode.cpp: Added.
1469         (WebCore::ScrollingTreeFrameScrollingNode::ScrollingTreeFrameScrollingNode):
1470         (WebCore::ScrollingTreeFrameScrollingNode::~ScrollingTreeFrameScrollingNode):
1471         (WebCore::ScrollingTreeFrameScrollingNode::updateBeforeChildren):
1472         * page/scrolling/ScrollingTreeFrameScrollingNode.h: Copied from Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h.
1473         (WebCore::ScrollingTreeFrameScrollingNode::updateLayersAfterDelegatedScroll):
1474         (WebCore::ScrollingTreeFrameScrollingNode::synchronousScrollingReasons):
1475         (WebCore::ScrollingTreeFrameScrollingNode::shouldUpdateScrollLayerPositionSynchronously):
1476         (WebCore::ScrollingTreeFrameScrollingNode::frameScaleFactor):
1477         (WebCore::ScrollingTreeFrameScrollingNode::headerHeight):
1478         (WebCore::ScrollingTreeFrameScrollingNode::footerHeight):
1479         (WebCore::ScrollingTreeFrameScrollingNode::topContentInset):
1480         (WebCore::ScrollingTreeFrameScrollingNode::scrollBehaviorForFixedElements):
1481         * page/scrolling/ScrollingTreeNode.h:
1482         (WebCore::ScrollingTreeNode::isFrameScrollingNode):
1483         (WebCore::ScrollingTreeNode::isOverflowScrollingNode):
1484         * page/scrolling/ScrollingTreeOverflowScrollingNode.cpp: Copied from Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h.
1485         (WebCore::ScrollingTreeOverflowScrollingNode::ScrollingTreeOverflowScrollingNode):
1486         (WebCore::ScrollingTreeOverflowScrollingNode::~ScrollingTreeOverflowScrollingNode):
1487         * page/scrolling/ScrollingTreeOverflowScrollingNode.h: Copied from Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h.
1488         * page/scrolling/ScrollingTreeScrollingNode.cpp:
1489         (WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode):
1490         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
1491         (WebCore::ScrollingTreeScrollingNode::updateAfterChildren):
1492         (WebCore::ScrollingTreeScrollingNode::setScrollPosition):
1493         (WebCore::ScrollingTreeScrollingNode::setScrollPositionWithoutContentEdgeConstraints):
1494         (WebCore::ScrollingTreeScrollingNode::minimumScrollPosition):
1495         (WebCore::ScrollingTreeScrollingNode::maximumScrollPosition):
1496         * page/scrolling/ScrollingTreeScrollingNode.h:
1497         (WebCore::ScrollingTreeScrollingNode::scrollableAreaSize):
1498         (WebCore::ScrollingTreeScrollingNode::totalContentsSize):
1499         (WebCore::ScrollingTreeScrollingNode::totalContentsSizeForRubberBand):
1500         (WebCore::ScrollingTreeScrollingNode::setTotalContentsSizeForRubberBand):
1501         (WebCore::ScrollingTreeScrollingNode::synchronousScrollingReasons): Deleted.
1502         (WebCore::ScrollingTreeScrollingNode::shouldUpdateScrollLayerPositionSynchronously): Deleted.
1503         (WebCore::ScrollingTreeScrollingNode::viewportSize): Deleted.
1504         (WebCore::ScrollingTreeScrollingNode::frameScaleFactor): Deleted.
1505         (WebCore::ScrollingTreeScrollingNode::headerHeight): Deleted.
1506         (WebCore::ScrollingTreeScrollingNode::footerHeight): Deleted.
1507         (WebCore::ScrollingTreeScrollingNode::scrollBehaviorForFixedElements): Deleted.
1508         (WebCore::ScrollingTreeScrollingNode::topContentInset): Deleted.
1509         * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
1510         (WebCore::ScrollingCoordinatorIOS::createScrollingTreeNode):
1511         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h: Renamed from Source/WebCore/page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h.
1512         (WebCore::ScrollingTreeFrameScrollingNodeIOS::scrollLayer):
1513         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm: Renamed from Source/WebCore/page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm.
1514         (WebCore::ScrollingTreeFrameScrollingNodeIOS::create):
1515         (WebCore::ScrollingTreeFrameScrollingNodeIOS::ScrollingTreeFrameScrollingNodeIOS):
1516         (WebCore::ScrollingTreeFrameScrollingNodeIOS::~ScrollingTreeFrameScrollingNodeIOS):
1517         (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateBeforeChildren):
1518         (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateAfterChildren):
1519         (WebCore::ScrollingTreeFrameScrollingNodeIOS::scrollPosition):
1520         (WebCore::ScrollingTreeFrameScrollingNodeIOS::setScrollPosition):
1521         (WebCore::ScrollingTreeFrameScrollingNodeIOS::setScrollPositionWithoutContentEdgeConstraints):
1522         (WebCore::ScrollingTreeFrameScrollingNodeIOS::setScrollLayerPosition):
1523         (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateLayersAfterViewportChange):
1524         (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateLayersAfterDelegatedScroll):
1525         (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateChildNodesAfterScroll):
1526         (WebCore::ScrollingTreeFrameScrollingNodeIOS::minimumScrollPosition):
1527         (WebCore::ScrollingTreeFrameScrollingNodeIOS::maximumScrollPosition):
1528         (WebCore::ScrollingTreeFrameScrollingNodeIOS::scrollBy):
1529         (WebCore::ScrollingTreeFrameScrollingNodeIOS::scrollByWithoutContentEdgeConstraints):
1530         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1531         (WebCore::ScrollingCoordinatorMac::createScrollingTreeNode):
1532         * page/scrolling/mac/ScrollingStateFrameScrollingNodeMac.mm: Renamed from Source/WebCore/page/scrolling/mac/ScrollingStateScrollingNodeMac.mm.
1533         (WebCore::ScrollingStateFrameScrollingNode::setScrollbarPaintersFromScrollbars):
1534         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Renamed from Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.h.
1535         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: Renamed from Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm.
1536         (WebCore::ScrollingTreeFrameScrollingNodeMac::create):
1537         (WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac):
1538         (WebCore::ScrollingTreeFrameScrollingNodeMac::~ScrollingTreeFrameScrollingNodeMac):
1539         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren):
1540         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateAfterChildren):
1541         (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent):
1542         (WebCore::ScrollingTreeFrameScrollingNodeMac::allowsHorizontalStretching):
1543         (WebCore::ScrollingTreeFrameScrollingNodeMac::allowsVerticalStretching):
1544         (WebCore::ScrollingTreeFrameScrollingNodeMac::stretchAmount):
1545         (WebCore::ScrollingTreeFrameScrollingNodeMac::pinnedInDirection):
1546         (WebCore::ScrollingTreeFrameScrollingNodeMac::canScrollHorizontally):
1547         (WebCore::ScrollingTreeFrameScrollingNodeMac::canScrollVertically):
1548         (WebCore::ScrollingTreeFrameScrollingNodeMac::shouldRubberBandInDirection):
1549         (WebCore::ScrollingTreeFrameScrollingNodeMac::absoluteScrollPosition):
1550         (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollBy):
1551         (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollByWithoutContentEdgeConstraints):
1552         (WebCore::ScrollingTreeFrameScrollingNodeMac::startSnapRubberbandTimer):
1553         (WebCore::ScrollingTreeFrameScrollingNodeMac::stopSnapRubberbandTimer):
1554         (WebCore::ScrollingTreeFrameScrollingNodeMac::adjustScrollPositionToBoundsIfNecessary):
1555         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollPosition):
1556         (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollPosition):
1557         (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollPositionWithoutContentEdgeConstraints):
1558         (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition):
1559         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateLayersAfterViewportChange):
1560         (WebCore::ScrollingTreeFrameScrollingNodeMac::minimumScrollPosition):
1561         (WebCore::ScrollingTreeFrameScrollingNodeMac::maximumScrollPosition):
1562         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollBy):
1563         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollByWithoutContentEdgeConstraints):
1564         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateMainFramePinState):
1565         (WebCore::ScrollingTreeFrameScrollingNodeMac::logExposedUnfilledArea):
1566         (WebCore::logThreadedScrollingMode):
1567         (WebCore::logWheelEventHandlerCountChanged):
1568         * rendering/RenderLayerCompositor.cpp:
1569         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
1570
1571 2014-05-19  Simon Fraser  <simon.fraser@apple.com>
1572
1573         Images missing sometimes with composited clipping layers
1574         https://bugs.webkit.org/show_bug.cgi?id=133065
1575         <rdar://problem/15224559>
1576
1577         Reviewed by Beth Dakin.
1578         
1579         When support for solid colors on layers was added, a layer was considered a candidate
1580         for the solid color optimization without regard to whether it had descendent layers
1581         with "paintsIntoCompositedAncestor" requirements.
1582         
1583         Fix hasVisibleNonCompositingDescendantLayers(), renaming it to isPaintDestinationForDescendentLayers()
1584         and having it take into account whether descendent layers need to paint into an
1585         ancestor.
1586         
1587         Also, this test has to happen after those descendent layers have had their
1588         compositing state updated, so move the isSimpleContainerCompositingLayer() to
1589         a new updateAfterDescendents() function which is called from the various
1590         places we do compositing-udpate-tree-walks.
1591
1592         Test: compositing/backing/solid-color-with-paints-into-ancestor.html
1593
1594         * rendering/RenderLayerBacking.cpp:
1595         (WebCore::RenderLayerBacking::updateGeometry):
1596         (WebCore::RenderLayerBacking::updateAfterDescendents):
1597         (WebCore::RenderLayerBacking::paintsChildren):
1598         (WebCore::compositedWithOwnBackingStore):
1599         (WebCore::descendentLayerPaintsIntoAncestor):
1600         (WebCore::RenderLayerBacking::isPaintDestinationForDescendentLayers):
1601         (WebCore::hasVisibleNonCompositingDescendant): Deleted.
1602         (WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers): Deleted.
1603         * rendering/RenderLayerBacking.h:
1604         * rendering/RenderLayerCompositor.cpp:
1605         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
1606         (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
1607         (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
1608
1609 2014-05-19  Zalan Bujtas  <zalan@apple.com>
1610
1611         REGRESSION (r133351, sub-pixel layout): Right-to-left block with text-overflow: ellipsis truncates prematurely (breaks facebook.com Hebrew UI)
1612         https://bugs.webkit.org/show_bug.cgi?id=112227
1613
1614         Reviewed by Maciej Stachowiak.
1615
1616         This patch removes unnecessary integral snapping of inlines at layout time.
1617
1618         The general rule of thumb of using round/floor/ceil at layout time is to not use them.
1619  
1620         When some computed values (x, y, width, height) get snapped during layout, while others don't,
1621         intersecting/measuring mismatches could occur and they could end up producing visual artifacts such as truncations.
1622         This patch also enables iframe content to be positioned on odd device pixel positions on retina displays.
1623         
1624         Tests: fast/frames/hidpi-position-iframe-on-device-pixel.html
1625                fast/inline/hidpi-rtl-text-does-not-fit-line-and-gets-cut-off.html
1626
1627         * rendering/RenderBlock.h:
1628         (WebCore::RenderBlock::logicalLeftOffsetForLine):
1629         (WebCore::RenderBlock::pixelSnappedLogicalLeftOffsetForLine): Deleted.
1630         (WebCore::RenderBlock::pixelSnappedLogicalRightOffsetForLine): Deleted.
1631         * rendering/RenderBlockLineLayout.cpp:
1632         (WebCore::updateLogicalInlinePositions):
1633         (WebCore::RenderBlockFlow::deleteEllipsisLineBoxes):
1634         (WebCore::RenderBlockFlow::checkLinesForTextOverflow):
1635
1636 2014-05-18  Chris Fleizach  <cfleizach@apple.com>
1637
1638         AX: iOS: using AXAttributeCacheEnabler is too slow for every accessibilityElementAtIndex:
1639         https://bugs.webkit.org/show_bug.cgi?id=133043
1640
1641         Reviewed by Mario Sanchez Prada.
1642
1643         iOS Accessibility code tries to improve performance by caching attributes when accessing
1644         elements through the platform API. However, those API calls can be used very frequently when 
1645         iterating elements. Creating the AXAttributeCacheEnabler object and tearing it down is proving
1646         to be the hottest code path in samples for accessibility access.
1647
1648         We need to move the logic for enabling/disabling the attribute cache to a level that can make
1649         a more informed decision about when to enable/disable.
1650
1651         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1652         (-[WebAccessibilityObjectWrapper enableAttributeCaching]):
1653         (-[WebAccessibilityObjectWrapper disableAttributeCaching]):
1654         (-[WebAccessibilityObjectWrapper accessibilityElementCount]):
1655         (-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]):
1656         (-[WebAccessibilityObjectWrapper indexOfAccessibilityElement:]):
1657
1658 2014-05-18  Simon Fraser  <simon.fraser@apple.com>
1659
1660         Use RenderStyle& in more places in RenderLayerBacking
1661         https://bugs.webkit.org/show_bug.cgi?id=133061
1662
1663         Reviewed by Andreas Kling.
1664
1665         Convert several member functions to use references to RenderStyle rather
1666         than pointers. Move canCreateTiledImage() higher in the file (no code
1667         changes). Other minor cleanup.
1668
1669         * rendering/RenderLayerBacking.cpp:
1670         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
1671         (WebCore::RenderLayerBacking::updateOpacity):
1672         (WebCore::RenderLayerBacking::updateTransform):
1673         (WebCore::RenderLayerBacking::updateFilters):
1674         (WebCore::RenderLayerBacking::updateBlendMode):
1675         (WebCore::RenderLayerBacking::updateGeometry):
1676         (WebCore::hasBoxDecorations):
1677         (WebCore::canCreateTiledImage):
1678         (WebCore::hasBoxDecorationsOrBackgroundImage):
1679         (WebCore::hasPerspectiveOrPreserves3D):
1680         (WebCore::supportsDirectBoxDecorationsComposition):
1681         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
1682         (WebCore::RenderLayerBacking::contentChanged):
1683         (WebCore::RenderLayerBacking::startTransition):
1684         * rendering/RenderLayerBacking.h:
1685
1686 2014-05-17  Simon Fraser  <simon.fraser@apple.com>
1687
1688         Rename some RenderLayerBacking member functions
1689         https://bugs.webkit.org/show_bug.cgi?id=133030
1690
1691         Reviewed by Sam Weinig.
1692
1693         Remove "GraphicsLayer" from some member function names on RenderLayerBacking.
1694         
1695         No behavior change.
1696
1697         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1698         (WebCore::AVFWrapper::createAVCFVideoLayer):
1699         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1700         (WebCore::MediaPlayerPrivateQTKit::createQTMovieLayer):
1701         * rendering/RenderLayer.cpp:
1702         (WebCore::RenderLayer::calculateClipRects):
1703         * rendering/RenderLayerBacking.cpp:
1704         (WebCore::RenderLayerBacking::updateAfterLayout):
1705         (WebCore::RenderLayerBacking::updateConfiguration):
1706         (WebCore::RenderLayerBacking::updateGeometry):
1707         (WebCore::RenderLayerBacking::contentChanged):
1708         (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
1709         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): Deleted.
1710         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Deleted.
1711         * rendering/RenderLayerBacking.h:
1712         * rendering/RenderLayerCompositor.cpp:
1713         (WebCore::RenderLayerCompositor::updateLayerCompositingState):
1714         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
1715         (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
1716         (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
1717         (WebCore::RenderLayerCompositor::attachRootLayer):
1718
1719 2014-05-19  Antti Koivisto  <antti@apple.com>
1720
1721         Fix assertion failure with simple line layout debug borders enabled.
1722
1723         Rubber-stamped by Andreas Kling.
1724
1725         * rendering/SimpleLineLayoutFunctions.cpp:
1726         (WebCore::SimpleLineLayout::paintDebugBorders): We shoudn't try to paint empty rects.
1727
1728 2014-05-18  Andreas Kling  <akling@apple.com>
1729
1730         Reduce constructor copypasta in RenderText and RenderElement.
1731         <https://webkit.org/b/133056>
1732
1733         Use delegating constructors to remove duplicated initializer lists
1734         from the constructors of RenderText and RenderElement.
1735
1736         Reviewed by Anders Carlsson.
1737
1738         * rendering/RenderElement.cpp:
1739         (WebCore::RenderElement::RenderElement):
1740         * rendering/RenderElement.h:
1741         * rendering/RenderText.cpp:
1742         (WebCore::RenderText::RenderText):
1743         * rendering/RenderText.h:
1744
1745 2014-05-18  Brent Fulgham  <bfulgham@apple.com>
1746
1747         Crash during scroll when latched
1748         https://bugs.webkit.org/show_bug.cgi?id=133064
1749
1750         Reviewed by Simon Fraser.
1751
1752         * page/mac/EventHandlerMac.mm:
1753         (WebCore::EventHandler::platformPrepareForWheelEvents): Prevent dereference of NULL
1754         wheelEventTarget argument.
1755
1756 2014-05-18  Svetlana Redchenko  <redchenko@yandex-team.ru>
1757
1758         Input ::selection pseudo class does not work leading to hidden selection
1759         https://bugs.webkit.org/show_bug.cgi?id=38943
1760
1761         Reviewed by Darin Adler.
1762
1763         Test: fast/selectors/input-with-selection-pseudo-element.html
1764
1765         When text is selected inside input element, it should change the
1766         color and background color according to the ::selection pseudo element.
1767
1768         * rendering/RenderObject.cpp:
1769         (WebCore::RenderObject::selectionBackgroundColor):
1770         (WebCore::RenderObject::selectionColor):
1771         (WebCore::RenderObject::selectionPseudoStyle):
1772         * rendering/RenderObject.h:
1773
1774 2014-05-18  Sam Weinig  <sam@webkit.org>
1775
1776         [WebKit2] Implement ScriptMessageHandlers
1777         https://bugs.webkit.org/show_bug.cgi?id=133053
1778
1779         Reviewed by Anders Carlsson.
1780
1781         * DerivedSources.make:
1782         * WebCore.exp.in:
1783         * WebCore.xcodeproj/project.pbxproj:
1784         * bindings/js/JSDOMWindowBase.cpp:
1785         (WebCore::JSDOMWindowBase::finishCreation):
1786         * bindings/js/JSUserMessageHandlersNamespaceCustom.cpp: Added.
1787         (WebCore::JSUserMessageHandlersNamespace::getOwnPropertySlotDelegate):
1788         * page/DOMWindow.cpp:
1789         (WebCore::DOMWindow::shouldHaveWebKitNamespaceForWorld):
1790         (WebCore::DOMWindow::webkitNamespace):
1791         * page/DOMWindow.h:
1792         * page/UserContentController.cpp:
1793         (WebCore::UserContentController::addUserMessageHandlerDescriptor):
1794         (WebCore::UserContentController::removeUserMessageHandlerDescriptor):
1795         * page/UserContentController.h:
1796         (WebCore::UserContentController::userMessageHandlerDescriptors):
1797         * page/UserMessageHandler.cpp: Added.
1798         (WebCore::UserMessageHandler::UserMessageHandler):
1799         (WebCore::UserMessageHandler::~UserMessageHandler):
1800         (WebCore::UserMessageHandler::postMessage):
1801         (WebCore::UserMessageHandler::name):
1802         (WebCore::UserMessageHandler::world):
1803         * page/UserMessageHandler.h: Added.
1804         (WebCore::UserMessageHandler::create):
1805         * page/UserMessageHandler.idl: Added.
1806         * page/UserMessageHandlerDescriptor.cpp: Added.
1807         (WebCore::UserMessageHandlerDescriptor::UserMessageHandlerDescriptor):
1808         (WebCore::UserMessageHandlerDescriptor::~UserMessageHandlerDescriptor):
1809         (WebCore::UserMessageHandlerDescriptor::name):
1810         (WebCore::UserMessageHandlerDescriptor::world):
1811         * page/UserMessageHandlerDescriptor.h: Added.
1812         (WebCore::UserMessageHandlerDescriptor::Client::~Client):
1813         (WebCore::UserMessageHandlerDescriptor::create):
1814         (WebCore::UserMessageHandlerDescriptor::client):
1815         * page/UserMessageHandlerDescriptorTypes.h: Added.
1816         * page/UserMessageHandlersNamespace.cpp: Added.
1817         (WebCore::UserMessageHandlersNamespace::UserMessageHandlersNamespace):
1818         (WebCore::UserMessageHandlersNamespace::~UserMessageHandlersNamespace):
1819         (WebCore::UserMessageHandlersNamespace::handler):
1820         * page/UserMessageHandlersNamespace.h: Added.
1821         (WebCore::UserMessageHandlersNamespace::create):
1822         * page/UserMessageHandlersNamespace.idl: Added.
1823         * page/WebKitNamespace.cpp: Added.
1824         (WebCore::WebKitNamespace::WebKitNamespace):
1825         (WebCore::WebKitNamespace::~WebKitNamespace):
1826         (WebCore::WebKitNamespace::messageHandlers):
1827         * page/WebKitNamespace.h: Added.
1828         (WebCore::WebKitNamespace::create):
1829         * page/WebKitNamespace.idl: Added.
1830
1831 2014-05-18  Maciej Stachowiak  <mjs@apple.com>
1832
1833         REGRESSION (r156546): Default media controls are laid out incorrectly when media element is styled with direction:rtl
1834         https://bugs.webkit.org/show_bug.cgi?id=132531
1835         <rdar://problem/16806267>
1836         
1837         Reviewed by Mark Rowe.
1838
1839         This was already tested by the media/video-rtl.htm reftest, now unskipped.
1840
1841         * Modules/mediacontrols/mediaControlsApple.css:
1842         (audio::-webkit-media-controls-panel): Add missing direction: ltr
1843
1844 2014-05-18  Rik Cabanier  <cabanier@adobe.com>
1845
1846         support for navigator.hardwareConcurrency
1847         https://bugs.webkit.org/show_bug.cgi?id=132588
1848
1849         Reviewed by Filip Pizlo.
1850
1851         Added a new API that returns the number of CPU cores up to 8.
1852
1853         Test: fast/dom/navigator-hardwareConcurrency.html
1854
1855         * Configurations/FeatureDefines.xcconfig:
1856         * page/Navigator.cpp:
1857         (WebCore::Navigator::hardwareConcurrency):
1858         * page/Navigator.h:
1859         * page/Navigator.idl:
1860
1861 2014-05-18  Anders Carlsson  <andersca@apple.com>
1862
1863         Fix iOS build.
1864
1865         * WebCore.exp.in:
1866         Move UserContentController symbols to the right place.
1867
1868 2014-05-18  Jon Lee  <jonlee@apple.com>
1869
1870         Build fix for r169006.
1871
1872         Unreviewed.
1873
1874         * loader/ResourceLoader.h: Return didCreateQuickLookHandle() to public.
1875
1876 2014-05-18  Antti Koivisto  <antti@apple.com>
1877
1878         REGRESSION (r160259): text-combine glyphs are not rendered
1879         https://bugs.webkit.org/show_bug.cgi?id=127324
1880
1881         Reviewed by Andreas Kling.
1882         
1883         The original text gets overwritten by a change that is supposed to affect rendered text only.
1884         Fixed by giving the text update functions well-defined purposes.
1885
1886         Test: fast/text/text-combine-rendering.html
1887
1888         * rendering/RenderCombineText.cpp:
1889         (WebCore::RenderCombineText::styleDidChange):
1890         (WebCore::RenderCombineText::setRenderedText):
1891         (WebCore::RenderCombineText::combineText):
1892         (WebCore::RenderCombineText::setTextInternal): Deleted.
1893         * rendering/RenderCombineText.h:
1894         * rendering/RenderCounter.cpp:
1895         (WebCore::RenderCounter::computePreferredLogicalWidths):
1896         * rendering/RenderText.cpp:
1897         (WebCore::RenderText::setRenderedText):
1898         
1899             This function now updates the rendered text but does not change the original.
1900             Get the original text by calling originalText().
1901
1902         (WebCore::RenderText::setText):
1903         
1904             This the only place original text now changes.
1905
1906         (WebCore::RenderText::setTextInternal): Deleted.
1907         
1908             Renamed to setRenderedText.
1909
1910         * rendering/RenderText.h:
1911         * rendering/svg/RenderSVGInlineText.cpp:
1912         (WebCore::RenderSVGInlineText::setRenderedText):
1913         (WebCore::RenderSVGInlineText::setTextInternal): Deleted.
1914         * rendering/svg/RenderSVGInlineText.h:
1915
1916 2014-05-17  Maciej Stachowiak  <mjs@apple.com>
1917
1918         Don't attempt to update id or name for nodes that are already removed
1919         https://bugs.webkit.org/show_bug.cgi?id=133041
1920
1921         Reviewed by Sam Weinig.
1922
1923         Tests: fast/dom/remove-element-with-id-that-was-inserted-on-DOMNodeRemoved.html
1924                fast/dom/remove-element-with-name-that-was-inserted-on-DOMNodeRemoved.html
1925
1926         * dom/Element.cpp:
1927         (WebCore::Element::removedFrom): Skip updating ids and names for an element not
1928         in a treescope, as we already do for elements not in a document.
1929
1930 2014-05-17  Alexey Proskuryakov  <ap@apple.com>
1931
1932         REGRESSION (NetworkProcess): Trying to use appcache fallback crashes in ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache
1933         https://bugs.webkit.org/show_bug.cgi?id=133007
1934         <rdar://problem/13702706>
1935
1936         appcache tests often fail on the Mac WebKit2 bot
1937         https://bugs.webkit.org/show_bug.cgi?id=82061
1938
1939         Reviewed by Maciej Stachowiak.
1940
1941         Covered by existing tests, which this patch enables.
1942
1943         * WebCore.exp.in: Export ResourceLoader::cancel(const ResourceError&). It used
1944         to be virtual, but marking subclasses final has resulted in the compiler calling
1945         it directly from WebKitLegacy framework. Seeing that no subclass overrides it,
1946         I then made it non-virtual.
1947         Also export ApplicationCacheHost functions that are now used from WebKit2.
1948
1949         * loader/ResourceLoader.h: Made the class abstract (as I didn't realize at first
1950         that it's always either a SubresourceLoader or a NetscapePlugInStreamLoader).
1951         Made ResourceHandleClient functions private, as they should never be called other
1952         than via a ResourceHandleClient pointer.
1953
1954         * loader/NetscapePlugInStreamLoader.h:
1955         * loader/SubresourceLoader.h:
1956         Marked these final.
1957
1958         * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::willSwitchToSubstituteResource):
1959         Added a function to be called when switching to a substitute resource. We still
1960         need a ResourceLoader at this point, as substitute resource will be delivered through
1961         it, but we don't want it to continue its current load.
1962
1963         * loader/appcache/ApplicationCacheHost.cpp:
1964         (WebCore::ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache):
1965         Call the ResourceLoader function instead of using handle, which is null when
1966         using out of process networking.
1967
1968 2014-05-17  Andreas Kling  <akling@apple.com>
1969
1970         We shouldn't make a ScrollingThread on iOS.
1971         <https://webkit.org/b/133038>
1972         <rdar://problem/16947589>
1973
1974         Don't call ScrollingThred::dispatch() from the pressure relief
1975         code on iOS since that will end up instantiating a scrolling thread
1976         which we'd otherwise never have.
1977
1978         Reviewed by Sam Weinig.
1979
1980         * platform/MemoryPressureHandler.cpp:
1981         (WebCore::MemoryPressureHandler::releaseMemory):
1982
1983 2014-05-17  Piotr Grad  <p.grad@samsung.com>
1984
1985         Setting playback rate on video with media controller is not ignored.
1986         https://bugs.webkit.org/show_bug.cgi?id=129048
1987
1988         Reviewed by Jer Noble.
1989
1990         Replaced queries for m_playbackRate with effectivePlaybackRate()
1991         which includes media controller playback rate.
1992
1993         Test: media/video-controller-child-rate.html
1994
1995         * html/HTMLMediaElement.cpp:
1996         (WebCore::HTMLMediaElement::parseAttribute):
1997         * html/HTMLMediaElement.h:
1998
1999 2014-05-16  Anders Carlsson  <andersca@apple.com>
2000
2001         Expose WKUserScript as API
2002         https://bugs.webkit.org/show_bug.cgi?id=133017
2003         <rdar://problem/16948059>
2004
2005         Reviewed by Sam Weinig.
2006
2007         * WebCore.exp.in:
2008         Export symbols.
2009
2010         * WebCore.xcodeproj/project.pbxproj:
2011         Change UserContentController.h to be a private header.
2012
2013         * page/Page.cpp:
2014         (WebCore::Page::Page):
2015         Set m_userContentController from the page configuration and add it if it's not null.
2016
2017         * page/Page.h:
2018         Add UserContentController to PageClients.
2019
2020         * page/PageGroup.cpp:
2021         (WebCore::PageGroup::addPage):
2022         Only try to add a user content controller if the page doesn't already have one.
2023
2024         (WebCore::PageGroup::removePage):
2025         Only try to remove the user content controller if it's the group one.
2026
2027 2014-05-17  Andreas Kling  <akling@apple.com>
2028
2029         REGRESSION (r166422): All RenderBox objects grew 104 bytes from adding repaint timers.
2030         <https://webkit.org/b/133027>
2031         <rdar://problem/16867410>
2032
2033         Instead of storing a rarely-used repaint timer on every RenderBox, store one
2034         on the RenderView, and keep a hash set of renderers needing repaint.
2035
2036         Renderers get a flag tracking whether they have a pending lazy repaint.
2037         This way we can avoid hash lookups in the common case.
2038
2039         Also added a static assertion to catch RenderBox growing in the future.
2040
2041         Reviewed by Antti Koivisto.
2042
2043         * rendering/RenderBox.cpp:
2044         (WebCore::SameSizeAsRenderBox::~SameSizeAsRenderBox):
2045         (WebCore::RenderBox::RenderBox):
2046         (WebCore::RenderBox::~RenderBox):
2047         (WebCore::RenderBox::paintBoxDecorations):
2048         (WebCore::RenderBox::layoutOverflowRectForPropagation):
2049         * rendering/RenderBox.h:
2050         * rendering/RenderElement.cpp:
2051         (WebCore::RenderElement::RenderElement):
2052         * rendering/RenderElement.h:
2053         (WebCore::RenderElement::setRenderBoxNeedsLazyRepaint):
2054         (WebCore::RenderElement::renderBoxNeedsLazyRepaint):
2055         * rendering/RenderView.cpp:
2056         (WebCore::RenderView::RenderView):
2057         (WebCore::RenderView::scheduleLazyRepaint):
2058         (WebCore::RenderView::unscheduleLazyRepaint):
2059         (WebCore::RenderView::lazyRepaintTimerFired):
2060         * rendering/RenderView.h:
2061
2062 2014-05-16  Jer Noble  <jer.noble@apple.com>
2063
2064         [Mac][MSE] setCurrentTime() goes down fastSeek path in MediaPlayerPrivateMediaSourceAVFObjC.
2065         https://bugs.webkit.org/show_bug.cgi?id=133023
2066
2067         Reviewed by Eric Carlson.
2068
2069         When seeking a MSE video, do not go down the fastSeekForMediaTime() path if the
2070         seek resulted from a setCurrentTime() call. The logic can lead to attempted seeks
2071         before buffered ranges.
2072
2073         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2074         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
2075         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
2076         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
2077         (WebCore::MediaSourcePrivateAVFObjC::seekToTime):
2078
2079 2014-05-16  Benjamin Poulain  <bpoulain@apple.com>
2080
2081         [iOS] ScrollView::visibleContentRectInternal is bypassing the iOS code for unobscuredContentRect
2082         https://bugs.webkit.org/show_bug.cgi?id=133008
2083
2084         Reviewed by Simon Fraser.
2085
2086         * platform/ScrollView.cpp:
2087         (WebCore::ScrollView::visibleContentRectInternal):
2088         ScrollView::visibleContentRectInternal() was calling the internal implementation of visibleContentRect().
2089         That was skipping the iOS implementation and getting the framerect directly. That size is invalid on iOS
2090         when the exposed rect and unobscured rect are not the same.
2091
2092 2014-05-16  Jer Noble  <jer.noble@apple.com>
2093
2094         [Mac] naturalSize not updated when preload=metadata
2095         https://bugs.webkit.org/show_bug.cgi?id=132994
2096
2097         Reviewed by Eric Carlson.
2098
2099         Test: media/video-load-preload-metadata-naturalsize.html
2100
2101         When preload=metadata, we never create an AVPlayerItem, and therefore never receive a
2102         presentationSize KVO. When an AVAsset informs us that its tracks have changed, and there
2103         is no AVPlayerItem, recalculate presentation size based on the first video track's natural
2104         size.
2105
2106         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2107         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
2108         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2109         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
2110
2111 2014-05-16  Simon Fraser  <simon.fraser@apple.com>
2112
2113         Remove "region-based columns" prefs
2114         https://bugs.webkit.org/show_bug.cgi?id=133006
2115         <rdar://problem/16945824>
2116
2117         Reviewed by Dave Hyatt.
2118
2119         Remove "region-based columns" prefs and related code, since this is only
2120         way to render columns now.
2121
2122         * page/Settings.in:
2123
2124 2014-05-16  Antti Koivisto  <antti@apple.com>
2125
2126         Link search area for touch events is too large in some cases
2127         https://bugs.webkit.org/show_bug.cgi?id=132988
2128         <rdar://problem/16917843>
2129
2130         Reviewed by Simon Fraser.
2131
2132         * page/ios/FrameIOS.mm:
2133         (WebCore::Frame::qualifyingNodeAtViewportLocation):
2134         
2135             - Adjust the search area to screen ppi.
2136             - Remove cut-off at scale 1. This made us pick physically far-away elements when zoomed in.
2137             
2138         * platform/PlatformScreen.h:
2139         * platform/ios/PlatformScreenIOS.mm:
2140         (WebCore::mobileGestaltFloatValue):
2141         (WebCore::screenPPIFactor):
2142
2143             Figure out screens physical PPI relative to a base.
2144
2145 2014-05-16  Jer Noble  <jer.noble@apple.com>
2146
2147         [MSE] Crash at  WebCore::SourceBuffer::~SourceBuffer + 110
2148         https://bugs.webkit.org/show_bug.cgi?id=132973
2149
2150         Reviewed by Eric Carlson.
2151
2152         Change SourceBuffer::m_private into a Ref<>, and add an assertion to
2153         SourceBufferPrivateAVFObjC's destructor if its client has not been cleared.
2154
2155         Eliminate unnecessary churn in MediaSourcePrivateAVFObjC by having the predicate
2156         functor take bare pointers, rather than a PassRefPtr.
2157
2158         The underlying problem seems to be in WebAVStreamDataParserListener. RefPtrs were
2159         being created off the main thread to a non-thread safe ref counted class. In some
2160         situations, this would result in double decrementing the ref, which would cause an
2161         early destruction of the underlying object. Instead replace these RefPtr strong
2162         pointers with explicit weak ones. Ensure the parser and its delegate are not freed
2163         before the append operation completes by passing strong pointers into the async
2164         append operation lambda.
2165
2166         There were a few places where we weren't null checking m_mediaSource before using it,
2167         and at least one place where we weren't clearing m_mediaSource.
2168
2169         * Modules/mediasource/SourceBuffer.cpp:
2170         (WebCore::SourceBuffer::SourceBuffer): Use Ref instead of RefPtr.
2171         (WebCore::SourceBuffer::appendBufferTimerFired): Ditto.
2172         * Modules/mediasource/SourceBuffer.h:
2173         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
2174         (WebCore::MediaSourcePrivateAVFObjCHasAudio): Take a bare pointer, instead of a PassRefPtr.
2175         (WebCore::MediaSourcePrivateAVFObjCHasVideo): Ditto.
2176         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
2177         (WebCore::MediaSourcePrivateAVFObjC::removeSourceBuffer): Clear the back pointer when removing a buffer.
2178         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
2179         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2180         (-[WebAVStreamDataParserListener initWithParser:parent:WebCore::]): Use WeakPtr instead of RefPtr.
2181         (-[WebAVStreamDataParserListener invalidate]): Ditto.
2182         (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:]): Ditto.
2183         (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:withDiscontinuity:]): Ditto.
2184         (-[WebAVStreamDataParserListener streamDataParser:didFailToParseStreamDataWithError:]): Ditto.
2185         (-[WebAVStreamDataParserListener streamDataParser:didProvideMediaData:forTrackID:mediaType:flags:]): Ditto.
2186         (-[WebAVStreamDataParserListener streamDataParser:didReachEndOfTrackWithTrackID:mediaType:]): Ditto.
2187         (-[WebAVStreamDataParserListener streamDataParser:didProvideContentKeyRequestInitializationData:forTrackID:]): Ditto.
2188         (WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
2189         (WebCore::SourceBufferPrivateAVFObjC::append): Ditto.
2190
2191 2014-05-16  Zalan Bujtas  <zalan@apple.com>
2192
2193         Subpixel rendering: Push named flows in region to device pixel when painting.
2194         https://bugs.webkit.org/show_bug.cgi?id=132986
2195
2196         Reviewed by Simon Fraser.
2197
2198         Remove integral rounding when named flow sets the painting offset on the graphics context.
2199         Use device pixel snapping instead to ensure that we can paint on odd device pixel positions on retina displays. 
2200
2201         Test: fast/regions/hidpi-region-with-auto-margin-on-subpixel-position.html
2202
2203         * rendering/RenderLayer.cpp:
2204         (WebCore::RenderLayer::calculateClipRects):
2205
2206 2014-05-16  Radu Stavila  <stavila@adobe.com>
2207
2208         [CSS Regions] Add ASSERT to make sure using the flowThread cache does not return incorrect results
2209         https://bugs.webkit.org/show_bug.cgi?id=132906
2210
2211         Reviewed by Simon Fraser.
2212
2213         If flowThreadContainingBlock() is called on an object which is in a different
2214         flow thread than the one currently being laid out, this method will return an incorrect
2215         result. I added an assertion for that to make sure we catch and treat any such scenarios.
2216         For the moment, this assertion is only validated for regions, as multicol still has some issues.
2217
2218         No new tests required.
2219
2220         * rendering/RenderObject.cpp:
2221         (WebCore::RenderObject::locateFlowThreadContainingBlockNoCache):
2222         (WebCore::RenderObject::locateFlowThreadContainingBlock):
2223         * rendering/RenderObject.h:
2224
2225 2014-05-16  Martin Hock  <mhock@apple.com>
2226
2227         MemoryCache::addImageToCache should return the result of add().
2228         https://bugs.webkit.org/show_bug.cgi?id=132928
2229         <rdar://problem/16651547>
2230
2231         Reviewed by Alexey Proskuryakov.
2232
2233         API test: WebKit1.MemoryCacheADdImageToCache (MemoryCacheAddImageToCacheIOS.mm)
2234
2235         * loader/cache/MemoryCache.cpp:
2236         (WebCore::MemoryCache::addImageToCache):
2237
2238 2014-05-16  Andrei Bucur  <abucur@adobe.com>
2239
2240         [CSS Regions] Reduce the RenderRegion invasiveness in rendering code
2241         https://bugs.webkit.org/show_bug.cgi?id=132121
2242
2243         Reviewed by Antti Koivisto.
2244
2245         Remove the RenderRegion / RenderNamedFlowFragment parameters and fields from
2246         the painting / hit testing data structures and use a stateful approach to
2247         correctly handle regions.
2248
2249         When painting or hit testing, the current flow thread is saved along the current
2250         region. They are accessed through the |currentRenderNamedFlowFragment| helper
2251         method on RenderObject or RenderLayer.
2252
2253         The patch also changes a bunch of 0s to nullptrs.
2254
2255         Tests: No new tests, no functional change.
2256
2257         * html/shadow/MediaControlElements.cpp:
2258         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
2259         * rendering/HitTestLocation.cpp:
2260         (WebCore::HitTestLocation::HitTestLocation):
2261         (WebCore::HitTestLocation::operator=):
2262         * rendering/HitTestLocation.h:
2263         (WebCore::HitTestLocation::region): Deleted.
2264         * rendering/HitTestResult.h:
2265         * rendering/PaintInfo.h:
2266         (WebCore::PaintInfo::PaintInfo):
2267         * rendering/RenderBlock.cpp:
2268         (WebCore::RenderBlock::paint):
2269         (WebCore::RenderBlock::paintObject):
2270         (WebCore::RenderBlock::selectionGaps):
2271         (WebCore::RenderBlock::nodeAtPoint):
2272         * rendering/RenderBox.cpp:
2273         (WebCore::RenderBox::nodeAtPoint):
2274         (WebCore::RenderBox::paintBoxDecorations):
2275         (WebCore::RenderBox::pushContentsClip):
2276         * rendering/RenderBoxModelObject.cpp:
2277         (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
2278         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2279         * rendering/RenderBoxModelObject.h:
2280         * rendering/RenderLayer.cpp:
2281         (WebCore::RenderLayer::paint):
2282         (WebCore::RenderLayer::paintLayer):
2283         (WebCore::RenderLayer::paintLayerContents):
2284         (WebCore::RenderLayer::paintLayerByApplyingTransform):
2285         (WebCore::RenderLayer::collectFragments):
2286         (WebCore::RenderLayer::updatePaintingInfoForFragments):
2287         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
2288         (WebCore::RenderLayer::paintBackgroundForFragments):
2289         (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
2290         (WebCore::RenderLayer::paintOutlineForFragments):
2291         (WebCore::RenderLayer::paintMaskForFragments):
2292         (WebCore::RenderLayer::hitTest):
2293         (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
2294         (WebCore::RenderLayer::hitTestLayer):
2295         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
2296         (WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
2297         (WebCore::RenderLayer::calculateClipRects):
2298         * rendering/RenderLayer.h:
2299         * rendering/RenderLayerBacking.cpp:
2300         (WebCore::RenderLayerBacking::updateCompositedBounds):
2301         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2302         * rendering/RenderLayerCompositor.cpp:
2303         (WebCore::RenderLayerCompositor::addToOverlapMap):
2304         (WebCore::RenderLayerCompositor::clippedByAncestor):
2305         * rendering/RenderObject.cpp:
2306         (WebCore::RenderObject::currentRenderNamedFlowFragment):
2307         * rendering/RenderObject.h:
2308         * rendering/RenderReplaced.cpp:
2309         (WebCore::RenderReplaced::shouldPaint):
2310         * rendering/RenderReplica.cpp:
2311         (WebCore::RenderReplica::paint):
2312         * rendering/RenderTable.cpp:
2313         (WebCore::RenderTable::nodeAtPoint):
2314         * rendering/RenderTableSection.cpp:
2315         (WebCore::RenderTableSection::nodeAtPoint):
2316         * rendering/RenderTreeAsText.cpp:
2317         (WebCore::writeLayers):
2318         * rendering/RootInlineBox.cpp:
2319         (WebCore::RootInlineBox::paint):
2320         * rendering/svg/RenderSVGRoot.cpp:
2321         (WebCore::RenderSVGRoot::paintReplaced):
2322
2323 2014-05-16  Kiran  <kiran.guduru@samsung.com>
2324
2325         RTCDtmfSender default values need to be updated.
2326         https://bugs.webkit.org/show_bug.cgi?id=132952
2327
2328         Reviewed by Eric Carlson.
2329
2330         The default ToneDuration and ToneGap values are modified in the updated spec.
2331         So these values need to be updated.
2332
2333         Test: fast/mediastream/RTCPeerConnection-dtmf.html.
2334
2335         * Modules/mediastream/RTCDTMFSender.cpp:
2336
2337 2014-05-15  Daniel Bates  <dabates@apple.com>
2338
2339         Attempt to fix the Apple Mavericks Release, Apple MountainLion Release,
2340         Apple MountainLion Release (32-bit Build), EFL, and GTK builds following
2341         <http://trac.webkit.org/changeset/168921> (https://bugs.webkit.org/show_bug.cgi?id=132669)
2342
2343         * dom/ContainerNode.cpp: Include SVGElement.h for the definition of Node::hasTagName(const SVGQualifiedName&).
2344
2345 2014-05-15  Daniel Bates  <dabates@apple.com>
2346
2347         ASSERT_NOT_REACHED() in DocumentOrderedMap::get() when removing SVG subtree
2348         https://bugs.webkit.org/show_bug.cgi?id=132669
2349         <rdar://problem/14931432>
2350
2351         Reviewed by Brent Fulgham and Ryosuke Niwa.
2352
2353         Fixes an assertion failure when removing an SVG element with a duplicate id.
2354
2355         When removing an SVG element with id A we synchronously instruct each element that references A
2356         to find the first element with id A, call this N, from the document root and register itself to
2357         either receive subsequent notifications from N (say, there is another element with id A) or as
2358         waiting for an element with id A (say, N = nullptr; => we removed the last element with id A from
2359         the document). Because the elements that reference A perform this operation synchronously when
2360         removing an element they consult an transient state of the DocumentOrderedMap when querying for the
2361         element with id A.
2362     
2363         Without loss of generality, let E, E_1, E_2, and E_3 be elements, where E_1, E_2, E_3 are children
2364         of E in that order and E_1.id = E_2.id = A and E_3.href = #A (that is, it references an element
2365         with id A). Suppose we remove E then we remove E_1, update DocumentOrderedMap to decrement its count
2366         for id A, and notify E_3 to look for an element with id A. This leads to an assertion failure since
2367         DocumentOrderedMap expects to find an element with id A, E_2, but cannot find such an element when
2368         traversing from the document root because E was unlinked from the document root (i.e. E_2 is in a
2369         disjoint subtree).
2370
2371         Tests: svg/custom/change-id-of-use-during-removal.html
2372                svg/custom/remove-subtree-including-path-with-duplicate-id-referenced-by-later-textpath.html
2373                svg/custom/remove-subtree-including-text-with-duplicate-id-referenced-by-later-tref.html
2374                svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-earlier-use.html
2375                svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-animate.html
2376                svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-feimage.html
2377                svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-mpath.html
2378                svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use.html
2379                svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use2.html
2380                svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-in-different-subtree.html
2381                svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-with-duplicate-id-in-different-subtree.html
2382                svg/custom/remove-use-with-duplicate-id-referenced-by-later-use.html
2383
2384         * dom/ContainerNode.cpp:
2385         (WebCore::ContainerNode::removeChild): Call SVGDocumentExtensions::rebuildElements() after we remove
2386         a DOM subtree so that applicable SVG elements can update their referenced element when the DocumentOrderedMap
2387         is in a stable-state.
2388         (WebCore::ContainerNode::removeChildren): Ditto.
2389         * svg/SVGDocumentExtensions.cpp:
2390         (WebCore::SVGDocumentExtensions::rebuildElements): Added; notifies SVG elements that their href attribute
2391         changed so that they query the DocumentOrderedMap for the element they reference by id in their href attribute.
2392         (WebCore::SVGDocumentExtensions::clearTargetDependencies): Added; Called from removing
2393         an SVG element S from the DOM. Appends all elements that reference the id of S to the end of a Vector of
2394         elements to be rebuilt (when SVGDocumentExtensions::rebuildElements() is called) and notifies these elements
2395         that have been marked to be rebuilt so that they can invalidate their state (e.g. stop animating).
2396         (WebCore::SVGDocumentExtensions::rebuildAllElementReferencesForTarget): Changed to take its argument by reference
2397         (since it's always non-null) and simplified logic to synchronously notify SVG updates that their referenced element
2398         may have changed. Calling SVGElement::svgAttributeChanged() on an element E should at most remove the dependencies
2399         of E.
2400         * svg/SVGDocumentExtensions.h:
2401         * svg/SVGElement.cpp:
2402         (WebCore::SVGElement::~SVGElement): Substitute "*this" for "this" as SVGDocumentExtensions::rebuildAllElementReferencesForTarget()
2403         now takes a reference instead of a pointer.
2404         (WebCore::SVGElement::removedFrom): Modified to call SVGDocumentExtensions::clearTargetDependencies().
2405         (WebCore::SVGElement::attributeChanged): Substitute "*this" for "this" as SVGDocumentExtensions::rebuildAllElementReferencesForTarget()
2406         now takes a reference instead of a pointer.
2407         * svg/SVGElement.h:
2408         (WebCore::SVGElement::callClearTarget): Added; calls through to private virtual SVGElement::clearTarget().
2409         (WebCore::SVGElement::clearTarget): Added.
2410         * svg/SVGTRefElement.cpp:
2411         (WebCore::SVGTRefElement::clearTarget): Added.
2412         * svg/SVGTRefElement.h:
2413         * svg/animation/SVGSMILElement.cpp:
2414         (WebCore::SVGSMILElement::clearTarget): Added.
2415         * svg/animation/SVGSMILElement.h:
2416
2417 2014-05-15  Simon Fraser  <simon.fraser@apple.com>
2418
2419         [iOS WK2] When zoomed, fixed elements jump at the start of a scroll, and jump back at the end.
2420         https://bugs.webkit.org/show_bug.cgi?id=132978
2421         <rdar://problem/16894428>
2422
2423         Reviewed by Benjamin Poulain.
2424
2425         This was the actual cause of the bug; r168560 changed the rect passed in here
2426         to be the customFixedPositionRect rather than the unobscured rect, but we
2427         used it to call FrameView::rectForViewportConstrainedObjects() which gave back
2428         another bogus rect. So just use the rect passed in.
2429
2430         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm:
2431         (WebCore::ScrollingTreeScrollingNodeIOS::updateLayersAfterViewportChange):
2432
2433 2014-05-15  Daniel Bates  <dabates@apple.com>
2434
2435         SVG element may reference arbitrary DOM element before running its insertion logic
2436         https://bugs.webkit.org/show_bug.cgi?id=132757
2437         <rdar://problem/15703817>
2438
2439         Reviewed by Ryosuke Niwa.
2440
2441         Fixes an issue where an SVG element may reference an arbitrary DOM element e before e finished being
2442         inserted in the tree.
2443
2444         Currently when an SVG element A is inserted into a document we use document.getElementById() to find the
2445         element B it references (if any). If A is inserted before B and B has the same id as a later element in
2446         the document then A can find B before B is notified that its been inserted into the document (i.e. before
2447         Element::insertedFrom() is called on B). Instead, A should call document.getElementById() only after
2448         cessation of the insertion operation that inserted it to ensure that all inserted nodes (including B)
2449         processed their insertion-specific logic.
2450
2451         Tests: svg/custom/reparent-animate-element.html
2452                svg/custom/reparent-feimage-element.html
2453                svg/custom/reparent-mpath-element.html
2454                svg/custom/reparent-textpath-element.html
2455                svg/custom/reparent-tref-element.html
2456                svg/custom/reparent-use-element.html
2457
2458         * svg/SVGFEImageElement.cpp:
2459         (WebCore::SVGFEImageElement::insertedInto): Return InsertionShouldCallDidNotifySubtreeInsertions so that
2460         we are called back to resolve our target element (i.e. call SVGFEImageElement::buildPendingResources())
2461         after the subtree we're in is inserted.
2462         (WebCore::SVGFEImageElement::didNotifySubtreeInsertions): Added; turns around and calls SVGFEImageElement::buildPendingResources().
2463         * svg/SVGFEImageElement.h:
2464         * svg/SVGMPathElement.cpp:
2465         (WebCore::SVGMPathElement::insertedInto): Return InsertionShouldCallDidNotifySubtreeInsertions so that
2466         we are called back to resolve our target element (i.e. call SVGMPathElement::buildPendingResources())
2467         after the subtree we're in is inserted.
2468         (WebCore::SVGMPathElement::didNotifySubtreeInsertions): Added; turns around and calls SVGMPathElement::buildPendingResources().
2469         * svg/SVGMPathElement.h:
2470         * svg/SVGTRefElement.cpp:
2471         (WebCore::SVGTRefElement::insertedInto): Return InsertionShouldCallDidNotifySubtreeInsertions so that
2472         we are called back to resolve our target element (i.e. call SVGTRefElement::buildPendingResources())
2473         after the subtree we're in is inserted.
2474         (WebCore::SVGTRefElement::didNotifySubtreeInsertions): Added; turns around and calls SVGTRefElement::buildPendingResources().
2475         * svg/SVGTRefElement.h:
2476         * svg/SVGTextPathElement.cpp:
2477         (WebCore::SVGTextPathElement::insertedInto): Return InsertionShouldCallDidNotifySubtreeInsertions so that
2478         we are called back to resolve our target element (i.e. call SVGTextPathElement::buildPendingResources())
2479         after the subtree we're in is inserted.
2480         (WebCore::SVGTextPathElement::didNotifySubtreeInsertions): Added; turns around and calls SVGTextPathElement::buildPendingResources().
2481         * svg/SVGTextPathElement.h:
2482         * svg/SVGUseElement.cpp:
2483         (WebCore::SVGUseElement::insertedInto): Return InsertionShouldCallDidNotifySubtreeInsertions so that
2484         we are called back to resolve our target element (i.e. call SVGUseElement::buildPendingResources()) after its subtree is
2485         inserted.
2486         (WebCore::SVGUseElement::didNotifySubtreeInsertions): Added; turns around and calls SVGUseElement::buildPendingResources().
2487         * svg/SVGUseElement.h:
2488         * svg/animation/SVGSMILElement.cpp:
2489         (WebCore::SVGSMILElement::insertedInto): Return InsertionShouldCallDidNotifySubtreeInsertions so that
2490         we are called back to resolve our target element (i.e. call SVGSMILElement::buildPendingResources())
2491         after the subtree we're in is inserted.
2492         (WebCore::SVGSMILElement::didNotifySubtreeInsertions): Added; turns around and calls SVGSMILElement::buildPendingResources().
2493         * svg/animation/SVGSMILElement.h:
2494
2495 2014-05-15  Mark Hahnenberg  <mhahnenberg@apple.com>
2496
2497         JSDOMWindow should not claim HasImpureGetOwnPropertySlot
2498         https://bugs.webkit.org/show_bug.cgi?id=132918
2499
2500         Reviewed by Geoffrey Garen.
2501
2502         Tests: js/cached-window-properties.html
2503                js/cached-window-prototype-properties.html
2504
2505         We now correctly handle the impurity of JSDOMWindow's custom getOwnPropertySlot without needing the 
2506         blanket HasImpureGetOwnPropertySlot. We do this through the use of watchpoints and by explicitly forbidding
2507         any caching beyond a certain point using PropertySlot::disableCaching. Getting rid of this flag will allow 
2508         us to cache many properties/methods on both the JSDOMWindow and its prototype, which are very commonly used 
2509         across the web.
2510
2511         * bindings/js/JSDOMWindowCustom.cpp:
2512         (WebCore::JSDOMWindow::getOwnPropertySlot):
2513         * bindings/scripts/CodeGeneratorJS.pm:
2514         (HasComplexGetOwnProperty):
2515         (InterfaceRequiresAttributesOnInstance):
2516         (InstanceOverridesGetOwnPropertySlot):
2517         (GenerateHeader):
2518
2519 2014-05-15  Alexey Proskuryakov  <ap@apple.com>
2520
2521         NetworkProcess crashes at ResourceHandle::continueDidReceiveResponse
2522         https://bugs.webkit.org/show_bug.cgi?id=132966
2523         <rdar://problem/16373694>
2524
2525         Reviewed by Brady Eidson.
2526
2527         Covered by many fast/files tests.
2528
2529         * platform/network/BlobResourceHandle.cpp: (WebCore::BlobResourceHandle::continueDidReceiveResponse):
2530         * platform/network/BlobResourceHandle.h:
2531         * platform/network/ResourceHandle.h:
2532         Don't call delegate's continueDidReceiveResponse when loading a blob:// URL,
2533         the delegate is null. On the Mac, we used to lazily create it, which was also wrong,
2534         but at least not observable.
2535
2536 2014-05-15  Commit Queue  <commit-queue@webkit.org>
2537
2538         Unreviewed, rolling out r168899.
2539         https://bugs.webkit.org/show_bug.cgi?id=132965
2540
2541         Broke some compositing regions tests on Mavericks (Requested
2542         by mihnea___ on #webkit).
2543
2544         Reverted changeset:
2545
2546         "[CSS Regions] Reduce the RenderRegion invasiveness in
2547         rendering code"
2548         https://bugs.webkit.org/show_bug.cgi?id=132121
2549         http://trac.webkit.org/changeset/168899
2550
2551 2014-05-15  Alex Christensen  <achristensen@webkit.org>
2552
2553         Add pointer lock to features without enabling it.
2554         https://bugs.webkit.org/show_bug.cgi?id=132961
2555
2556         Reviewed by Sam Weinig.
2557
2558         * Configurations/FeatureDefines.xcconfig:
2559         Added ENABLE_POINTER_LOCK to list of features.
2560         * WebCore.exp.in:
2561         Added linker symbols which differ with pointer lock enabled.
2562         * WebCore.xcodeproj/project.pbxproj:
2563         Added PointerLockController.cpp to build.
2564
2565 2014-05-15  Mark Hahnenberg  <mhahnenberg@apple.com>
2566
2567         Move subframe name getter lookup later in JSDOMWindow::getOwnPropertySlot
2568         https://bugs.webkit.org/show_bug.cgi?id=132922
2569
2570         Reviewed by Geoffrey Garen.
2571
2572         No new tests.
2573
2574         In JSDOMWindow::getOwnPropertySlot, we currently look for the property on the JSDOMWindow, 
2575         then we search the window's subframes for name getters, then we look in the window's prototype 
2576         chain. Apparently we were doing the lookup in this order to be compatible with Mozilla, but 
2577         Mozilla no longer implements this behavior. Instead, they do the lookup on the prototype before 
2578         looking for subframe name getters. We should change this to match Mozilla. This has the convenient 
2579         side effect of allowing us to cache lookups in the window's prototype chain.
2580
2581         * bindings/js/JSDOMWindowCustom.cpp:
2582         (WebCore::JSDOMWindow::getOwnPropertySlot):
2583
2584 2014-05-15  Simon Fraser  <simon.fraser@apple.com>
2585
2586         [UI-side compositing] Fix copying animations between layers, and pausing them
2587         https://bugs.webkit.org/show_bug.cgi?id=132943
2588         <rdar://problem/16906369&16906541>
2589
2590         Reviewed by Tim Horton.
2591
2592         Pass the animation key back to animationStarted(), though this isn't used
2593         when animations are running in-process.
2594
2595         * platform/graphics/ca/PlatformCALayer.h:
2596         * platform/graphics/ca/mac/PlatformCALayerMac.h:
2597         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2598         (-[WebAnimationDelegate animationDidStart:]):
2599         (PlatformCALayerMac::animationStarted):
2600         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2601         (PlatformCALayerWin::animationStarted):
2602         * platform/graphics/ca/win/PlatformCALayerWin.h:
2603
2604 2014-05-15  Andrei Bucur  <abucur@adobe.com>
2605
2606         [CSS Regions] Reduce the RenderRegion invasiveness in rendering code
2607         https://bugs.webkit.org/show_bug.cgi?id=132121
2608
2609         Reviewed by Antti Koivisto.
2610
2611         Remove the RenderRegion / RenderNamedFlowFragment parameters and fields from
2612         the painting / hit testing data structures and use a stateful approach to
2613         correctly handle regions.
2614
2615         When painting or hit testing, the current flow thread is saved along the current
2616         region. They are accessed through the |currentRenderNamedFlowFragment| helper
2617         method on RenderObject or RenderLayer.
2618
2619         The patch also changes a bunch of 0s to nullptrs.
2620
2621         Tests: No new tests, no functional change.
2622
2623         * html/shadow/MediaControlElements.cpp:
2624         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
2625         * rendering/HitTestLocation.cpp:
2626         (WebCore::HitTestLocation::HitTestLocation):
2627         (WebCore::HitTestLocation::operator=):
2628         * rendering/HitTestLocation.h:
2629         (WebCore::HitTestLocation::region): Deleted.
2630         * rendering/HitTestResult.h:
2631         * rendering/PaintInfo.h:
2632         (WebCore::PaintInfo::PaintInfo):
2633         * rendering/RenderBlock.cpp:
2634         (WebCore::RenderBlock::paint):
2635         (WebCore::RenderBlock::paintObject):
2636         (WebCore::RenderBlock::selectionGaps):
2637         (WebCore::RenderBlock::nodeAtPoint):
2638         * rendering/RenderBox.cpp:
2639         (WebCore::RenderBox::nodeAtPoint):
2640         (WebCore::RenderBox::paintBoxDecorations):
2641         (WebCore::RenderBox::pushContentsClip):
2642         * rendering/RenderBoxModelObject.cpp:
2643         (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
2644         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2645         * rendering/RenderBoxModelObject.h:
2646         * rendering/RenderLayer.cpp:
2647         (WebCore::RenderLayer::paint):
2648         (WebCore::RenderLayer::paintLayer):
2649         (WebCore::RenderLayer::paintLayerContents):
2650         (WebCore::RenderLayer::paintLayerByApplyingTransform):
2651         (WebCore::RenderLayer::collectFragments):
2652         (WebCore::RenderLayer::updatePaintingInfoForFragments):
2653         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
2654         (WebCore::RenderLayer::paintBackgroundForFragments):
2655         (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
2656         (WebCore::RenderLayer::paintOutlineForFragments):
2657         (WebCore::RenderLayer::paintMaskForFragments):
2658         (WebCore::RenderLayer::hitTest):
2659         (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
2660         (WebCore::RenderLayer::hitTestLayer):
2661         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
2662         (WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
2663         (WebCore::RenderLayer::calculateClipRects):
2664         * rendering/RenderLayer.h:
2665         * rendering/RenderLayerBacking.cpp:
2666         (WebCore::RenderLayerBacking::updateCompositedBounds):
2667         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2668         * rendering/RenderLayerCompositor.cpp:
2669         (WebCore::RenderLayerCompositor::addToOverlapMap):
2670         (WebCore::RenderLayerCompositor::clippedByAncestor):
2671         * rendering/RenderObject.cpp:
2672         (WebCore::RenderObject::currentRenderNamedFlowFragment):
2673         * rendering/RenderObject.h:
2674         * rendering/RenderReplaced.cpp:
2675         (WebCore::RenderReplaced::shouldPaint):
2676         * rendering/RenderReplica.cpp:
2677         (WebCore::RenderReplica::paint):
2678         * rendering/RenderTable.cpp:
2679         (WebCore::RenderTable::nodeAtPoint):
2680         * rendering/RenderTableSection.cpp:
2681         (WebCore::RenderTableSection::nodeAtPoint):
2682         * rendering/RenderTreeAsText.cpp:
2683         (WebCore::writeLayers):
2684         * rendering/RootInlineBox.cpp:
2685         (WebCore::RootInlineBox::paint):
2686         * rendering/svg/RenderSVGRoot.cpp:
2687         (WebCore::RenderSVGRoot::paintReplaced):
2688
2689 2014-05-14  Simon Fraser  <simon.fraser@apple.com>
2690
2691         Clean up "has non-zero begin time" terminology in animations
2692         https://bugs.webkit.org/show_bug.cgi?id=132942
2693
2694         Reviewed by Tim Horton.
2695
2696         Change the "non-zero beginTime" terminology in the platform CA animations
2697         code to "explicit beginTime": this flag really means that we explicitly set
2698         the beginTime of the animation, rather than let CA set the beginTime when
2699         committing the animation. This flag is used for animations with negative
2700         delay, and when pausing.
2701         
2702         The WKNonZeroBeginTimeFlag key was spread across PlatformCALayerMac and PlatformCAAnimationMac,
2703         so hide it behind getter/setter functions.
2704         
2705         Remove lots of m_layer.get() in PlatformCAAnimationMac.
2706
2707         * platform/graphics/ca/mac/PlatformCAAnimationMac.h:
2708         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
2709         (WebCore::hasExplicitBeginTime):
2710         (WebCore::setHasExplicitBeginTime):
2711         (PlatformCAAnimationMac::copy):
2712         (PlatformCAAnimationMac::keyPath):
2713         (PlatformCAAnimationMac::beginTime):
2714         (PlatformCAAnimationMac::setBeginTime):
2715         (PlatformCAAnimationMac::duration):
2716         (PlatformCAAnimationMac::setDuration):
2717         (PlatformCAAnimationMac::speed):
2718         (PlatformCAAnimationMac::setSpeed):
2719         (PlatformCAAnimationMac::timeOffset):
2720         (PlatformCAAnimationMac::setTimeOffset):
2721         (PlatformCAAnimationMac::repeatCount):
2722         (PlatformCAAnimationMac::setRepeatCount):
2723         (PlatformCAAnimationMac::autoreverses):
2724         (PlatformCAAnimationMac::setAutoreverses):
2725         (PlatformCAAnimationMac::fillMode):
2726         (PlatformCAAnimationMac::setFillMode):
2727         (PlatformCAAnimationMac::setTimingFunction):
2728         (PlatformCAAnimationMac::copyTimingFunctionFrom):
2729         (PlatformCAAnimationMac::isRemovedOnCompletion):
2730         (PlatformCAAnimationMac::setRemovedOnCompletion):
2731         (PlatformCAAnimationMac::isAdditive):
2732         (PlatformCAAnimationMac::setAdditive):
2733         (PlatformCAAnimationMac::valueFunction):
2734         (PlatformCAAnimationMac::setValueFunction):
2735         (hasNonZeroBeginTimeFlag): Deleted.
2736         (setNonZeroBeginTimeFlag): Deleted.
2737         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2738         (-[WebAnimationDelegate animationDidStart:]):
2739
2740 2014-05-15  Carlos Garcia Campos  <cgarcia@igalia.com>
2741
2742         [GTK] Compile all installed resources as GResources
2743         https://bugs.webkit.org/show_bug.cgi?id=131099
2744
2745         Reviewed by Philippe Normand.
2746
2747         * PlatformGTK.cmake: Do not install the resources.
2748         * platform/audio/gtk/AudioBusGtk.cpp:
2749         (WebCore::AudioBus::loadPlatformResource): Load the audio resource
2750         from GResources and use createBusFromInMemoryAudioFile().
2751         * platform/graphics/Image.h: Remove unsued function loadPlatformThemeIcon.
2752         * platform/graphics/gtk/ImageGtk.cpp:
2753         (WebCore::loadImageFromGResource): Load the given icon name from GResources.
2754         (WebCore::loadResourceSharedBuffer): Use char* instead of CString.
2755         (WebCore::loadMissingImageIconFromTheme): Try to load the missing
2756         icon from the current GTK icon theme.
2757         (WebCore::Image::loadPlatformResource): Call
2758         loadMissingImageIconFromTheme for missing icon or
2759         loadImageFromGResource for any other icon name.
2760         (WebCore::getPathToImageResource): Deleted.
2761         (WebCore::getThemeIconFileName): Deleted.
2762         (WebCore::loadImageFromFile): Deleted.
2763         (WebCore::Image::loadPlatformThemeIcon): Deleted.
2764
2765 2014-05-14  Beth Dakin  <bdakin@apple.com>
2766
2767         Tiled scrolling indicator needs to take topContentInset into account
2768         https://bugs.webkit.org/show_bug.cgi?id=132940
2769
2770         Reviewed by Simon Fraser.
2771
2772         The tiled scrolling indicator needs to move down by the value of the 
2773         topContentInset. This patch makes that happen by caching the topContentInset in 
2774         the TileController. This does feel a little silly since there is already a 
2775         function called setTiledScrollingIndicatorPosition() on TiledBacking. However, it 
2776         was often the case that calling that function had no effect because m_coverageMap 
2777         had not yet been created, and then the information was lost. So instead, we cache 
2778         the value.
2779
2780         Set TiledBacking’s copy of topContentInset whenever it changes for the FrameView.
2781         * page/FrameView.cpp:
2782         (WebCore::FrameView::topContentInsetDidChange):
2783
2784         New function to set the inset. Use the inset to position the coverage map.
2785         * platform/graphics/TiledBacking.h:
2786         * platform/graphics/ca/mac/TileController.h:
2787         * platform/graphics/ca/mac/TileController.mm:
2788         (WebCore::TileController::TileController):
2789         (WebCore::TileController::setTopContentInset):
2790
2791         When the coverage map is created, consult the value of the inset.
2792         * platform/graphics/ca/mac/TileCoverageMap.mm:
2793         (WebCore::TileCoverageMap::TileCoverageMap):
2794
2795         Once the backing has been ensured, set the inset.
2796         * rendering/RenderLayerCompositor.cpp:
2797         (WebCore::RenderLayerCompositor::updateBacking):
2798
2799 2014-05-14  Brent Fulgham  <bfulgham@apple.com>
2800
2801         Merge r1267628 from branch.
2802         <rdar://problem/15751219>
2803
2804             Pratik Solanki  <psolanki@apple.com>
2805
2806             Reviewed by Simon Fraser.",
2807
2808             TileController relied on the tiling mode in TileCache to determine if it should use low-res
2809             tiles when zooming. Unfortunately, sometimes the tiling mode gets set to Zooming even though
2810             it's actually a pan. Thus we can end up with blurry tiles. Fix this by adding a new flag on
2811             TileCache that controls this behavior and have UIKit set it only when we have an actual zoom
2812             operation.
2813  
2814         * platform/ios/LegacyTileCache.h:
2815         (WebCore::LegacyTileCache::tileControllerShouldUseLowScaleTiles):
2816         (WebCore::LegacyTileCache::setTileControllerShouldUseLowScaleTiles):
2817         * platform/ios/LegacyTileCache.mm:
2818         (WebCore::LegacyTileCache::LegacyTileCache):
2819         * platform/ios/wak/WAKWindow.h:
2820         * platform/ios/wak/WAKWindow.mm:
2821         (-[WAKWindow setTileControllerShouldUseLowScaleTiles:]):
2822         * rendering/RenderLayerCompositor.cpp:
2823         (WebCore::RenderLayerCompositor::contentsScaleMultiplierForNewTiles):
2824
2825 2014-05-14  Commit Queue  <commit-queue@webkit.org>
2826
2827         Unreviewed, rolling out r168750.
2828         https://bugs.webkit.org/show_bug.cgi?id=132935
2829
2830         Caused repaint bugs (Requested by weinig on #webkit).
2831
2832         Reverted changeset:
2833
2834         "Text decorations do not contribute to visual overflow"
2835         https://bugs.webkit.org/show_bug.cgi?id=132773
2836         http://trac.webkit.org/changeset/168750
2837
2838 2014-05-14  Simon Fraser  <simon.fraser@apple.com>
2839
2840         [New multicolumn] Spin in RenderMultiColumnSet::repaintFlowThreadContent()
2841         https://bugs.webkit.org/show_bug.cgi?id=132884
2842
2843         Reviewed by Beth Dakin.
2844
2845         On iOS, wikipedia pages can hang under RenderMultiColumnSet::repaintFlowThreadContent().
2846         It appears that computedColumnHeight is set to 0 in prepareForLayout, but layout never happens
2847         on the RenderMultiColumnSet in some cases, leaving the column height set to zero.
2848         This caused columnIndexAtOffset() to return bad values, which resulted in very long loops
2849         in repaintFlowThreadContent().
2850         
2851         This fix is a stop-gap.
2852
2853         * rendering/RenderMultiColumnSet.cpp:
2854         (WebCore::RenderMultiColumnSet::columnIndexAtOffset):
2855
2856 2014-05-14  Benjamin Poulain  <bpoulain@apple.com>
2857
2858         Remove FrameView::viewportConstrainedExtentRect, it is unused
2859         https://bugs.webkit.org/show_bug.cgi?id=132927
2860
2861         Reviewed by Simon Fraser.
2862
2863         * page/FrameView.cpp:
2864         (WebCore::FrameView::viewportConstrainedExtentRect): Deleted.
2865         * page/FrameView.h:
2866         Simon replaced this by viewportConstrainedVisibleContentRect, remove the old code.
2867
2868 2014-05-14  Matthew Hanson  <matthew_hanson@apple.com>
2869
2870         Only define MAX_GRID_TRACK_REPETITIONS if CSS_GRID_LAYOUT is enabled.
2871
2872         Reviewed by Dean Jackson.
2873
2874         This was causing -Wunused-const-variable errors.
2875
2876         * css/CSSParser.cpp: Add include guard.
2877
2878 2014-05-14  Beth Dakin  <bdakin@apple.com>
2879
2880         Tile cache has way too many tiles when pinch-zoomed in
2881         https://bugs.webkit.org/show_bug.cgi?id=132929
2882         -and corresponding-
2883         <rdar://problem/16527172>
2884
2885         Reviewed by Benjamin Poulain.
2886
2887         This patch makes the margin sizing functions return the set margin size scaled by 
2888         the TileGrid's scale. We also need to get rid of the old notion we used to have
2889         that margin tiles might be allowed to have a different size than the other tiles. 
2890         We don't want that. They should have the normal margin size, but they should
2891         affect the overall coverage area.
2892
2893         Scale by the TileGrid's scale.
2894         * platform/graphics/ca/mac/TileController.mm:
2895         (WebCore::TileController::topMarginHeight):
2896         (WebCore::TileController::bottomMarginHeight):
2897         (WebCore::TileController::leftMarginWidth):
2898         (WebCore::TileController::rightMarginWidth):
2899
2900         Get rid of adjustRectAtTileIndexForMargin() since we do not want to ever do this 
2901         adjustment. Use tileSize instead of margin size for all sizing computations.
2902         * platform/graphics/ca/mac/TileGrid.h:
2903         * platform/graphics/ca/mac/TileGrid.mm:
2904         (WebCore::TileGrid::rectForTileIndex):
2905         (WebCore::TileGrid::getTileIndexRangeForRect):
2906         (WebCore::TileGrid::adjustRectAtTileIndexForMargin): Deleted.
2907
2908 2014-05-14  Dean Jackson  <dino@apple.com>
2909
2910         [Mac] Search fields should not use centered look
2911         https://bugs.webkit.org/show_bug.cgi?id=132930
2912         <rdar://problem/16825842>
2913
2914         Reviewed by Beth Dakin.
2915
2916         We need to explicitly set the centeredLook property
2917         to NO on modern releases of Mac.
2918
2919         * rendering/RenderThemeMac.mm: Declare a new private property and set it to NO.
2920         (WebCore::RenderThemeMac::search):
2921
2922 2014-05-14  Zalan Bujtas  <zalan@apple.com>
2923
2924         Subpixel layout: Change Element.offset* client* scroll* return type to double.
2925         https://bugs.webkit.org/show_bug.cgi?id=132895
2926
2927         Reviewed by Simon Fraser.
2928
2929         This patch changes Element.offset*, Element.client* and Element.scroll* APIs return
2930         type from long to double to match the latest CSSOM View Module spec[1].
2931         Element.offset* and Element.client* do return subpixel values from now on.
2932         Element.scroll* still return integral values as the scrolling code hasn't adopted to subpixel rendering yet.
2933
2934         subpixelCSSOMElementMetricsEnabled setting is added to be able to turn this feature on/off
2935         from WK2 preferences. It toggles the return value from subpixel to floored integral.
2936         It does not change layout/rendering behavior.
2937
2938         Reference list of what other browsers do:
2939         IE: http://blogs.msdn.com/b/ie/archive/2012/02/17/sub-pixel-rendering-and-the-css-object-model.aspx
2940         Blink: http://www.chromestatus.com/features/5497402177880064
2941         Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=825607
2942
2943         [1] http://www.w3.org/TR/2013/WD-cssom-view-20131217/
2944
2945         Test: cssom/subpixel-offsetleft-top-width-height-values.html
2946
2947         * dom/Element.cpp:
2948         (WebCore::localZoomForRenderer):
2949         (WebCore::adjustForLocalZoom):
2950         (WebCore::convertToNonSubpixelValueIfNeeded):
2951         (WebCore::Element::offsetLeft):
2952         (WebCore::Element::offsetTop):
2953         (WebCore::Element::offsetWidth):
2954         (WebCore::Element::offsetHeight):
2955         (WebCore::Element::clientLeft):
2956         (WebCore::Element::clientTop):
2957         (WebCore::Element::clientWidth):
2958         (WebCore::Element::clientHeight):
2959         (WebCore::Element::scrollLeft):
2960         (WebCore::Element::scrollTop):
2961         (WebCore::Element::setScrollLeft):
2962         (WebCore::Element::setScrollTop):
2963         (WebCore::Element::scrollWidth):
2964         (WebCore::Element::scrollHeight):
2965         * dom/Element.h:
2966         * dom/Element.idl:
2967         * html/HTMLBodyElement.cpp:
2968         (WebCore::adjustForZoom):
2969         (WebCore::HTMLBodyElement::scrollLeft):
2970         (WebCore::HTMLBodyElement::setScrollLeft):
2971         (WebCore::HTMLBodyElement::scrollTop):
2972         (WebCore::HTMLBodyElement::setScrollTop):
2973         (WebCore::HTMLBodyElement::scrollHeight):
2974         (WebCore::HTMLBodyElement::scrollWidth):
2975         * html/HTMLBodyElement.h:
2976         * page/Settings.in:
2977
2978 2014-05-14  Brady Eidson  <beidson@apple.com>
2979
2980         Implement NSSharingServiceDelegate method "transitionImageForShareItem"
2981         <rdar://problem/16878020> and https://bugs.webkit.org/show_bug.cgi?id=132911
2982
2983         Reviewed by Tim Horton.
2984
2985         * WebCore.exp.in:
2986         * WebCore.xcodeproj/project.pbxproj:
2987
2988 2014-05-14  Alex Christensen  <achristensen@webkit.org>
2989
2990         Another unreviewed build fix.
2991
2992         * platform/network/mac/ResourceHandleMac.mm:
2993         (WebCore::ResourceHandle::getTimingData):
2994         Added necessary UNUSED_PARAMs.
2995
2996 2014-05-14  Alex Christensen  <achristensen@webkit.org>
2997
2998         Unreviewed build fix after r168849.
2999
3000         * platform/network/mac/ResourceHandleMac.mm:
3001         (WebCore::ResourceHandle::getTimingData):
3002         Protect use of timing data with ENABLE(WEB_TIMING).
3003
3004 2014-05-14  Alex Christensen  <achristensen@webkit.org>
3005
3006         Refactor duplicate code in web timing.
3007         https://bugs.webkit.org/show_bug.cgi?id=132917
3008
3009         Reviewed by Alexey Proskuryakov.
3010
3011         * platform/network/ResourceHandle.h:
3012         Added getTimingData declaration.
3013         * platform/network/mac/ResourceHandleMac.mm:
3014         (WebCore::ResourceHandle::getTimingData):
3015         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
3016         (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
3017         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
3018         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
3019         Moved duplicate code to ResourceHandle.
3020
3021 2014-05-14  Alex Christensen  <achristensen@webkit.org>
3022
3023         Use references instead of pointers with ResourceLoadTiming.
3024         https://bugs.webkit.org/show_bug.cgi?id=132846
3025
3026         Reviewed by Alexey Proskuryakov.
3027
3028         * WebCore.exp.in:
3029         Removed ResourceResponseBase::setResourceLoadTiming linker symbol.
3030         * inspector/InspectorResourceAgent.cpp:
3031         (WebCore::buildObjectForResourceResponse):
3032         * page/PerformanceResourceTiming.cpp:
3033         (WebCore::PerformanceResourceTiming::domainLookupStart):
3034         (WebCore::PerformanceResourceTiming::domainLookupEnd):
3035         (WebCore::PerformanceResourceTiming::connectStart):
3036         (WebCore::PerformanceResourceTiming::connectEnd):
3037         (WebCore::PerformanceResourceTiming::secureConnectionStart):
3038         (WebCore::PerformanceResourceTiming::requestStart):
3039         Use references instead of pointers.
3040         * page/PerformanceResourceTiming.h:
3041         Make an instance instead of a RefPtr.
3042         * page/PerformanceTiming.cpp:
3043         (WebCore::PerformanceTiming::domainLookupStart):
3044         (WebCore::PerformanceTiming::domainLookupEnd):
3045         (WebCore::PerformanceTiming::connectStart):
3046         (WebCore::PerformanceTiming::connectEnd):
3047         (WebCore::PerformanceTiming::secureConnectionStart):
3048         (WebCore::PerformanceTiming::requestStart):
3049         (WebCore::PerformanceTiming::responseStart):
3050         Check to see if the loader exists, then use ResourceLoadTiming reference.
3051         (WebCore::PerformanceTiming::resourceLoadTiming): Deleted.
3052         * page/PerformanceTiming.h:
3053         Removed resourceLoadTiming declaration.
3054         * platform/network/ResourceLoadTiming.h:
3055         (WebCore::ResourceLoadTiming::ResourceLoadTiming):
3056         (WebCore::ResourceLoadTiming::operator=):
3057         Replaced reference counting with copy constructors.
3058         (WebCore::ResourceLoadTiming::create): Deleted.
3059         (WebCore::ResourceLoadTiming::deepCopy): Deleted.
3060         * platform/network/ResourceResponseBase.cpp:
3061         (WebCore::ResourceResponseBase::adopt):
3062         (WebCore::ResourceResponseBase::copyData):
3063         (WebCore::ResourceResponseBase::resourceLoadTiming):
3064         (WebCore::ResourceResponseBase::setResourceLoadTiming):
3065         (WebCore::ResourceResponseBase::compare):
3066         * platform/network/ResourceResponseBase.h:
3067         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
3068         (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
3069         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
3070         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
3071         * platform/network/soup/ResourceHandleSoup.cpp:
3072         (WebCore::ResourceHandle::didStartRequest):
3073         (WebCore::networkEventCallback):
3074         Use references instead of pointers.
3075
3076 2014-05-14  Commit Queue  <commit-queue@webkit.org>
3077
3078         Unreviewed, rolling out r168837.
3079         https://bugs.webkit.org/show_bug.cgi?id=132913
3080
3081         The patch added an assertion which fires on 6 tests (Requested
3082         by ap on #webkit).
3083
3084         Reverted changeset:
3085
3086         "[CSS Regions] Add ASSERT to make sure using the flowThread
3087         cache does not return incorrect results"
3088         https://bugs.webkit.org/show_bug.cgi?id=132906
3089         http://trac.webkit.org/changeset/168837
3090
3091 2014-05-13  Jon Honeycutt  <jhoneycutt@apple.com>
3092
3093         Revert "Don't dispatch 'beforeload' event inside FrameView::layout()",
3094         commit 84fe8cf6fbe8b5de9a06300ca3ef6d0ffc96948c, and associated
3095         follow-up fixes:
3096
3097             "platform/mac/plugins/testplugin-onnew-onpaint.html failing after
3098                 r168668", commit c17be3bf5127baf94310af4b4b9bf5a57d29aaf4
3099             "[Win] Unreviewed build fix after r168668.", commit
3100                 4fa470ad12c38ee7d4c114541b6dd321181a8bc9
3101
3102         The original merged patch appears to have caused a regression in
3103         fast/dom/HTMLObjectElement/object-as-frame.html.
3104
3105         <https://bugs.webkit.org/show_bug.cgi?id=132886>
3106
3107         Reviewed by Alexey Proskuryakov.
3108
3109         * WebCore.exp.in:
3110         * dom/Document.cpp:
3111         (WebCore::Document::updateLayoutIgnorePendingStylesheets):
3112         * dom/Document.h:
3113         * html/HTMLAppletElement.cpp:
3114         (WebCore::HTMLAppletElement::renderWidgetForJSBindings):
3115         * html/HTMLEmbedElement.cpp:
3116         (WebCore::HTMLEmbedElement::renderWidgetForJSBindings):
3117         * html/HTMLObjectElement.cpp:
3118         (WebCore::HTMLObjectElement::renderWidgetForJSBindings):
3119         * page/FrameView.cpp:
3120         (WebCore::FrameView::FrameView):
3121         (WebCore::FrameView::reset):
3122         (WebCore::FrameView::flushAnyPendingPostLayoutTasks):
3123         (WebCore::FrameView::performPostLayoutTasks):
3124         (WebCore::FrameView::updateEmbeddedObjectsTimerFired): Deleted.
3125         * page/FrameView.h:
3126         * testing/Internals.cpp:
3127         (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks): Deleted.
3128         * testing/Internals.h:
3129         * testing/Internals.idl:
3130
3131 2014-05-14  Kiran  <kiran.guduru@samsung.com>
3132
3133         alidation for getUserMedia() errorCallback is missing.
3134         https://bugs.webkit.org/show_bug.cgi?id=132901
3135
3136         Reviewed by Darin Adler.
3137
3138         The patch adds the validation for getUserMedia errorCallBack
3139         and throws TypeMismatchError.
3140
3141         Test: fast/mediastream/getusermedia.html 
3142
3143         * Modules/mediastream/NavigatorUserMedia.cpp:
3144         (WebCore::NavigatorUserMedia::webkitGetUserMedia):
3145
3146 2014-05-14  Tibor Meszaros  <tmeszaros.u-szeged@partner.samsung.com>
3147
3148         Remove CSS_STICKY_POSITION guards
3149         https://bugs.webkit.org/show_bug.cgi?id=132676
3150
3151         Reviewed by Simon Fraser.
3152
3153         * Configurations/FeatureDefines.xcconfig:
3154         * css/CSSParser.cpp:
3155         (WebCore::isValidKeywordPropertyAndValue):
3156         * css/CSSPrimitiveValueMappings.h:
3157         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3158         (WebCore::CSSPrimitiveValue::operator EPosition):
3159         * css/CSSValueKeywords.in:
3160         * editing/EditingStyle.cpp:
3161         (WebCore::EditingStyle::convertPositionStyle):
3162
3163 2014-05-14  Radu Stavila  <stavila@adobe.com>
3164
3165         [CSS Regions] Add ASSERT to make sure using the flowThread cache does not return incorrect results
3166         https://bugs.webkit.org/show_bug.cgi?id=132906
3167
3168         Reviewed by Andrei Bucur.
3169
3170         If flowThreadContainingBlock() is called on an object which is in a different
3171         flow thread than the one currently being laid out, this method will return an incorrect
3172         result. I added an assertion for that to make sure we catch and treat any such scenarios.
3173
3174         No new tests required.
3175
3176         * rendering/RenderObject.cpp:
3177         (WebCore::RenderObject::locateFlowThreadContainingBlockNoCache):
3178         (WebCore::RenderObject::locateFlowThreadContainingBlock):
3179         * rendering/RenderObject.h:
3180
3181 2014-05-14  Andrei Bucur  <abucur@adobe.com>
3182
3183         [CSS Regions] Don't relayout when updating the region range unless necessary
3184         https://bugs.webkit.org/show_bug.cgi?id=132120
3185
3186         Reviewed by Antti Koivisto.
3187
3188         The patch reduces the cases when a relayout is made for boxes that change the region range.
3189         This lowers the amount of nested layouts in most cases and produces big layout speedups for trees
3190         without overhanging floats.
3191
3192         Tests: Major performance improvement with speedups of 50-60% on:
3193         Layout/RegionsAuto.html, Layout/RegionsAutoMaxHeight.html and Layout/RegionsFixed.html
3194
3195         * rendering/RenderBlock.cpp:
3196         (WebCore::RenderBlock::updateRegionRangeForBoxChild): Ask the child box if it needs a relayout
3197         in case its region range changes.
3198         * rendering/RenderBlockFlow.cpp:
3199         (WebCore::RenderBlockFlow::layoutBlockChild): It's not necessary to do two layouts here because
3200         there's no block direction position change between them for the child.
3201         (WebCore::RenderBlockFlow::needsLayoutAfterRegionRangeChange): If the block doesn't have floats
3202         or if it expands to enclose the floats it doesn't need to relayout after a region range chage.
3203         It's not possible for it to have a float inside overflow that must be repositioned using the new
3204         range.
3205         * rendering/RenderBlockFlow.h:
3206         * rendering/RenderBox.h:
3207         (WebCore::RenderBox::needsLayoutAfterRegionRangeChange): By default don't relayout after a region
3208         range change.
3209
3210 2014-05-14  Antti Koivisto  <antti@apple.com>
3211
3212         RuleData should ref the StyleRule
3213         https://bugs.webkit.org/show_bug.cgi?id=132865
3214
3215         Reviewed by Andreas Kling.
3216
3217         As a defensive move make RuleData ref the StyleRule. 
3218         This adds some ref churn but the overall performance impact should be minimal.
3219
3220         * css/RuleSet.h:
3221         (WebCore::RuleData::rule):
3222
3223 2014-05-14  Antti Koivisto  <antti@apple.com>
3224
3225         GIF animations don't restart after scrolling on iOS WebKit1
3226         https://bugs.webkit.org/show_bug.cgi?id=132900
3227
3228         Reviewed by Andreas Kling.
3229
3230         * WebCore.exp.in:
3231
3232 2014-05-13  Andrei Bucur  <abucur@adobe.com>
3233
3234         [CSS Regions] Assertion failure in some cases with inline blocks
3235         https://bugs.webkit.org/show_bug.cgi?id=132859
3236
3237         Reviewed by Mihnea Ovidenie.
3238
3239         The patch hardens the conditions when the region range caches are
3240         populated to avoid desynchronizations when objects move during layout.
3241         This is true especially in the case of the boxes found inside
3242         inline blocks, that get their range from the containing line.
3243
3244         There is a new function |computedRegionRangeForBox| that will always
3245         return a region range for a box using a best effort algorithm. This should
3246         be used only when there's no need to cache region information.
3247
3248         This change also allows better control over the lifecycle of the
3249         |RenderBoxRegionInfo| objects stored on the regions. We can now iterate
3250         over the full range of the box when cleaning up the region box info. The
3251         same applies for the width change detection function.
3252
3253         Test: fast/regions/inline-block-shifted-region.html
3254
3255         * rendering/RenderBlockLineLayout.cpp:
3256         (WebCore::RenderBlockFlow::updateRegionForLine): Don't set the containing
3257         region if the block doesn't have a range. The returned value would not
3258         be correctly clamped.
3259         * rendering/RenderBox.cpp:
3260         (WebCore::RenderBlock::hasRegionRangeInFlowThread):
3261         * rendering/RenderBox.h:
3262         * rendering/RenderFlowThread.cpp:
3263         (WebCore::RenderFlowThread::removeRenderBoxRegionInfo): Iterate only over
3264         the range of the box, not from the start of the region chain.
3265         (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock): Same as
3266         above.
3267         (WebCore::RenderFlowThread::hasCachedRegionRangeForBox):
3268         (WebCore::RenderFlowThread::getRegionRangeForBoxFromCachedInfo):
3269         (WebCore::RenderFlowThread::getRegionRangeForBox):
3270         (WebCore::RenderFlowThread::computedRegionRangeForBox): Best effort function
3271         to determine the range of a box. It will always return something as long
3272         as the flow thread has regions.
3273         (WebCore::RenderFlowThread::objectShouldFragmentInFlowRegion): Use the new function
3274         to determine the range.
3275         * rendering/RenderFlowThread.h:
3276         * rendering/RenderNamedFlowThread.cpp:
3277         (WebCore::RenderNamedFlowThread::absoluteQuadsForBox): Use the new function to determine
3278         the range.
3279
3280 2014-05-13  Simon Fraser  <simon.fraser@apple.com>
3281
3282         Fix "ASSERTION FAILED: m_representation == PlatformLayerRepresentation" with UI-side compositing
3283         https://bugs.webkit.org/show_bug.cgi?id=132899
3284
3285         Reviewed by Beth Dakin.
3286
3287         Export some things
3288
3289         * WebCore.exp.in:
3290
3291 2014-05-13  Hans Muller  <hmuller@adobe.com>
3292
3293         [CSS Shapes] line height grows around polygon and incorrectly causes text to wrap to next line
3294         https://bugs.webkit.org/show_bug.cgi?id=131622
3295
3296         Reviewed by Bem Jones-Bey.
3297
3298         Corrected an earlier PolygonShape fix https://bugs.webkit.org/show_bug.cgi?id=132132
3299         When the top or bottom of a layout line is coincident with a polygon edge vertex, we
3300         only consider it an intersection if the edge extends into the line.
3301
3302         Test: fast/shapes/shape-outside-floats/shape-outside-edge-case.html
3303
3304         * rendering/shapes/PolygonShape.cpp:
3305         (WebCore::OffsetPolygonEdge::clippedEdgeXRange):
3306
3307 2014-05-13  Beth Dakin  <bdakin@apple.com>
3308
3309         m_layerForOverhangAreas is sometimes not positioned correctly when topContentInset 
3310         has changed
3311         https://bugs.webkit.org/show_bug.cgi?id=132898
3312         -and corresponding-
3313         <rdar://problem/16644710>
3314
3315         Reviewed by Anders Carlsson.
3316
3317         This function is called whenever the topContentInset changes, so use it as an 
3318         opportunity to ensure that m_layerForOverhangAreas has been positioned correctly.
3319         * rendering/RenderLayerCompositor.cpp:
3320         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
3321
3322         Everyone gets an anchor point!
3323         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
3324
3325 2014-05-13  Dean Jackson  <dino@apple.com>
3326
3327         Attempted build fix after https://bugs.webkit.org/show_bug.cgi?id=132891
3328
3329         * page/PageDebuggable.cpp:
3330
3331 2014-05-13  Timothy Hatcher  <timothy@apple.com>
3332
3333         Force developerExtrasEnabled when a remote Inspector client connects.
3334
3335         https://bugs.webkit.org/show_bug.cgi?id=132891
3336
3337         Reviewed by Joseph Pecoraro.
3338
3339         * page/PageDebuggable.cpp:
3340         (WebCore::PageDebuggable::PageDebuggable): Initialize m_forcedDeveloperExtrasEnabled to false.
3341         (WebCore::PageDebuggable::connect): Set m_forcedDeveloperExtrasEnabled if the setting is changed.
3342         (WebCore::PageDebuggable::disconnect): Switch developerExtrasEnabled back to false
3343         if m_forcedDeveloperExtrasEnabled is true.
3344         * page/PageDebuggable.h: Added m_forcedDeveloperExtrasEnabled.
3345
3346 2014-05-13  Beth Dakin  <bdakin@apple.com>
3347
3348         REGRESSION (topContentInset): Searching through Facebook Messenger's chat causes 
3349         scrolling in News Feed
3350         https://bugs.webkit.org/show_bug.cgi?id=132889
3351         -and corresponding-
3352         <rdar://problem/16715716>
3353
3354         Reviewed by Simon Fraser.
3355
3356         First of all, scrollOffsetRelativeToDocument() was very poorly named. This patch 
3357         re-names it to the much more accurate documentScrollOffsetRelativeToViewOrigin(). 
3358         Re-naming it makes it clear that ONE call site was not getting the right offset. 
3359         That call site does not want to know the document’s position relative to the view 
3360         origin, but rather it wants to know the Document’s position relative to the 
3361         scrolling origin.
3362
3363         Export new name.
3364         * WebCore.exp.in:
3365
3366         Use newly re-named documentScrollPositionRelativeToViewOrigin().
3367         * page/FrameView.cpp:
3368         (WebCore::FrameView::convertToRenderer):
3369         * platform/ScrollView.cpp:
3370         (WebCore::ScrollView::documentScrollOffsetRelativeToViewOrigin):
3371         (WebCore::ScrollView::documentScrollPositionRelativeToViewOrigin):
3372         (WebCore::ScrollView::documentScrollOffsetRelativeToScrollableAreaOrigin):
3373         (WebCore::ScrollView::rootViewToContents):
3374         (WebCore::ScrollView::windowToContents):
3375         (WebCore::ScrollView::scrollOffsetRelativeToDocument): Deleted.
3376         (WebCore::ScrollView::scrollPositionRelativeToDocument): Deleted.
3377         * platform/ScrollView.h:
3378
3379         THIS is the spot that needs the new function, 
3380         documentScrollOffsetRelativeToScrollableAreaOrigin()()
3381         * rendering/RenderLayer.cpp:
3382         (WebCore::RenderLayer::scrollRectToVisible):
3383
3384 2014-05-13  Dean Jackson  <dino@apple.com>
3385
3386         [iOS] Page scale update messages for media controls should only fire at the end of zooming
3387         https://bugs.webkit.org/show_bug.cgi?id=132857
3388         <rdar://problem/16631009>
3389
3390         Reviewed by Simon Fraser.
3391
3392         As the user was zooming, the media controls that responded
3393         to the page scale (and resized themselves) would do so
3394         slightly out of sync with the screen refreshes, and it looked
3395         terrible. They really only need to get told at the end
3396         of the zoom that they need to relayout.
3397