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