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