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