8cb69ede634b2f8e52a89e28cddfe05a66243e82
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-04-03  Dirk Schulze  <krit@webkit.org>
2
3         [CG] Canvas lineDashOffset does not handle negative numbers correctly
4         https://bugs.webkit.org/show_bug.cgi?id=80560
5
6         Reviewed by Dean Jackson.
7
8         CG ignores negative dash array offsets. Check if we have a negative offset, if yes
9         then calculate the length of the dash array and modulo the dash array offset with
10         the dash array length.
11
12         Test: fast/canvas/canvas-negative-lineDashOffset.html
13
14         * platform/graphics/cg/GraphicsContextCG.cpp:
15         (WebCore::GraphicsContext::setLineDash):
16
17 2014-04-03  David Hyatt  <hyatt@apple.com>
18
19         REGRESSION: fast/css/relative-positioned-block-nested-with-inline-parent-multiple-descendant-blocks-dynamic.html broken
20         https://bugs.webkit.org/show_bug.cgi?id=131183
21
22         Reviewed by Simon Fraser.
23
24         Revert the loop to continue rather than breaking when an invalid block is encountered.
25         This is what it used to do if it encountered a non-continuation block.
26
27         * rendering/RenderInline.cpp:
28         (WebCore::updateStyleOfAnonymousBlockContinuations):
29
30 2014-04-02  Simon Fraser  <simon.fraser@apple.com>
31
32         Harden FilterOperation type casting
33         https://bugs.webkit.org/show_bug.cgi?id=131142
34
35         Reviewed by Sam Weinig.
36
37         DefaultFilterOperation had an error-prone behavior where it set the base class
38         OperationType to the type of some other filter class, but overrode isDefault(). 
39         This made it very easy to write incorrect code that casted incorrectly based on type().
40         
41         Fix by making adding a DEFAULT filter operation type, and storing the represented
42         type on DefaultFilterOperation().
43         
44         Also remove the OperationType argument for constructors of FilterOperations that
45         can only be of one type, to avoid possible mistakes.
46         
47         Make the type cast macros a bit more normal, and use them in a few places.
48         
49         Fixed PlatformCAFiltersMac to handle the default filter case more cleanly.
50
51         * WebCore.exp.in:
52         * css/CSSComputedStyleDeclaration.cpp:
53         (WebCore::ComputedStyleExtractor::valueForFilter):
54         * css/StyleResolver.cpp:
55         (WebCore::StyleResolver::createFilterOperations):
56         * platform/graphics/ca/PlatformCAFilters.h:
57         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
58         (PlatformCAFilters::filterValueForOperation):
59         (PlatformCAFilters::colorMatrixValueForFilter):
60         * platform/graphics/filters/FilterOperation.cpp:
61         (WebCore::DefaultFilterOperation::operator==):
62         (WebCore::ReferenceFilterOperation::ReferenceFilterOperation):
63         (WebCore::ReferenceFilterOperation::operator==):
64         (WebCore::BlurFilterOperation::operator==):
65         (WebCore::BlurFilterOperation::blend):
66         (WebCore::DropShadowFilterOperation::operator==):
67         (WebCore::DropShadowFilterOperation::blend):
68         * platform/graphics/filters/FilterOperation.h:
69         (WebCore::FilterOperation::blend):
70         (WebCore::FilterOperation::type):
71         (WebCore::FilterOperation::isBasicColorMatrixFilterOperation):
72         (WebCore::FilterOperation::isBasicComponentTransferFilterOperation):
73         (WebCore::FilterOperation::isSameType):
74         (WebCore::DefaultFilterOperation::create):
75         (WebCore::DefaultFilterOperation::representedType):
76         (WebCore::DefaultFilterOperation::DefaultFilterOperation):
77         (WebCore::ReferenceFilterOperation::create):
78         (WebCore::BlurFilterOperation::create):
79         (WebCore::BlurFilterOperation::BlurFilterOperation):
80         (WebCore::DropShadowFilterOperation::create):
81         (WebCore::DropShadowFilterOperation::DropShadowFilterOperation):
82         (WebCore::FilterOperation::isDefault): Deleted.
83         * platform/graphics/filters/FilterOperations.cpp:
84         (WebCore::FilterOperations::outsets):
85         * rendering/FilterEffectRenderer.cpp:
86         (WebCore::FilterEffectRenderer::build):
87         * rendering/RenderLayerFilterInfo.cpp:
88         (WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients):
89
90 2014-04-03  Andreas Kling  <akling@apple.com>
91
92         Stop throwing away the Document's StyleResolver on a timer.
93         <https://webkit.org/b/131168>
94         <rdar://problem/15227045>
95
96         This was causing some unfortunate pauses when returning to idle pages
97         after a long-ish time. There's already a mechanism in place that will
98         throw these away if the system comes under memory pressure.
99
100         Reviewed by Sam Weinig.
101
102         * css/StyleResolver.cpp:
103         (WebCore::StyleResolver::styleForElement):
104         (WebCore::StyleResolver::styleForKeyframe):
105         (WebCore::StyleResolver::pseudoStyleForElement):
106         (WebCore::StyleResolver::styleForPage):
107         * dom/Document.cpp:
108         (WebCore::Document::Document):
109         (WebCore::Document::didAccessStyleResolver): Deleted.
110         (WebCore::Document::styleResolverThrowawayTimerFired): Deleted.
111         * dom/Document.h:
112
113 2014-04-02  Simon Fraser  <simon.fraser@apple.com>
114
115         Assertion under RenderLayerCompositor::updateScrollCoordinatedLayer on time.com on iOS
116         https://bugs.webkit.org/show_bug.cgi?id=131150
117
118         Reviewed by Beth Dakin.
119
120         When calling updateScrollCoordinatedLayer() under styleChanged, we haven't done
121         layout yet so our composting layers haven't been hooked together. Don't try
122         to add a zero nodeID to the map in this case.
123
124         * rendering/RenderLayerCompositor.cpp:
125         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
126
127 2014-04-03  David Hyatt  <hyatt@apple.com>
128
129         Continuations casting issue.
130         https://bugs.webkit.org/show_bug.cgi?id=130057
131         <rdar://problem/16283406>
132
133         Reviewed by Simon Fraser.
134
135         The code to update relative positioned anonymous block continuations should not
136         have assumed that all siblings were RenderBlocks. Make the code smarter and
137         make it bail when it hits something that isn't part of the block continuation
138         chain.
139
140         Added fast/block/continuation-crash.html
141
142         * rendering/RenderInline.cpp:
143         (WebCore::updateStyleOfAnonymousBlockContinuations):
144
145 2014-04-03  Bem Jones-Bey  <bjonesbe@adobe.com>
146
147         [CSS Shapes] CRASH with calc() value args in inset round
148         https://bugs.webkit.org/show_bug.cgi?id=129816
149
150         Reviewed by Andreas Kling.
151
152         The code to parse the inset rounded corners was adding the parser
153         value arguments to a temporary CSSParserValueList. Unfortunately,
154         CSSParserValueList expects to own the values it contains, and it frees
155         the values it contains when the list is destroyed. This was a problem
156         because the values are owned by the CSSParserValueList passed in to
157         parseInsetRoundedCorners, and thus the calc's argument list would get
158         double freed, resulting in a crash. This patch fixes this by using a
159         Vector to hold the pointers instead.
160
161         Test: fast/shapes/shape-outside-floats/shape-outside-inset-round-calc-crash.html
162
163         * css/CSSParser.cpp:
164         (WebCore::CSSParser::parseInsetRoundedCorners):
165
166 2014-04-03  Jer Noble  <jer.noble@apple.com>
167
168         Leaving a streaming movie by going "Back" keeps playing the audio
169         https://bugs.webkit.org/show_bug.cgi?id=131149
170
171         Reviewed by Eric Carlson.
172
173         When stopping a HTMLMediaElement, call userCancelledLoad() (which clears the
174         MediaPlayer) only after calling setPausedInternal() (which pauses the MediaPlayer).
175         Previously, and in the reverse order, the MediaPlayer would never get a chance to pause
176         before being cleared. There is an underlying error with the QTKit media engine which
177         is causing it to continue playing even after its last reference is released, but this
178         does fix the symptom of playback continuing even after stopping.
179
180         * html/HTMLMediaElement.cpp:
181         (WebCore::HTMLMediaElement::stop):
182
183 2014-04-03  Jer Noble  <jer.noble@apple.com>
184
185         [EME] Crash when passing a NULL initData to MediaKeys.createSession()
186         https://bugs.webkit.org/show_bug.cgi?id=131156
187
188         Reviewed by Eric Carlson.
189
190         Update the checks at the start of createSession() to match the current spec, notably
191         bailing early if the initData parameter is NULL or empty.
192
193         * Modules/encryptedmedia/MediaKeys.cpp:
194         (WebCore::MediaKeys::createSession):
195
196 2014-04-03  Eric Carlson  <eric.carlson@apple.com>
197
198         [iOS] add missing QuickTime plug-in replacement API
199         https://bugs.webkit.org/show_bug.cgi?id=131042
200
201         Reviewed by Dean Jackson.
202
203         Rename QuickTimePluginReplacement.cpp to QuickTimePluginReplacement.mm to make it possible
204         to use the ObjC JSC API.
205         * Modules/plugins/QuickTimePluginReplacement.cpp:
206         * Modules/plugins/QuickTimePluginReplacement.h:
207         (WebCore::QuickTimePluginReplacement::parentElement):
208         * Modules/plugins/QuickTimePluginReplacement.idl:
209
210         * Modules/plugins/QuickTimePluginReplacement.js:
211         (Replacement.prototype.timedMetadataUpdates): Implement.
212         (Replacement.prototype.accessLog): Ditto.
213         (Replacement.prototype.errorLog): Ditto.
214
215         Use the JSC ObjC API to create a JavaScript object from an array of AVMetadataItems. The
216         JSC ObjC API supports basic NSTypes, but an AVMetadataItem can also contain NSData which 
217         the existing plug-in returns as base-64 encoded data, so create wrappers for NSDictionary
218         and NSArray.
219         * Modules/plugins/QuickTimePluginReplacement.mm: Copied from Source/WebCore/Modules/plugins/QuickTimePluginReplacement.cpp.
220         (WebCore::QuickTimePluginReplacement::ensureReplacementScriptInjected): Disambiguate with "JSC::"
221         (WebCore::QuickTimePluginReplacement::installReplacement): Ditto.
222         (WebCore::jsValueWithDataInContext): Create JSValue* from NSData.
223         (WebCore::jsValueWithArrayInContext): Create JSValue* from NSArray.
224         (WebCore::jsValueWithDictionaryInContext): Create JSValue* from NSDictionary.
225         (WebCore::jsValueWithValueInContext): Create JSValue* from basic NSTypes plus AVMetadataItem
226             and NSData.
227         (WebCore::jsValueWithAVMetadataItemInContext): Create JSValue* from AVMetadataItem.
228         (WebCore::JSQuickTimePluginReplacement::timedMetaData): Script interface.
229         (WebCore::JSQuickTimePluginReplacement::accessLog): Ditto.
230         (WebCore::JSQuickTimePluginReplacement::errorLog): Ditto.
231
232         * WebCore.xcodeproj/project.pbxproj: QuickTimePluginReplacement.cpp -> QuickTimePluginReplacement.mm.
233
234         * platform/graphics/MediaPlayer.cpp:
235         (WebCore::MediaPlayer::timedMetadata): iOS only accessor.
236         (WebCore::MediaPlayer::accessLog): Ditto.
237         (WebCore::MediaPlayer::errorLog): Ditto.
238         * platform/graphics/MediaPlayer.h:
239         * platform/graphics/MediaPlayerPrivate.h:
240
241         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
242         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
243         (WebCore::MediaPlayerPrivateAVFoundationObjC::timedMetadata):
244         (WebCore::MediaPlayerPrivateAVFoundationObjC::accessLog):
245         (WebCore::MediaPlayerPrivateAVFoundationObjC::errorLog):
246         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
247         (WebCore::itemKVOProperties):
248         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
249
250 2014-04-03  Andrei Bucur  <abucur@adobe.com>
251
252         [CSS Regions] Include region range information when printing the render tree
253         https://bugs.webkit.org/show_bug.cgi?id=131159
254
255         Reviewed by Mihnea Ovidenie.
256
257         With this change showRenderObject() will print the region range for objects inside
258         a flow thread. The format is:
259         Rs: <startRegion> Re: <endRegion>
260
261         Because this can be called anytime during debugging, it's necessary to disable the
262         current flow thread caching to prevent using the wrong flow thread for an object.
263
264         Tests: No new tests, no functional change.
265
266         * rendering/RenderFlowThread.cpp:
267         (WebCore::CurrentRenderFlowThreadDisabler::CurrentRenderFlowThreadDisabler):
268         (WebCore::CurrentRenderFlowThreadDisabler::~CurrentRenderFlowThreadDisabler):
269         * rendering/RenderFlowThread.h:
270         * rendering/RenderObject.cpp:
271         (WebCore::RenderObject::showRegionsInformation): Added.
272         (WebCore::RenderObject::showRenderObject):
273         * rendering/RenderObject.h:
274
275 2014-04-03  Antti Koivisto  <antti@apple.com>
276
277         RenderSnapshottedPlugIn::paint should use iterator for traversal.
278         https://bugs.webkit.org/show_bug.cgi?id=131158
279
280         Reviewed by Dean Jackson.
281
282         * rendering/RenderSnapshottedPlugIn.cpp:
283         (WebCore::RenderSnapshottedPlugIn::paint):
284
285 2014-03-27  Sergio Villar Senin  <svillar@igalia.com>
286
287         [CSS Grid Layout] <string> not allowed in grid-{area | row | column} syntax
288         https://bugs.webkit.org/show_bug.cgi?id=129713
289
290         Reviewed by Darin Adler.
291
292         Grid positioning properties no longer accept <string> values for
293         named grid lines as they did in previous versions of the specs. They
294         were first replaced by <ident> and since the beginning of 2014 they
295         should only accept <custom-ident>.
296
297         Updated the parser and the style resolver to this new syntax. Also
298         updated the tests accordingly.
299
300         Test: fast/css-grid-layout/grid-container-change-named-grid-lines-recompute-child.html
301
302         * css/CSSParser.cpp:
303         (WebCore::isValidCustomIdent): New function that checks that the
304         <custom-ident> is valid.
305         (WebCore::CSSParser::parseIntegerOrCustomIdentFromGridPosition):
306         (WebCore::CSSParser::parseGridPosition):
307         (WebCore::CSSParser::parseIntegerOrStringFromGridPosition):
308         Replaced by WebCore::CSSParser::parseIntegerOrCustomIdentFromGridPosition.
309         * css/CSSParser.h:
310         * css/StyleResolver.cpp:
311         (WebCore::createGridPosition):
312
313 2014-04-03  Antti Koivisto  <antti@apple.com>
314
315         Crash after mutating after pseudo style
316         https://bugs.webkit.org/show_bug.cgi?id=130881
317
318         Reviewed by Andreas Kling.
319
320         Test: fast/css/pseudo-after-crash.html
321
322         * style/StyleResolveTree.cpp:
323         (WebCore::Style::updateBeforeOrAfterPseudoElement):
324         
325             Invalidate the cached renderer for pseudo elements too.
326     
327         (WebCore::Style::needsPseudeElement): Deleted.
328         
329             Fix spelling.
330
331 2014-04-02  Chris Fleizach  <cfleizach@apple.com>
332
333         AX: AccessibilityObject::children() returns invalid results sometimes
334         https://bugs.webkit.org/show_bug.cgi?id=130563
335
336         Reviewed by Joseph Pecoraro.
337
338         Allow the DOM inspector to handle AX objects that do not have Node equivalents
339         (e.g. anonymous renderers).
340
341         * inspector/InspectorDOMAgent.cpp:
342         (WebCore::InspectorDOMAgent::processAccessibilityChildren):
343         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
344         * inspector/InspectorDOMAgent.h:
345
346 2014-04-02  Alexey Proskuryakov  <ap@apple.com>
347
348         Sandbox violation in NetworkProcess when uploading a bundle
349         https://bugs.webkit.org/show_bug.cgi?id=131133
350
351         Reviewed by Brady Eidson.
352
353         Track generated file ownership explicitly, so that each copy of FormData would know
354         whether to delete the file.
355
356         This part is needed to prevent asserting in FormData destructor in NetworkProcess,
357         because it doesn't delete the files. Also, some cleanup.
358
359         * WebCore.exp.in: Don't export FormData::removeGeneratedFilesIfNeeded(), WebKit2
360         doesn't need it any more.
361         * platform/network/FormData.cpp: Removed m_hasGeneratedFiles. There is no problem
362         iterating over FormDataElements to compute it, and that's more robust when FormDatas
363         are passed or stored on disk permanently.
364         Updated touched functions to use C++ iteration, and renamed "e" to "element".
365         (WebCore::FormData::encode): Keep encoding a boolean for hasGeneratedFiles, because
366         the encoded FormData can be stored persitently, and we can't change the format.
367
368         * platform/network/FormData.h: (WebCore::FormDataElement::FormDataElement):
369         Added m_ownsGeneratedFile. FormData will only delete files it owns. Since files
370         are generated immediately before form submission, it's always the FormData being
371         submitted that owns the generated files.
372
373 2014-04-02  Mihnea Ovidenie  <mihnea@adobe.com>
374
375         [CSSRegions] Use RenderStyle::hasFlowInto when needed
376         https://bugs.webkit.org/show_bug.cgi?id=131092
377
378         Reviewed by Andrei Bucur.
379
380         Add hasFlowInto() helper method on RenderStyle to be used
381         instead of directly checking the presence or absence of flowThread value.
382         No new functionality, no new tests.
383
384         * css/CSSComputedStyleDeclaration.cpp:
385         (WebCore::ComputedStyleExtractor::propertyValue):
386         * dom/Element.cpp:
387         (WebCore::Element::shouldMoveToFlowThread):
388         * rendering/style/RenderStyle.h:
389         * style/StyleResolveTree.cpp:
390         (WebCore::Style::isRendererReparented):
391
392 2014-04-02  Benjamin Poulain  <benjamin@webkit.org>
393
394         CSS JIT: the adjacent position is never reset
395         https://bugs.webkit.org/show_bug.cgi?id=131145
396
397         Reviewed by Andreas Kling.
398
399         Corresponding radar: <rdar://problem/16440036>. The backtracking action would use a tail
400         when not needed.
401
402         Test: fast/selectors/multiple-adjacent-chain-without-adjacent-tail.html
403
404         * cssjit/SelectorCompiler.cpp:
405         (WebCore::SelectorCompiler::updateChainStates):
406
407 2014-04-02  Brent Fulgham  <bfulgham@apple.com>
408
409         Speculative build fix for Windows.
410
411         * DerivedSources.make: Make sure we generate our media control
412         scripts for Apple Windows (but not WinCairo)
413
414 2014-04-02  Tim Horton  <timothy_horton@apple.com>
415
416         Fix the !USE(IOSURFACE) iOS build.
417
418         * platform/ios/MemoryPressureHandlerIOS.mm:
419         (WebCore::MemoryPressureHandler::platformReleaseMemory):
420
421 2014-04-02  Mark Rowe  <mrowe@apple.com>
422
423         <https://webkit.org/b/131136> Remove FrameLoadRequest's m_lockHistory member since it's always false.
424
425         Reviewed by Andreas Kling.
426
427         * loader/FrameLoadRequest.cpp:
428         (WebCore::FrameLoadRequest::FrameLoadRequest):
429         * loader/FrameLoadRequest.h:
430         (WebCore::FrameLoadRequest::FrameLoadRequest):
431         (WebCore::FrameLoadRequest::lockHistory): Deleted.
432         (WebCore::FrameLoadRequest::setLockHistory): Deleted.
433         * loader/FrameLoader.cpp:
434         (WebCore::FrameLoader::load): Remove an if whose body was never executed.
435
436 2014-04-02  Mark Rowe  <mrowe@apple.com>
437
438         <https://webkit.org/b/131135> Introduce LockHistory and LockBackForwardList enums to use in place of bools.
439
440         These arguments are often passed using literals at the call site, where the use of bools severely hinders
441         the readability of the code.
442
443         Reviewed by Andreas Kling.
444
445         * WebCore.exp.in:
446         * html/HTMLAnchorElement.cpp:
447         (WebCore::HTMLAnchorElement::handleClick):
448         * html/HTMLFormElement.cpp:
449         (WebCore::HTMLFormElement::submit):
450         * html/HTMLFrameElementBase.cpp:
451         (WebCore::HTMLFrameElementBase::openURL):
452         (WebCore::HTMLFrameElementBase::setLocation):
453         * html/HTMLFrameElementBase.h:
454         * inspector/InspectorFrontendClientLocal.cpp:
455         (WebCore::InspectorFrontendClientLocal::openInNewTab):
456         * inspector/InspectorPageAgent.cpp:
457         (WebCore::InspectorPageAgent::navigate):
458         * loader/FormSubmission.cpp:
459         (WebCore::FormSubmission::FormSubmission):
460         (WebCore::FormSubmission::create):
461         * loader/FormSubmission.h:
462         (WebCore::FormSubmission::lockHistory):
463         * loader/FrameLoader.cpp:
464         (WebCore::FrameLoader::changeLocation):
465         (WebCore::FrameLoader::urlSelected):
466         (WebCore::FrameLoader::loadURLIntoChildFrame):
467         (WebCore::FrameLoader::loadFrameRequest):
468         (WebCore::FrameLoader::loadURL):
469         (WebCore::FrameLoader::loadWithNavigationAction):
470         (WebCore::FrameLoader::clientRedirected):
471         (WebCore::FrameLoader::loadPostRequest):
472         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
473         (WebCore::FrameLoader::loadDifferentDocumentItem):
474         * loader/FrameLoader.h:
475         * loader/FrameLoaderTypes.h:
476         * loader/NavigationScheduler.cpp:
477         (WebCore::ScheduledNavigation::ScheduledNavigation):
478         (WebCore::ScheduledNavigation::lockHistory):
479         (WebCore::ScheduledNavigation::lockBackForwardList):
480         (WebCore::ScheduledURLNavigation::ScheduledURLNavigation):
481         (WebCore::ScheduledRedirect::ScheduledRedirect):
482         (WebCore::ScheduledLocationChange::ScheduledLocationChange):
483         (WebCore::ScheduledRefresh::ScheduledRefresh):
484         (WebCore::ScheduledHistoryNavigation::ScheduledHistoryNavigation):
485         (WebCore::ScheduledFormSubmission::ScheduledFormSubmission):
486         (WebCore::NavigationScheduler::scheduleRedirect):
487         (WebCore::NavigationScheduler::mustLockBackForwardList):
488         (WebCore::NavigationScheduler::scheduleLocationChange):
489         (WebCore::NavigationScheduler::scheduleFormSubmission):
490         * loader/NavigationScheduler.h:
491         * loader/SubframeLoader.cpp:
492         (WebCore::SubframeLoader::requestFrame):
493         (WebCore::SubframeLoader::requestObject):
494         (WebCore::SubframeLoader::loadOrRedirectSubframe):
495         * loader/SubframeLoader.h:
496         * page/ContextMenuController.cpp:
497         (WebCore::openNewWindow):
498         (WebCore::ContextMenuController::contextMenuItemSelected):
499         * page/DOMWindow.cpp:
500         (WebCore::DOMWindow::setLocation):
501         (WebCore::DOMWindow::createWindow):
502         (WebCore::DOMWindow::open):
503         * svg/SVGAElement.cpp:
504         (WebCore::SVGAElement::defaultEventHandler):
505
506 2014-04-02  Tim Horton  <timothy_horton@apple.com>
507
508         Pool IOSurfaces to help with allocation cost
509         https://bugs.webkit.org/show_bug.cgi?id=131096
510         <rdar://problem/15373942>
511
512         Reviewed by Simon Fraser.
513
514         * WebCore.exp.in:
515         * WebCore.xcodeproj/project.pbxproj:
516         
517         * platform/Timer.h:
518         (WebCore::TimerBase::startRepeating): Add a std::chrono startRepeating.
519
520         * platform/graphics/cg/IOSurfacePool.h: Added.
521         (WebCore::IOSurfacePool::CachedSurfaceDetails::CachedSurfaceDetails):
522         (WebCore::IOSurfacePool::CachedSurfaceDetails::resetLastUseTime):
523         * platform/graphics/cg/ImageBufferBackingStoreCache.cpp: Removed.
524         * platform/graphics/cg/ImageBufferBackingStoreCache.h: Removed.
525         * platform/graphics/cg/IOSurfacePool.cpp: Added.
526         (WebCore::IOSurfacePool::IOSurfacePool):
527         (WebCore::IOSurfacePool::sharedPool):
528         (WebCore::surfaceMatchesParameters):
529         (WebCore::IOSurfacePool::willAddSurface):
530         (WebCore::IOSurfacePool::didRemoveSurface):
531         (WebCore::IOSurfacePool::didUseSurfaceOfSize):
532         (WebCore::IOSurfacePool::takeSurface):
533         (WebCore::IOSurfacePool::addSurface):
534         (WebCore::IOSurfacePool::insertSurfaceIntoPool):
535         (WebCore::IOSurfacePool::setPoolSize):
536         (WebCore::IOSurfacePool::tryEvictInUseSurface):
537         (WebCore::IOSurfacePool::tryEvictOldestCachedSurface):
538         (WebCore::IOSurfacePool::evict):
539         (WebCore::IOSurfacePool::collectInUseSurfaces):
540         (WebCore::IOSurfacePool::markOlderSurfacesPurgeable):
541         (WebCore::IOSurfacePool::collectionTimerFired):
542         (WebCore::IOSurfacePool::scheduleCollectionTimer):
543         (WebCore::IOSurfacePool::discardAllSurfaces):
544         (WebCore::IOSurfacePool::showPoolStatistics):
545         Add a pool of IOSurfaces. It behaves as such:
546
547             - Keeps up to 64MB of surfaces.
548             - Keeps unused and in-use surfaces (but never gets more than 1/2 full with the latter)
549             - Marks surfaces purgeable after they've been unused for 2 seconds.
550             - Tries to move surfaces from the in-use pool to the unused pool every 500ms.
551             - Evicts in an LRU-ish fashion, interleaving eviction of the oldest
552               surfaces and the in-use surfaces (since in-use surfaces are not immediately
553               useful for the pool, but they are desirous because they were recently used).
554             - Throws everything away under memory pressure.
555
556         * platform/graphics/cocoa/IOSurface.mm:
557         (IOSurface::create):
558         Try to grab a surface from the IOSurfacePool.
559
560         * platform/ios/MemoryPressureHandlerIOS.mm:
561         (WebCore::MemoryPressureHandler::platformReleaseMemory):
562         * platform/mac/MemoryPressureHandlerMac.mm:
563         (WebCore::MemoryPressureHandler::install):
564         (WebCore::MemoryPressureHandler::platformReleaseMemory):
565         * platform/MemoryPressureHandler.cpp:
566         (WebCore::MemoryPressureHandler::platformReleaseMemory):
567         Fix some includes, and throw away all surfaces when we're under memory pressure.
568
569 2014-04-02  Stephanie Lewis  <slewis@apple.com>
570
571         Roll out http://trac.webkit.org/changeset/166144
572         <rdar://problem/16481284> PLT stops loading on news.google.com
573
574         Unreviewed rollout.
575
576         Rollout 166144 since it prevents the PLT from completing.
577
578         * dom/ContainerNode.cpp:
579         (WebCore::ContainerNode::suspendPostAttachCallbacks):
580         (WebCore::ContainerNode::resumePostAttachCallbacks):
581         (WebCore::ContainerNode::queuePostAttachCallback):
582         (WebCore::ContainerNode::postAttachCallbacksAreSuspended):
583         (WebCore::ContainerNode::dispatchPostAttachCallbacks):
584         * dom/ContainerNode.h:
585         * dom/Document.cpp:
586         (WebCore::Document::recalcStyle):
587         * dom/Element.h:
588         (WebCore::PostAttachCallbackDisabler::PostAttachCallbackDisabler):
589         (WebCore::PostAttachCallbackDisabler::~PostAttachCallbackDisabler):
590         * html/HTMLEmbedElement.cpp:
591         (WebCore::HTMLEmbedElement::parseAttribute):
592         * html/HTMLFormControlElement.cpp:
593         (WebCore::focusPostAttach):
594         (WebCore::HTMLFormControlElement::didAttachRenderers):
595         (WebCore::updateFromElementCallback):
596         (WebCore::HTMLFormControlElement::didRecalcStyle):
597         * html/HTMLFrameOwnerElement.cpp:
598         (WebCore::needsStyleRecalcCallback):
599         (WebCore::HTMLFrameOwnerElement::scheduleSetNeedsStyleRecalc):
600         * html/HTMLObjectElement.cpp:
601         (WebCore::HTMLObjectElement::parseAttribute):
602         (WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk):
603         (WebCore::HTMLObjectElement::hasValidClassId):
604         (WebCore::HTMLObjectElement::renderFallbackContent):
605         * html/HTMLObjectElement.h:
606         * html/HTMLPlugInImageElement.cpp:
607         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
608         (WebCore::HTMLPlugInImageElement::createElementRenderer):
609         (WebCore::HTMLPlugInImageElement::didAttachRenderers):
610         (WebCore::HTMLPlugInImageElement::willDetachRenderers):
611         (WebCore::HTMLPlugInImageElement::updateWidgetIfNecessary):
612         (WebCore::HTMLPlugInImageElement::didMoveToNewDocument):
613         (WebCore::HTMLPlugInImageElement::updateWidgetCallback):
614         (WebCore::HTMLPlugInImageElement::startLoadingImage):
615         (WebCore::HTMLPlugInImageElement::startLoadingImageCallback):
616         (WebCore::HTMLPlugInImageElement::createShadowIFrameSubtree):
617         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
618         (WebCore::HTMLPlugInImageElement::didRecalcStyle): Deleted.
619         (WebCore::HTMLPlugInImageElement::scheduleUpdateForAfterStyleResolution): Deleted.
620         (WebCore::HTMLPlugInImageElement::updateAfterStyleResolution): Deleted.
621         (WebCore::HTMLPlugInImageElement::removedFrom): Deleted.
622         (WebCore::is100Percent): Deleted.
623         (WebCore::HTMLPlugInImageElement::setNeedsImageReload): Deleted.
624         * html/HTMLPlugInImageElement.h:
625         (WebCore::HTMLPlugInImageElement::imageLoader): Deleted.
626         (WebCore::HTMLPlugInImageElement::updateImageLoaderWithNewURLSoon): Deleted.
627         * style/StyleResolveTree.cpp:
628         (WebCore::Style::needsPseudeElement):
629         (WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded):
630         (WebCore::Style::attachRenderTree):
631         (WebCore::Style::updateBeforeOrAfterPseudoElement):
632         (WebCore::Style::needsPseudoElement): Deleted.
633         (WebCore::Style::postResolutionCallbackQueue): Deleted.
634         (WebCore::Style::queuePostResolutionCallback): Deleted.
635         (WebCore::Style::suspendMemoryCacheClientCalls): Deleted.
636         (WebCore::Style::PostResolutionCallbackDisabler::PostResolutionCallbackDisabler): Deleted.
637         (WebCore::Style::PostResolutionCallbackDisabler::~PostResolutionCallbackDisabler): Deleted.
638         (WebCore::Style::postResolutionCallbacksAreSuspended): Deleted.
639         * style/StyleResolveTree.h:
640
641 2014-04-02  Jinwoo Song  <jinwoo7.song@samsung.com>
642
643         Page should use std::unique_ptr for PointerLockController
644         https://bugs.webkit.org/show_bug.cgi?id=131098
645
646         Reviewed by Anders Carlsson.
647
648         Make Page keep a std::unique_ptr to PointerLockController. Store page 
649         references and return controller references where possible.
650
651         * dom/Document.cpp:
652         (WebCore::Document::prepareForDestruction):
653         (WebCore::Document::webkitExitPointerLock):
654         (WebCore::Document::webkitPointerLockElement):
655         * dom/Element.cpp:
656         (WebCore::Element::removedFrom):
657         (WebCore::Element::webkitRequestPointerLock):
658         * page/Page.cpp:
659         (WebCore::Page::Page):
660         * page/Page.h:
661         (WebCore::Page::pointerLockController):
662         * page/PointerLockController.cpp:
663         (WebCore::PointerLockController::PointerLockController):
664         (WebCore::PointerLockController::requestPointerLock):
665         (WebCore::PointerLockController::requestPointerUnlock):
666         (WebCore::PointerLockController::create): Deleted.
667         * page/PointerLockController.h:
668
669 2014-04-02  Dean Jackson  <dino@apple.com>
670
671         Load Media Controls js/css from bundle
672         https://bugs.webkit.org/show_bug.cgi?id=131086
673
674         Followup comments from Eric Carlson.
675
676         Remove the booleans that were guarding loading the resources.
677
678         * rendering/RenderThemeIOS.h:
679         * rendering/RenderThemeIOS.mm:
680         (WebCore::RenderThemeIOS::mediaControlsStyleSheet):
681         (WebCore::RenderThemeIOS::mediaControlsScript):
682         (WebCore::RenderThemeIOS::RenderThemeIOS):
683         * rendering/RenderThemeMac.h:
684         * rendering/RenderThemeMac.mm:
685         (WebCore::RenderThemeMac::RenderThemeMac):
686         (WebCore::RenderThemeMac::mediaControlsStyleSheet):
687         (WebCore::RenderThemeMac::mediaControlsScript):
688
689 2014-04-01  Dean Jackson  <dino@apple.com>
690
691         Load Media Controls js/css from bundle
692         https://bugs.webkit.org/show_bug.cgi?id=131086
693
694         Reviewed by Eric Carlson.
695
696         Rather than embed encoded versions of the JS and CSS files
697         into C++ source, just load the files directly from the bundle.
698
699         * DerivedSources.make: Removed now unnecessary rules.
700         * WebCore.xcodeproj/project.pbxproj: Copy mediaControls files to the bundle.
701         * rendering/RenderThemeIOS.h:
702         * rendering/RenderThemeIOS.mm:
703         (WebCore::RenderThemeIOS::RenderThemeIOS):
704         (WebCore::RenderThemeIOS::mediaControlsStyleSheet): Load from the bundle.
705         (WebCore::RenderThemeIOS::mediaControlsScript): Ditto.
706         * rendering/RenderThemeMac.h:
707         * rendering/RenderThemeMac.mm:
708         (WebCore::RenderThemeMac::RenderThemeMac):
709         (WebCore::RenderThemeMac::mediaControlsStyleSheet):
710         (WebCore::RenderThemeMac::mediaControlsScript):
711
712 2014-04-02  Daniel Bates  <dabates@apple.com>
713
714         Move focus management API from HTMLDocument to Document
715         https://bugs.webkit.org/show_bug.cgi?id=131079
716         <rdar://problem/16220103>
717
718         Reviewed by Timothy Hatcher.
719
720         Merged from Blink (patch by Christophe Dumez):
721         https://src.chromium.org/viewvc/blink?view=rev&revision=165515
722
723         Move hasFocus() and attribute activeElement from interface HTMLDocument
724         to DOMDocument as per section Focus management APIs of the HTML5 standard:
725         <http://www.whatwg.org/specs/web-apps/current-work/#focus-management-apis> (1 April 2014).
726
727         Test: fast/dom/Document/xml-document-focus.xml
728
729         * bindings/objc/PublicDOMInterfaces.h: Moved hasFocus() and property activeElement from
730         interface DOMHTMLDocument to DOMDocument.
731         * dom/Document.cpp:
732         (WebCore::Document::activeElement): Added.
733         (WebCore::Document::hasFocus): Added.
734         * dom/Document.h:
735         * dom/Document.idl:
736         * html/HTMLDocument.cpp:
737         (WebCore::HTMLDocument::activeElement): Deleted.
738         (WebCore::HTMLDocument::hasFocus): Deleted.
739         * html/HTMLDocument.h:
740         * html/HTMLDocument.idl:
741
742 2014-04-02  Benjamin Poulain  <benjamin@webkit.org>
743
744         Refactor the function call generator to take the arguments by value
745         https://bugs.webkit.org/show_bug.cgi?id=131129
746
747         Reviewed by Andreas Kling.
748
749         Nothing forces the pointed address to stay alive between setOneArgument/setTwoArguments
750         and prepareAndCall.
751
752         This patch changes FunctionCall to:
753         -Keep the register by value instead of using pointers.
754         -Crash at compile time if a register is invalid.
755
756         * cssjit/FunctionCall.h:
757         (WebCore::FunctionCall::FunctionCall):
758         (WebCore::FunctionCall::setOneArgument):
759         (WebCore::FunctionCall::setTwoArguments):
760         (WebCore::FunctionCall::swapArguments):
761         (WebCore::FunctionCall::prepareAndCall):
762         * cssjit/RegisterAllocator.h:
763         (WebCore::RegisterAllocator::isValidRegister):
764
765 2014-04-02  Daniel Bates  <dabates@apple.com>
766
767         Remove Settings::maximumDecodedImageSize()
768         https://bugs.webkit.org/show_bug.cgi?id=131057
769         <rdar://problem/15626368>
770
771         Reviewed by Darin Adler.
772
773         The setting Settings::maximumDecodedImageSize() and its related logic have various
774         shortcomings, including the inability to cancel an image load when the estimated
775         decoded image size exceeds the maximum decoded image size. In the iOS port, this
776         setting is less useful given image subsampling support. For now, we remove this
777         setting and its related logic. Should it turn out that such a setting is useful
778         then we can implement it again taking care to address the shortcomings in the
779         original design.
780
781         * html/HTMLCanvasElement.cpp: For the iOS port, define MaxCanvasArea to be 4580 * 1145
782         pixels such that the maximum size of the image buffer is 20 MB (assumes 4 bytes per pixel).
783         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
784         (WebCore::HTMLCanvasElement::createImageBuffer):
785         * html/HTMLCanvasElement.h:
786         * html/canvas/CanvasRenderingContext2D.cpp:
787         (WebCore::CanvasRenderingContext2D::createImageData):
788         (WebCore::CanvasRenderingContext2D::getImageData):
789         * loader/cache/CachedImage.cpp:
790         (WebCore::CachedImage::addIncrementalDataBuffer):
791         (WebCore::CachedImage::finishLoading):
792         * loader/cache/CachedImage.h:
793         * page/Settings.in:
794
795 2014-04-02  Martin Hock  <mhock@apple.com>
796
797         Unify private browsing with sessions.
798         https://bugs.webkit.org/show_bug.cgi?id=130099
799
800         Reviewed by Alexey Proskuryakov.
801
802         Unless otherwise noted, the following consists solely of mechanical changes to replace querying WebCore::Settings::privateBrowsingEnabled() with Page::usesEphemeralSession().
803
804         * Modules/webdatabase/DatabaseContext.cpp:
805         (WebCore::DatabaseContext::allowDatabaseAccess):
806         * WebCore.exp.in: Remove Settings::setPrivateBrowsingEnabled, add Page::legacyPrivateBrowsingEnabled.
807         * html/HTMLMediaElement.cpp:
808         (WebCore::HTMLMediaElement::parseAttribute):
809         * loader/HistoryController.cpp:
810         (WebCore::HistoryController::updateForStandardLoad):
811         (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
812         (WebCore::HistoryController::updateForClientRedirect):
813         (WebCore::HistoryController::updateForSameDocumentNavigation):
814         (WebCore::HistoryController::pushState):
815         (WebCore::HistoryController::replaceState):
816         * loader/appcache/ApplicationCacheGroup.cpp:
817         (WebCore::ApplicationCacheGroup::cacheForMainRequest):
818         (WebCore::ApplicationCacheGroup::selectCache):
819         (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
820         (WebCore::ApplicationCacheGroup::update):
821         * loader/appcache/ApplicationCacheHost.cpp:
822         (WebCore::ApplicationCacheHost::isApplicationCacheEnabled):
823         * loader/icon/IconController.cpp:
824         (WebCore::IconController::continueLoadWithDecision):
825         * page/Page.cpp:
826         (WebCore::Page::Page): Initialize with defaultSessionID.
827         (WebCore::Page::legacyPrivateBrowsingEnabled): Legacy setting for private browsing.
828         (WebCore::Page::privateBrowsingStateChanged): Move implementation to setSessionID.
829         (WebCore::Page::sessionID): Simplify to just return m_sessionID.
830         (WebCore::Page::setSessionID): Also perform privateBrowsingStateChanged action.a
831         (WebCore::Page::privateBrowsingStateChanged): Deleted.
832         (WebCore::Page::checkSubframeCountConsistency): Deleted.
833         * page/Page.h:
834         * page/PageConsole.cpp:
835         (WebCore::PageConsole::addMessage):
836         (WebCore::PageConsole::messageWithTypeAndLevel):
837         * page/Settings.cpp: Remove privateBrowsingEnabled setting.
838         (WebCore::Settings::Settings):
839         (WebCore::Settings::setPrivateBrowsingEnabled): Page reflects setting using session.
840         * page/Settings.h:
841         * plugins/PluginView.cpp:
842         (WebCore::PluginView::getValue):
843         * rendering/RenderSearchField.cpp:
844         (WebCore::RenderSearchField::addSearchResult):
845         * storage/Storage.cpp:
846         (WebCore::Storage::isDisabledByPrivateBrowsing):
847
848 2014-04-02  Antti Koivisto  <antti@apple.com>
849
850         Try to fix test failures.
851
852         * platform/graphics/ca/mac/TileGrid.mm:
853         (WebCore::TileGrid::TileGrid):  Initialize a field.
854
855 2014-04-02  Timothy Hatcher  <timothy@apple.com>
856
857         Remove Input domain from the Web Inspector protocol.
858
859         https://bugs.webkit.org/show_bug.cgi?id=131073
860
861         Reviewed by Joseph Pecoraro.
862
863         * CMakeLists.txt:
864         * DerivedSources.make:
865         * WebCore.vcxproj/WebCore.vcxproj:
866         * WebCore.vcxproj/WebCore.vcxproj.filters:
867         * WebCore.xcodeproj/project.pbxproj:
868         * inspector/InspectorAllInOne.cpp:
869         * inspector/InspectorController.cpp:
870         (WebCore::InspectorController::InspectorController):
871         * inspector/InspectorInputAgent.cpp: Removed.
872         * inspector/InspectorInputAgent.h: Removed.
873         * inspector/protocol/Input.json: Removed.
874
875 2014-04-02  Antti Koivisto  <antti@apple.com>
876
877         Split tile grid out from TileController
878         https://bugs.webkit.org/show_bug.cgi?id=131102
879
880         Reviewed by Simon Fraser.
881
882         Add a TileGrid class that encapsulates tiles, zoom level and the related metadata.
883         This will make it possible to have multiple grids per TileController later.
884
885 2014-03-31  Brent Fulgham  <bfulgham@apple.com>
886
887         [Win] Correct media controls for test harness
888         https://bugs.webkit.org/show_bug.cgi?id=131008 
889
890         Reviewed by Eric Carlson.
891
892         * rendering/RenderThemeSafari.cpp: Revise to match RenderThemeWin logic.
893         (WebCore::RenderThemeSafari::systemFont):
894         (WebCore::RenderThemeSafari::paintMenuList):
895         (WebCore::RenderThemeSafari::paintSearchFieldResultsButton):
896         (WebCore::RenderThemeSafari::mediaControlsStyleSheet):
897         (WebCore::RenderThemeSafari::mediaControlsScript):
898         (WebCore::RenderThemeSafari::paintMediaFullscreenButton): Deleted.
899         (WebCore::RenderThemeSafari::paintMediaMuteButton): Deleted.
900         (WebCore::RenderThemeSafari::paintMediaPlayButton): Deleted.
901         (WebCore::RenderThemeSafari::paintMediaSeekBackButton): Deleted.
902         (WebCore::RenderThemeSafari::paintMediaSeekForwardButton): Deleted.
903         (WebCore::RenderThemeSafari::paintMediaSliderTrack): Deleted.
904         (WebCore::RenderThemeSafari::paintMediaSliderThumb): Deleted.
905         * rendering/RenderThemeSafari.h:
906
907 2014-04-02  peavo@outlook.com  <peavo@outlook.com>
908
909         [WinCairo] Compile error.
910         https://bugs.webkit.org/show_bug.cgi?id=131110
911
912         Reviewed by Simon Fraser.
913
914         Image::size() now returns a FloatSize instead of an IntSize.
915
916         * platform/win/DragImageCairoWin.cpp:
917         (WebCore::createDragImageFromImage):
918
919 2014-04-02  David Kilzer  <ddkilzer@apple.com>
920
921         Use outermost containing isolate when constructing bidi runs
922         <http://webkit.org/b/131107>
923         <rdar://problem/15690021>
924
925         Reviewed by Darin Adler.
926
927         Merged from Blink (patch by jww@chromium.org):
928         https://src.chromium.org/viewvc/blink?revision=157268&view=revision
929         http://crbug.com/279277
930
931             Update containingIsolate to go back all the way to top
932             isolate from current root, rather than stopping at the first
933             isolate it finds. This works because the current root is
934             always updated with each isolate run.
935
936         Tests: fast/text/international/unicode-bidi-isolate-nested-with-removes-not-adjacent.html
937                fast/text/international/unicode-bidi-isolate-nested-with-removes.html
938
939         * rendering/InlineIterator.h:
940         (WebCore::highestContainingIsolateWithinRoot):
941         * rendering/RenderBlockLineLayout.cpp:
942         (WebCore::constructBidiRunsForSegment):
943
944 2014-04-02  Chris Fleizach  <cfleizach@apple.com>
945
946         AX: Improve ARIA live region reliability by sending notifications when live regions are created/shown and hidden/destroyed
947         https://bugs.webkit.org/show_bug.cgi?id=124381
948
949         Reviewed by Mario Sanchez Prada.
950
951         Re-organize some code so that when we detect a new node has been created, we can safely determine its live region status.
952         If it is a live region, we fire off a live region created notification.
953
954         Test: platform/mac/accessibility/live-region-creation-notification.html
955
956         * accessibility/AXObjectCache.cpp:
957         (WebCore::AXObjectCache::handleLiveRegionCreated):
958         (WebCore::AXObjectCache::childrenChanged):
959         (WebCore::AXObjectCache::handleAttributeChanged):
960         * accessibility/AXObjectCache.h:
961         (WebCore::AXObjectCache::childrenChanged):
962         * accessibility/AccessibilityObject.cpp:
963         (WebCore::AccessibilityObject::defaultLiveRegionStatusForRole):
964         (WebCore::AccessibilityObject::liveRegionStatusIsEnabled):
965         (WebCore::AccessibilityObject::supportsARIALiveRegion):
966         * accessibility/AccessibilityObject.h:
967         (WebCore::AccessibilityObject::ariaLiveRegionStatus):
968         * accessibility/AccessibilityRenderObject.cpp:
969         (WebCore::AccessibilityRenderObject::ariaLiveRegionStatus):
970         * accessibility/AccessibilityRenderObject.h:
971         * accessibility/ios/AXObjectCacheIOS.mm:
972         (WebCore::AXObjectCache::postPlatformNotification):
973         * accessibility/ios/WebAccessibilityObjectWrapperIOS.h:
974         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
975         (-[WebAccessibilityObjectWrapper postLiveRegionCreatedNotification]):
976         * accessibility/mac/AXObjectCacheMac.mm:
977         (WebCore::AXObjectCache::postPlatformNotification):
978
979 2014-04-02  Martin Robinson  <mrobinson@igalia.com>
980
981         REGRESSION(r165704): [GTK] Inspector resources not correctly generated
982         https://bugs.webkit.org/show_bug.cgi?id=130343
983
984         Reviewed by Gustavo Noronha Silva.
985
986         * CMakeLists.txt: Generate the web inspector JS file into the new WebInspectorUI derived sources
987         directory.
988
989 2014-04-02  Zalan Bujtas  <zalan@apple.com>
990
991         Unreviewed build fix after r166642.
992         (WinCairo should really turn subpixel layout on.)
993
994         * platform/graphics/LayoutSize.h:
995         (WebCore::flooredForPainting):
996
997 2014-04-02  Zalan Bujtas  <zalan@apple.com>
998
999         Subpixel rendering: Make GraphicsContext::drawTiledImage* functions float based.
1000         https://bugs.webkit.org/show_bug.cgi?id=131062
1001
1002         Reviewed by Simon Fraser.
1003
1004         This is in preparation to support subpixel positioned/sized background images. Generated images
1005         need to be able to sized on device pixels.
1006
1007         No change in behavior.
1008
1009         * platform/graphics/GraphicsContext.cpp:
1010         (WebCore::GraphicsContext::drawImage):
1011         (WebCore::GraphicsContext::drawTiledImage):
1012         * platform/graphics/GraphicsContext.h:
1013
1014 2014-04-02  Alex Christensen  <achristensen@webkit.org>
1015
1016         [WinCairo] Build fix after r166496.
1017         https://bugs.webkit.org/show_bug.cgi?id=131006
1018
1019         Reviewed by Carlos Garcia Campos.
1020
1021         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
1022         (WebCore::InbandTextTrackPrivateGStreamer::handleSample):
1023         (WebCore::InbandTextTrackPrivateGStreamer::streamChanged):
1024         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1025         (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
1026         (WebCore::MediaPlayerPrivateGStreamer::videoChanged):
1027         (WebCore::MediaPlayerPrivateGStreamer::videoCapsChanged):
1028         (WebCore::MediaPlayerPrivateGStreamer::audioChanged):
1029         (WebCore::MediaPlayerPrivateGStreamer::textChanged):
1030         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1031         (WebCore::MediaPlayerPrivateGStreamerBase::volumeChanged):
1032         (WebCore::MediaPlayerPrivateGStreamerBase::muteChanged):
1033         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
1034         (WebCore::TrackPrivateBaseGStreamer::activeChanged):
1035         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
1036         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
1037         (webkitVideoSinkRender):
1038         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1039         (webKitWebSrcChangeState):
1040         (webKitWebSrcNeedDataCb):
1041         (webKitWebSrcEnoughDataCb):
1042         (webKitWebSrcSeekDataCb):
1043         Added std::function<void()> constructors to help Visual Studio decide which version of 
1044         GMainLoopSource::schedule or GMainLoopSource::scheduleAfterDelay to use.
1045
1046 2014-04-02  Zalan Bujtas  <zalan@apple.com>
1047
1048         Subpixel rendering: Transition class CSSImageGeneratorValue/class StyleImage (and its dependencies) from 
1049         IntSize to FloatSize to enable subpixel sized (generated)images.
1050         https://bugs.webkit.org/show_bug.cgi?id=130659
1051
1052         Reviewed by Simon Fraser and Andreas Kling.
1053
1054         This is in preparation to support subpixel positioned/sized background images. Generated images
1055         needs to be able to sized on device pixels.
1056
1057         No change in behavior.
1058
1059         * WebCore.vcxproj/WebCore.vcxproj:
1060         * WebCore.vcxproj/WebCore.vcxproj.filters:
1061         * WebCore.xcodeproj/project.pbxproj:
1062         * css/CSSCanvasValue.cpp:
1063         (WebCore::CSSCanvasValue::fixedSize):
1064         (WebCore::CSSCanvasValue::image):
1065         * css/CSSCanvasValue.h:
1066         * css/CSSCrossfadeValue.cpp:
1067         (WebCore::CSSCrossfadeValue::fixedSize):
1068         (WebCore::CSSCrossfadeValue::image):
1069         * css/CSSCrossfadeValue.h:
1070         * css/CSSFilterImageValue.cpp:
1071         (WebCore::CSSFilterImageValue::fixedSize):
1072         (WebCore::CSSFilterImageValue::image):
1073         * css/CSSFilterImageValue.h:
1074         * css/CSSGradientValue.cpp:
1075         (WebCore::CSSGradientValue::image):
1076         (WebCore::positionFromValue):
1077         (WebCore::CSSGradientValue::computeEndPoint):
1078         (WebCore::endPointsFromAngle):
1079         (WebCore::CSSLinearGradientValue::createGradient):
1080         (WebCore::CSSRadialGradientValue::createGradient):
1081         * css/CSSGradientValue.h:
1082         (WebCore::CSSGradientValue::fixedSize):
1083         * css/CSSImageGeneratorValue.cpp:
1084         (WebCore::CSSImageGeneratorValue::cachedImageForSize):
1085         (WebCore::CSSImageGeneratorValue::saveCachedImageForSize):
1086         (WebCore::CSSImageGeneratorValue::evictCachedGeneratedImage):
1087         (WebCore::CSSImageGeneratorValue::CachedGeneratedImage::CachedGeneratedImage):
1088         (WebCore::CSSImageGeneratorValue::image):
1089         (WebCore::CSSImageGeneratorValue::fixedSize):
1090         * css/CSSImageGeneratorValue.h:
1091         * loader/cache/CachedImage.cpp:
1092         (WebCore::CachedImage::setContainerSizeForRenderer):
1093         * loader/cache/CachedImage.h:
1094         * platform/graphics/FloatSizeHash.h: Added.
1095         (WTF::FloatHash<WebCore::FloatSize>::hash):
1096         (WTF::FloatHash<WebCore::FloatSize>::equal):
1097         (WTF::HashTraits<WebCore::FloatSize>::constructDeletedValue):
1098         (WTF::HashTraits<WebCore::FloatSize>::isDeletedValue):
1099         * platform/graphics/LayoutSize.h:
1100         (WebCore::flooredForPainting):
1101         * rendering/RenderImageResourceStyleImage.h:
1102         * rendering/RenderListMarker.cpp:
1103         (WebCore::RenderListMarker::computePreferredLogicalWidths):
1104         * rendering/style/StyleCachedImage.cpp:
1105         (WebCore::StyleCachedImage::imageSize):
1106         (WebCore::StyleCachedImage::setContainerSizeForRenderer):
1107         (WebCore::StyleCachedImage::image):
1108         * rendering/style/StyleCachedImage.h:
1109         * rendering/style/StyleCachedImageSet.cpp:
1110         (WebCore::StyleCachedImageSet::imageSize):
1111         (WebCore::StyleCachedImageSet::setContainerSizeForRenderer):
1112         (WebCore::StyleCachedImageSet::image):
1113         * rendering/style/StyleCachedImageSet.h:
1114         * rendering/style/StyleGeneratedImage.cpp:
1115         (WebCore::StyleGeneratedImage::imageSize):
1116         (WebCore::StyleGeneratedImage::computeIntrinsicDimensions):
1117         (WebCore::StyleGeneratedImage::image):
1118         * rendering/style/StyleGeneratedImage.h:
1119         * rendering/style/StyleImage.h:
1120         * rendering/style/StylePendingImage.h:
1121         * svg/graphics/SVGImageCache.cpp:
1122         (WebCore::SVGImageCache::setContainerSizeForRenderer):
1123         * svg/graphics/SVGImageCache.h:
1124
1125 2014-04-02  Gergo Balogh  <gbalogh.u-szeged@partner.samsung.com>
1126
1127         Warning fix for RenderLayer.
1128         https://bugs.webkit.org/show_bug.cgi?id=131090
1129
1130         Reviewed by Csaba Osztrogonác.
1131
1132         * rendering/RenderLayer.cpp:
1133         (WebCore::RenderLayer::updateDescendantDependentFlags):
1134
1135 2014-04-02  Frédéric Wang  <fred.wang@free.fr>
1136
1137         Operator stretching: read the Open Type MATH table
1138         https://bugs.webkit.org/show_bug.cgi?id=130324
1139
1140         Reviewed by Chris Fleizach.
1141
1142         We parse and expose some data from the OpenType MATH table that will be
1143         be relevant for at least the MathML operator stretching (bug 130322):
1144         math constants, italic corrections and size variants / glyph assembly.
1145         This will be tested when the MathML code uses the data.
1146
1147         * WebCore.xcodeproj/project.pbxproj: Add OpenTypeTypes.h to the Mac build.
1148         * platform/graphics/opentype/OpenTypeMathData.cpp: We implement the low-level parsing of the MATH table.
1149         (WebCore::OpenType::MathItalicsCorrectionInfo::getItalicCorrection):
1150         (WebCore::OpenType::MathGlyphInfo::mathItalicsCorrectionInfo):
1151         (WebCore::OpenType::GlyphAssembly::getAssemblyParts):
1152         (WebCore::OpenType::MathGlyphConstruction::getSizeVariants):
1153         (WebCore::OpenType::MathGlyphConstruction::getAssemblyParts):
1154         (WebCore::OpenType::MathVariants::mathGlyphConstruction):
1155         (WebCore::OpenType::MATHTable::mathConstants):
1156         (WebCore::OpenType::MATHTable::mathGlyphInfo):
1157         (WebCore::OpenType::MATHTable::mathVariants):
1158         (WebCore::OpenTypeMathData::OpenTypeMathData): We load the MATH table.
1159         (WebCore::OpenTypeMathData::getMathConstant): We add a function to get values from the MathConstant subtable.
1160         (WebCore::OpenTypeMathData::getItalicCorrection): We add a function to get italic correction from the MathGlyphInfo subtable.
1161         (WebCore::OpenTypeMathData::getMathVariants): We add a function to get size variants / glyph assembly from the MathVariants subtable.
1162         * platform/graphics/opentype/OpenTypeMathData.h: We expose three new functions to get math data.
1163         * platform/graphics/opentype/OpenTypeTypes.h: We share the coverage tables that are common to vertical and math data.
1164         (WebCore::OpenType::TableWithCoverage::getCoverageIndex): We add a function to get the coverage index from a given glyph.
1165         * platform/graphics/opentype/OpenTypeVerticalData.cpp: We move the coverage tables to OpenTypeTypes.h.
1166
1167 2014-04-02  Ion Rosca  <rosca@adobe.com>
1168
1169         [CSS Blending] Compositing requirements for blending are not computed correctly
1170         https://bugs.webkit.org/show_bug.cgi?id=130664
1171
1172         Reviewed by Dean Jackson.
1173
1174         Tests: css3/compositing/blend-mode-accelerated-with-multiple-stacking-contexts.html
1175                css3/compositing/blend-mode-with-accelerated-sibling.html
1176
1177         Compositing requirements for blending: if a layer having blend mode
1178         other than normal is composited for any reason, its closest stacking
1179         context ancestor should be composited as well.
1180
1181         * rendering/RenderLayer.cpp:
1182         (WebCore::RenderLayer::RenderLayer):
1183         * rendering/RenderLayer.h: added a new field,
1184         m_hasUnisolatedCompositedBlendingDescendants, which is true if the layer
1185         has composited blending descendants not isolated by any stacking context child;
1186         added a new method: isolatesCompositedBlending(), which is true if we should
1187         accelerate that layer in order to perform isolation correctly.
1188
1189         * rendering/RenderLayerCompositor.cpp:
1190         (WebCore::CompositingState::CompositingState): m_subtreeHasBlending was renamed
1191         m_hasUnisolatedCompositedBlendingDescendants in order to be more self-explanatory.
1192         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1193         computes the isolation requirements for composited blending by
1194         (re)setting RenderLayer::m_hasUnisolatedCompositedBlendingDescendants flag.
1195
1196         (WebCore::RenderLayerCompositor::reasonsForCompositing):
1197         fixed the reason of compositing: isolation instead of blending.
1198
1199         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason):
1200         * rendering/RenderLayerCompositor.h:
1201
1202 2014-04-02  Frédéric Wang  <fred.wang@free.fr>
1203
1204         Operator stretching: expose a math data API
1205         https://bugs.webkit.org/show_bug.cgi?id=130572
1206
1207         Reviewed by Chris Fleizach.
1208
1209         We expose a new SimpleFontData API to give access to the data from the
1210         OpenType MATH table. The class OpenTypeMathData will
1211         be implemented in bug 130324. On Darwin platform, we also implement the
1212         missing FontPlatformData::openTypeTable function which will be necessary
1213         to load the OpenType MATH table. The changes are intended to be used
1214         for MathML operator stretching (bug 130322) so tests are not added yet.
1215
1216         * CMakeLists.txt: add new OpenTypeMathData files.
1217         * WebCore.vcxproj/WebCore.vcxproj: ditto.
1218         * WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
1219         * WebCore.xcodeproj/project.pbxproj: ditto.
1220         * platform/graphics/FontPlatformData.cpp:
1221         (WebCore::FontPlatformData::openTypeTable): We implement openTypeTable() on Darwin platform.
1222         * platform/graphics/FontPlatformData.h: We expose openTypeTable() on Darwin platform.
1223         * platform/graphics/SimpleFontData.cpp:
1224         (WebCore::SimpleFontData::SimpleFontData):
1225         (WebCore::SimpleFontData::mathData): Initialize and return the math data.
1226         * platform/graphics/SimpleFontData.h: We expose a mathData() function to access the MATH data.
1227         * platform/graphics/opentype/OpenTypeMathData.cpp: Added. This is a new class that will be used to parse the data from the OpenType MATH table.
1228         (WebCore::OpenTypeMathData::OpenTypeMathData):
1229         * platform/graphics/opentype/OpenTypeMathData.h: Added.
1230         (WebCore::OpenTypeMathData::create):
1231         (WebCore::OpenTypeMathData::hasMathData):
1232
1233 2014-04-01  Mihnea Ovidenie  <mihnea@adobe.com>
1234
1235         [CSSRegions] Displaying region's children in another region not supported
1236         https://bugs.webkit.org/show_bug.cgi?id=130735
1237
1238         Reviewed by David Hyatt.
1239
1240         With http://trac.webkit.org/changeset/166353, we disabled the possibility
1241         of collecting the region's children into another flow and displaying them
1242         in another region.
1243         I added a new test for this and also changed the plain ASSERT in Element dtor
1244         to ASSERT_WITH_SECURITY_IMPLICATION to better reflect the meaning of the assertion.
1245
1246         Test: fast/regions/region-child-not-flowed.html
1247
1248         * dom/Element.cpp:
1249         (WebCore::Element::~Element):
1250
1251 2014-04-01  Andrei Bucur  <abucur@adobe.com>
1252
1253         [CSS Regions] Simplify the RenderFlowThread state pusher
1254         https://bugs.webkit.org/show_bug.cgi?id=131035
1255
1256         Reviewed by David Hyatt.
1257
1258         The RenderFlowThread state pusher is desynchronized from the RenderView layout state pusher
1259         by one renderer. This patch fixes the anomaly by correctly ordering the push and pop operations
1260         between the two systems.
1261
1262         Tests: no functional change, no new tests.
1263
1264         * rendering/RenderFlowThread.cpp:
1265         (WebCore::RenderFlowThread::pushFlowThreadLayoutState):
1266         (WebCore::RenderFlowThread::popFlowThreadLayoutState):
1267         (WebCore::RenderFlowThread::offsetFromLogicalTopOfFirstRegion):
1268         * rendering/RenderView.cpp:
1269         (WebCore::RenderView::pushLayoutState):
1270         * rendering/RenderView.h:
1271
1272 2014-04-01  Beth Dakin  <bdakin@apple.com>
1273
1274         willReveal edge events should be hooked up for overflow:scroll
1275         https://bugs.webkit.org/show_bug.cgi?id=131071
1276         -and corresponding-
1277         <rdar://problem/16190392>
1278
1279         Reviewed by Sam Weinig.
1280
1281         This patch moves the will reveal logic from FrameView to Document so that it can 
1282         be shared for RenderLayers.
1283
1284         This is mostly just a moved function, but now the function takes an Element* that 
1285         represents the target of the event if the target is not the window.
1286         * dom/Document.cpp:
1287         (WebCore::Document::sendWillRevealEdgeEventsIfNeeded):
1288         * dom/Document.h:
1289
1290         No longer implement sendWillRevealEdgeEventsIfNeeded() on FrameView or 
1291         ScrollableArea at all. Call into Document instead.
1292         * page/FrameView.cpp:
1293         (WebCore::FrameView::scrollPositionChanged):
1294         (WebCore::FrameView::sendWillRevealEdgeEventsIfNeeded): Deleted.
1295         * page/FrameView.h:
1296         * platform/ScrollableArea.h:
1297         (WebCore::ScrollableArea::sendWillRevealEdgeEventsIfNeeded): Deleted.
1298
1299         Call sendWillRevealEdgeEventsIfNeeded() after sending scroll events. 
1300         * rendering/RenderLayer.cpp:
1301         (WebCore::RenderLayer::scrollTo):
1302
1303 2014-04-01  Jon Honeycutt  <jhoneycutt@apple.com>
1304
1305         Crash in WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients
1306
1307         <https://bugs.webkit.org/show_bug.cgi?id=121887>
1308         <rdar://problem/15073043>
1309
1310         Reviewed by Dean Jackson.
1311
1312         Test: svg/filters/first-letter-crash.html
1313
1314         * rendering/FilterEffectRenderer.cpp:
1315         (WebCore::FilterEffectRenderer::buildReferenceFilter):
1316         Added a null check to prevent crashes for anonymous RenderObjects.
1317
1318         * rendering/RenderLayer.cpp:
1319         (WebCore::RenderLayer::filterNeedsRepaint):
1320         Get the enclosing element, if there is one, and recalculate its style.
1321         We use the enclosing element so that we recalculate style for the
1322         ancestor of an anonymous RenderElement.
1323         (WebCore::RenderLayer::enclosingElement):
1324         Remove an assertion; we may now reach this condition if loading a
1325         cached SVG document results in RenderLayer::filterNeedsRepaint() being
1326         called before the object has been inserted into the render tree.
1327
1328         * rendering/RenderLayerFilterInfo.cpp:
1329         (WebCore::RenderLayer::FilterInfo::notifyFinished):
1330         Tell the RenderLayer that the filter needs repainting.
1331         (WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients):
1332         Get the Element from the renderer rather than asking the renderer's
1333         Element, which will be null for anonymous RenderObjects.
1334
1335         * rendering/RenderLayerFilterInfo.h:
1336         Removed declaration for the old workaround function, layerElement().
1337
1338 2014-04-01  Ryuan Choi  <ryuan.choi@samsung.com>
1339
1340         Build break when disabled VIDEO since r166261
1341         https://bugs.webkit.org/show_bug.cgi?id=131087
1342
1343         Reviewed by Gyuyoung Kim.
1344
1345         * testing/Internals.cpp: Added ENABLE(VIDEO) guards
1346         (WebCore::Internals::simulateSystemSleep):
1347         (WebCore::Internals::simulateSystemWake):
1348
1349 2014-04-01  Timothy Hatcher  <timothy@apple.com>
1350
1351         Remove HeapProfiler from the Web Inspector protocol.
1352
1353         https://bugs.webkit.org/show_bug.cgi?id=131070
1354
1355         Reviewed by Joseph Pecoraro.
1356
1357         * CMakeLists.txt:
1358         * DerivedSources.make:
1359         * WebCore.vcxproj/WebCore.vcxproj:
1360         * WebCore.vcxproj/WebCore.vcxproj.filters:
1361         * WebCore.xcodeproj/project.pbxproj:
1362         * bindings/js/ScriptHeapSnapshot.h: Removed.
1363         * bindings/js/ScriptProfiler.h:
1364         (WebCore::ScriptProfiler::takeHeapSnapshot): Deleted.
1365         (WebCore::ScriptProfiler::isSampling): Deleted.
1366         (WebCore::ScriptProfiler::hasHeapProfiler): Deleted.
1367         * inspector/InspectorAllInOne.cpp:
1368         * inspector/InspectorController.cpp:
1369         (WebCore::InspectorController::InspectorController):
1370         * inspector/InspectorHeapProfilerAgent.cpp: Removed.
1371         * inspector/InspectorHeapProfilerAgent.h: Removed.
1372         * inspector/InspectorInstrumentation.cpp:
1373         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
1374         * inspector/InspectorProfilerAgent.cpp:
1375         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
1376         (WebCore::InspectorProfilerAgent::getProfileHeaders):
1377         (WebCore::InspectorProfilerAgent::removeProfile):
1378         (WebCore::InspectorProfilerAgent::resetState): The CommandLineAPIHost call to
1379         clear inspected objects should have not been here. It was only needed by the
1380         HeapProfilerAgent.
1381         (WebCore::InspectorProfilerAgent::resetFrontendProfiles):
1382         (WebCore::InspectorProfilerAgent::collectGarbage): Deleted.
1383         (WebCore::InspectorProfilerAgent::createSnapshotHeader): Deleted.
1384         (WebCore::InspectorProfilerAgent::isSampling): Deleted.
1385         (WebCore::InspectorProfilerAgent::hasHeapProfiler): Deleted.
1386         (WebCore::InspectorProfilerAgent::getHeapSnapshot): Deleted.
1387         (WebCore::InspectorProfilerAgent::takeHeapSnapshot): Deleted.
1388         (WebCore::InspectorProfilerAgent::getObjectByHeapObjectId): Deleted.
1389         (WebCore::InspectorProfilerAgent::getHeapObjectId): Deleted.
1390         * inspector/InspectorProfilerAgent.h:
1391         * inspector/InstrumentingAgents.h:
1392         (WebCore::InstrumentingAgents::inspectorHeapProfilerAgent): Deleted.
1393         (WebCore::InstrumentingAgents::setInspectorHeapProfilerAgent): Deleted.
1394         * inspector/WebConsoleAgent.cpp:
1395         (WebCore::WebConsoleAgent::addInspectedHeapObject): Deleted.
1396         * inspector/WebConsoleAgent.h:
1397         * inspector/WorkerInspectorController.cpp:
1398         (WebCore::WorkerInspectorController::WorkerInspectorController):
1399         * inspector/protocol/HeapProfiler.json: Removed.
1400         * inspector/protocol/Profiler.json:
1401
1402 2014-04-01  Zoltan Horvath  <zoltan@webkit.org>
1403
1404         [CSS Exclusions] Remove exclusions parsing support
1405         https://bugs.webkit.org/show_bug.cgi?id=131046
1406
1407         Reviewed by David Hyatt.
1408
1409         CSS Exclusions specification [1] needs some evolution before the actual implementation happens.
1410         We have only the parsing code in WebKit for -webkit-wrap-flow and -webkit-wrap-through.
1411         This patch removes the code from the trunk for now, it doesn't make sense to keep it around.
1412
1413         [1] http://www.w3.org/TR/css3-exclusions/
1414
1415         Removed existing parsing tests.
1416
1417         * css/CSSComputedStyleDeclaration.cpp:
1418         (WebCore::ComputedStyleExtractor::propertyValue):
1419         * css/CSSParser.cpp:
1420         (WebCore::isValidKeywordPropertyAndValue):
1421         (WebCore::isKeywordPropertyID):
1422         (WebCore::CSSParser::parseValue):
1423         * css/CSSPrimitiveValueMappings.h:
1424         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Deleted.
1425         (WebCore::CSSPrimitiveValue::operator WrapFlow): Deleted.
1426         (WebCore::CSSPrimitiveValue::operator WrapThrough): Deleted.
1427         * css/CSSPropertyNames.in:
1428         * css/CSSValueKeywords.in:
1429         * css/DeprecatedStyleBuilder.cpp:
1430         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1431         * css/StyleResolver.cpp:
1432         (WebCore::StyleResolver::applyProperty):
1433         * rendering/style/RenderStyle.cpp:
1434         (WebCore::RenderStyle::changeRequiresLayout):
1435         * rendering/style/RenderStyle.h:
1436         * rendering/style/RenderStyleConstants.h:
1437         * rendering/style/StyleRareNonInheritedData.cpp:
1438         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1439         (WebCore::StyleRareNonInheritedData::operator==):
1440         * rendering/style/StyleRareNonInheritedData.h:
1441
1442 2014-04-01  Timothy Hatcher  <timothy@apple.com>
1443
1444         Remove the rest of the old Canvas inspection support.
1445
1446         https://bugs.webkit.org/show_bug.cgi?id=131066
1447
1448         Reviewed by Joseph Pecoraro.
1449
1450         * CMakeLists.txt: Removed Canvas.json.
1451         * DerivedSources.make: Ditto.
1452         * inspector/InjectedScriptCanvasModuleSource.js: Removed.
1453         * inspector/protocol/Canvas.json: Removed.
1454
1455 2014-04-01  Alexey Proskuryakov  <ap@apple.com>
1456
1457         Eliminate HTMLFormElement::m_shouldSubmit
1458         https://bugs.webkit.org/show_bug.cgi?id=131055
1459
1460         Reviewed by Tim Horton.
1461
1462         m_shouldSubmit was used for two purposes:
1463         - as a return value in a function whose return value is ignored by all callers;
1464         - to make a decision that's local to a function.
1465
1466         There is no need for it to be an instance variable.
1467
1468         * html/HTMLFormElement.cpp:
1469         (WebCore::HTMLFormElement::HTMLFormElement):
1470         (WebCore::HTMLFormElement::prepareForSubmission):
1471         (WebCore::HTMLFormElement::submit):
1472         * html/HTMLFormElement.h:
1473
1474 2014-04-01  Benjamin Poulain  <bpoulain@apple.com>
1475
1476         Remove a couple of useless static strings
1477         https://bugs.webkit.org/show_bug.cgi?id=131003
1478
1479         Reviewed by David Kilzer.
1480
1481         There is zero value in keeping those strings alive.
1482
1483         * css/StyleProperties.cpp:
1484         (WebCore::isInitialOrInherit):
1485
1486 2014-04-01  Myles C. Maxfield  <mmaxfield@apple.com>
1487
1488         svg/text/text-overflow-ellipsis-svgfont-kerning-ligatures.html and svg/css/font-face-crash.html frequently assert in ComplexTextController::offsetForPosition
1489         https://bugs.webkit.org/show_bug.cgi?id=119747
1490
1491         Reviewed by Simon Fraser.
1492
1493         Even though kerning and ligatures currently don't work with the
1494         simple text path, messing those up is better than creating null
1495         CTRun and CTLine objects.
1496
1497         Rather than calling the badly-named renderingContext() function on TextRun objects
1498         to determine if they are drawn with an SVG font, this patch creates a wrapper function
1499         with a better name and uses that instead.
1500
1501         Test: svg/text/svg-font-hittest.html
1502
1503         * platform/graphics/Font.cpp:
1504         (WebCore::isDrawnWithSVGFont): Wrapper around renderingContext()
1505         (WebCore::Font::drawText): Use wrapper function
1506         (WebCore::Font::drawEmphasisMarks): Use wrapper function
1507         (WebCore::Font::width): Use wrapper function
1508         (WebCore::Font::selectionRectForText): Use wrapper function
1509         (WebCore::Font::offsetForPosition): If we are using an SVG font, use the simple path
1510         instead of the complex one
1511         (WebCore::Font::codePath): Use wrapper function
1512         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1513         (WebCore::FontPlatformData::ctFont):
1514
1515 2014-04-01  Daniel Bates  <dabates@apple.com>
1516
1517         RenderQuote must destroy remaining text renderer before first letter renderer
1518         https://bugs.webkit.org/show_bug.cgi?id=78023
1519         <rdar://problem/10830009>
1520
1521         Reviewed by Brent Fulgham.
1522
1523         Merged from Blink (patch by Abhishek Arya):
1524         https://src.chromium.org/viewvc/blink?view=rev&revision=151270
1525
1526         Following the fix for <https://bugs.webkit.org/show_bug.cgi?id=114586>, a
1527         RenderQuote may have child render objects for the first letter of its text
1528         and everything following the first letter so as to support the CSS first-
1529         letter property. The latter renderer is responsible for destroying the former
1530         on destruction. It's sufficient to reverse the destruction of the children of
1531         RenderQuote to ensure that we destroy the remaining text renderer before we
1532         destroy the first letter renderer.
1533
1534         Test: fast/css-generated-content/quote-first-letter-crash.html
1535
1536         * rendering/RenderQuote.cpp:
1537         (WebCore::RenderQuote::updateText):
1538
1539 2014-04-01  David Kilzer  <ddkilzer@apple.com>
1540
1541         Do not allow HTTP refresh headers to refresh to javascript: URLs
1542         <http://webkit.org/b/119051>
1543         <rdar://problem/14536453>
1544
1545         Reviewed by Alexey Proskuryakov.
1546
1547         Merged from Blink (patch by tsepez@chromium.org):
1548         https://src.chromium.org/viewvc/blink?revision=153912&view=revision
1549         http://crbug.com/258151
1550
1551             This behaviour has been standard in IE since IE7.  This makes us both
1552             more compatible and less vulnerable to XSS.
1553
1554         Tests: http/tests/security/no-javascript-location-percent-escaped.html
1555                http/tests/security/no-javascript-location.html
1556                http/tests/security/no-javascript-refresh-percent-escaped.php
1557                http/tests/security/no-javascript-refresh-spaces.php
1558                http/tests/security/no-javascript-refresh-static-percent-escaped.html
1559                http/tests/security/no-javascript-refresh-static-spaces.html
1560                http/tests/security/no-javascript-refresh-static.html
1561                http/tests/security/no-javascript-refresh.php
1562
1563         * dom/Document.cpp:
1564         (WebCore::Document::processHttpEquiv):
1565         * loader/FrameLoader.cpp:
1566         (WebCore::FrameLoader::receivedFirstData):
1567         - Do not fire meta http refresh for a javascript: URL protocol.
1568
1569 2014-04-01  Pratik Solanki  <psolanki@apple.com>
1570
1571         Unreviewed build fix. Remove duplicate file entries.
1572
1573         * WebCore.xcodeproj/project.pbxproj:
1574
1575 2014-03-31  Simon Fraser  <simon.fraser@apple.com>
1576
1577         Enable WEB_TIMING on Mac and iOS
1578         https://bugs.webkit.org/show_bug.cgi?id=128064
1579
1580         Reviewed by Sam Weinig, Brent Fulgham.
1581
1582         Enable WEB_TIMING. Add PerformanceTiming.cpp and JSPerformanceTiming.cpp
1583         to the project.
1584         
1585         * Configurations/FeatureDefines.xcconfig:
1586         * WebCore.xcodeproj/project.pbxproj:
1587
1588 2014-04-01  James Craig  <jcraig@apple.com>
1589
1590         AX: AccessibilityRenderObject::ariaLiveRegionAtomic() should default to true if
1591         roleValue is ApplicationAlertRole || ApplicationStatusRole
1592         https://bugs.webkit.org/show_bug.cgi?id=130907
1593
1594         Reviewed by Chris Fleizach.
1595
1596         Tests: inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion.html:
1597                platform/mac/accessibility/aria-liveregions-attributes.html:
1598
1599         Updated AccessibilityRenderObject::ariaLiveRegionAtomic() to match ARIA spec.
1600
1601         * accessibility/AccessibilityRenderObject.cpp:
1602         (WebCore::AccessibilityRenderObject::ariaLiveRegionAtomic):
1603
1604 2014-04-01  Zan Dobersek  <zdobersek@igalia.com>
1605
1606         Unreviewed. Fixing debug builds after r166586.
1607
1608         * svg/SVGElement.cpp:
1609         (WebCore::SVGElement::addEventListener): Fix the ASSERT.
1610         (WebCore::SVGElement::removeEventListener): Ditto.
1611
1612 2014-04-01  Zan Dobersek  <zdobersek@igalia.com>
1613
1614         Prevent unnecessary copies in compareEqual template
1615         https://bugs.webkit.org/show_bug.cgi?id=131014
1616
1617         Reviewed by Antti Koivisto.
1618
1619         * rendering/style/RenderStyle.h:
1620         (compareEqual): Casting the second parameter to a non-const, non-reference type
1621         causes an extra copy of that object. Casting to the const reference type of the
1622         first parameter avoids that.
1623
1624 2014-04-01  Zan Dobersek  <zdobersek@igalia.com>
1625
1626         Avoid unnecessary HashSet copies when calling collectInstancesForSVGElement
1627         https://bugs.webkit.org/show_bug.cgi?id=131020
1628
1629         Reviewed by Andreas Kling.
1630
1631         Remove collectInstancesForSVGElement() to avoid HashSet copies when assigning a const
1632         HashSet reference to a non-const HashSet reference. Instead, range-based for-loops are
1633         deployed to iterate directly over the const reference to HashSet that's returned by
1634         SVGElement::instancesForElement(). SVGElement::containingShadowRoot() return value
1635         is checked to see if the iteration should be performed in the first place, preserving
1636         the behavior of collectInstancesForSVGElement().
1637
1638         * svg/SVGElement.cpp:
1639         (WebCore::SVGElement::addEventListener):
1640         (WebCore::SVGElement::removeEventListener):
1641         (WebCore::collectInstancesForSVGElement): Deleted.
1642
1643 2014-04-01  Zan Dobersek  <zdobersek@igalia.com>
1644
1645         Move the attributes HashMap out of the parseAttributes function
1646         https://bugs.webkit.org/show_bug.cgi?id=131019
1647
1648         Reviewed by Andreas Kling.
1649
1650         * xml/parser/XMLDocumentParserLibxml2.cpp:
1651         (WebCore::parseAttributes): Avoid copying the HashMap object that's being returned by
1652         converting it to an xvalue through using std::move() in the return statement.
1653
1654 2014-04-01  Zalan Bujtas  <zalan@apple.com>
1655
1656         Subpixel rendering: Transition class Image (and its dependencies) from int to float to enable subpixel positioned/sized images.
1657         https://bugs.webkit.org/show_bug.cgi?id=130643
1658
1659         Reviewed by Simon Fraser.
1660
1661         This is in preparation to support subpixel positioned/sized background images. While 1x bitmap images can't take
1662         subpixel sizing on hidpi resolutions, both generated and hidpi images can.
1663         This patch does not change Image behavior in general as both position and size are still snapped to integral values.  
1664
1665         No change in behavior.
1666
1667         * WebCore.exp.in:
1668         * css/CSSCrossfadeValue.cpp:
1669         (WebCore::CSSCrossfadeValue::fixedSize):
1670         * css/CSSFilterImageValue.cpp:
1671         (WebCore::CSSFilterImageValue::fixedSize):
1672         * html/canvas/WebGLRenderingContext.cpp:
1673         (WebCore::WebGLRenderingContext::drawImageIntoBuffer):
1674         * loader/cache/CachedImage.cpp:
1675         (WebCore::CachedImage::imageSizeForRenderer):
1676         * page/EventHandler.cpp:
1677         (WebCore::EventHandler::selectCursor):
1678         * platform/Cursor.cpp:
1679         (WebCore::determineHotSpot):
1680         * platform/graphics/BitmapImage.cpp:
1681         (WebCore::BitmapImage::size):
1682         (WebCore::BitmapImage::currentFrameSize):
1683         * platform/graphics/BitmapImage.h:
1684         * platform/graphics/CrossfadeGeneratedImage.cpp:
1685         (WebCore::CrossfadeGeneratedImage::CrossfadeGeneratedImage):
1686         (WebCore::drawCrossfadeSubimage):
1687         (WebCore::CrossfadeGeneratedImage::drawCrossfade):
1688         * platform/graphics/CrossfadeGeneratedImage.h:
1689         * platform/graphics/GeneratedImage.h:
1690         * platform/graphics/Gradient.cpp:
1691         (WebCore::Gradient::adjustParametersForTiledDrawing):
1692         * platform/graphics/Gradient.h:
1693         * platform/graphics/GradientImage.cpp:
1694         (WebCore::GradientImage::drawPattern):
1695         * platform/graphics/GradientImage.h:
1696         * platform/graphics/GraphicsContext.cpp:
1697         (WebCore::GraphicsContext::createCompatibleBuffer):
1698         * platform/graphics/GraphicsContext.h:
1699         * platform/graphics/Image.cpp:
1700         (WebCore::Image::adjustSourceRectForDownSampling):
1701         * platform/graphics/Image.h:
1702         (WebCore::Image::setContainerSize):
1703         (WebCore::Image::rect):
1704         (WebCore::Image::width):
1705         (WebCore::Image::height):
1706         * platform/graphics/ImageBuffer.cpp:
1707         (WebCore::ImageBuffer::createCompatibleBuffer):
1708         * platform/graphics/ImageBuffer.h:
1709         (WebCore::ImageBuffer::create):
1710         * platform/graphics/IntPoint.cpp:
1711         (WebCore::IntPoint::IntPoint):
1712         * platform/graphics/IntPoint.h:
1713         * platform/graphics/IntSize.cpp:
1714         (WebCore::IntSize::IntSize):
1715         * platform/graphics/IntSize.h:
1716         * platform/graphics/cairo/ImageBufferCairo.cpp:
1717         (WebCore::ImageBuffer::ImageBuffer):
1718         * platform/graphics/cairo/ImageCairo.cpp:
1719         (WebCore::Image::drawPattern):
1720         * platform/graphics/cg/ImageBufferCG.cpp:
1721         (WebCore::ImageBuffer::ImageBuffer):
1722         * platform/graphics/cg/ImageBufferDataCG.cpp:
1723         * platform/graphics/cg/PDFDocumentImage.cpp:
1724         (WebCore::PDFDocumentImage::size):
1725         (WebCore::PDFDocumentImage::updateCachedImageIfNeeded):
1726         (WebCore::applyRotationForPainting):
1727         * platform/graphics/cg/PDFDocumentImage.h:
1728         * platform/graphics/cg/PatternCG.cpp:
1729         (WebCore::Pattern::createPlatformPattern):
1730         * platform/graphics/mac/GraphicsContextMac.mm:
1731         * platform/graphics/mac/IconMac.mm:
1732         * platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
1733         (WebCore::TextureMapperTiledBackingStore::updateContentsFromImageIfNeeded):
1734         * platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
1735         (WebCore::CoordinatedImageBacking::update):
1736         * platform/graphics/win/ImageCGWin.cpp:
1737         (WebCore::BitmapImage::getHBITMAPOfSize):
1738         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
1739         * platform/graphics/win/ImageCairoWin.cpp:
1740         (WebCore::BitmapImage::getHBITMAPOfSize):
1741         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
1742         * platform/mac/DragImageMac.mm:
1743         (WebCore::createDragImageFromImage):
1744         * platform/win/DragImageCGWin.cpp:
1745         (WebCore::createDragImageFromImage):
1746         * platform/win/PasteboardWin.cpp:
1747         (WebCore::Pasteboard::writeImage):
1748         * rendering/RenderImage.cpp:
1749         (WebCore::RenderImage::imageSizeForError):
1750         (WebCore::RenderImage::paintReplaced):
1751         * rendering/RenderLayer.cpp:
1752         (WebCore::RenderLayer::drawPlatformResizerImage):
1753         * svg/graphics/SVGImage.cpp:
1754         (WebCore::SVGImage::setContainerSize):
1755         * svg/graphics/SVGImage.h:
1756         * svg/graphics/SVGImageCache.cpp:
1757         (WebCore::SVGImageCache::imageSizeForRenderer):
1758         * svg/graphics/SVGImageCache.h:
1759         * svg/graphics/SVGImageForContainer.cpp:
1760         (WebCore::SVGImageForContainer::size):
1761         * svg/graphics/SVGImageForContainer.h:
1762         * svg/graphics/filters/SVGFEImage.cpp:
1763         (WebCore::FEImage::externalRepresentation):
1764         * testing/Internals.cpp:
1765         (WebCore::Internals::getCurrentCursorInfo):
1766
1767 2014-04-01  Ryuan Choi  <ryuan.choi@samsung.com>
1768
1769         Unreviewed build fix when disabled ACCESSIBILITY
1770
1771         * accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
1772         Separated macros not to check ATK version when disabled ACCESSIBILITY
1773
1774 2014-04-01  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1775
1776         [CMake][EFL] Enable CSS JIT
1777         https://bugs.webkit.org/show_bug.cgi?id=131010
1778
1779         Reviewed by Benjamin Poulain.
1780
1781         Add an inclusion path for enabling CSS JIT on EFL and GTK ports.
1782         This patch only enables it for EFL port.
1783
1784         * CMakeLists.txt:
1785
1786 2014-04-01  Martin Robinson  <mrobinson@igalia.com>
1787
1788         [GTK] Readonly attributes installed as readwrite in GObject DOM bindings
1789         https://bugs.webkit.org/show_bug.cgi?id=130978
1790
1791         Reviewed by Carlos Garcia Campos.
1792
1793         Unify how we decide if an attribute is readable or writeable and improve the code.
1794         This results in some attributes now being marked as read-only which didn't have
1795         corresponding case statements in the set_property switch statements and also correctly
1796         installs set_property support for some more POD types.
1797
1798         * bindings/scripts/CodeGeneratorGObject.pm:
1799         (IsPropertyReadable): Added this helper to simplify deciding if an attribute is readable.
1800         (IsPropertyWriteable): Added this helper to simplify deciding if an attribute is writeable. Also
1801         update the list of types to reflect the full list of types we can generate setters for.
1802         (GenerateProperty): Use the IsPropertyWriteable helper instead of checking whether the attribute is read-only.
1803         Also fix generation of the blurb by using $mutableString instead of $mutableStringconst which isn't used.
1804         (GenerateProperties): Use grep and the new helpers to simplify the code.
1805         (GetReadableProperties): Deleted.
1806         (GetWriteableProperties): Deleted.
1807         * bindings/scripts/test/GObject: Update results
1808
1809 2014-03-31  Ryuan Choi  <ryuan.choi@samsung.com>
1810
1811         [EFL][WK2] Extract the control of page background out of color_set
1812         https://bugs.webkit.org/show_bug.cgi?id=127539
1813
1814         Reviewed by Gyuyoung Kim.
1815
1816         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1817         Added m_viewBackgroundColor to clear when m_setDrawsBackground is false.
1818         (WebCore::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
1819         (WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
1820         (WebCore::CoordinatedGraphicsScene::paintToGraphicsContext):
1821         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
1822         (WebCore::CoordinatedGraphicsScene::setViewBackgroundColor):
1823         (WebCore::CoordinatedGraphicsScene::viewBackgroundColor):
1824         * rendering/RenderLayerBacking.cpp:
1825         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
1826         Added EFL guard not to set opaque as a default for MainFrameRenderViewLayer.
1827         * rendering/RenderLayerCompositor.cpp:
1828         (WebCore::RenderLayerCompositor::ensureRootLayer):
1829         Added EFL guard to apply page scale on RenderView like IOS.
1830
1831 2014-03-31  Byungseon Shin  <sun.shin@lge.com>
1832
1833         [WebGL][OpenGLES] Enable MSAA support for WebGL Canvas
1834         https://bugs.webkit.org/show_bug.cgi?id=130955
1835
1836         Reviewed by Dean Jackson.
1837
1838         To avoid aliasing issues when we render content to WebGL canvas,
1839          we need to implement MSAA support.
1840         - Imagination OpenGLES GPU Driver already support MSAA, so we
1841          need a separate code path to enable it.
1842
1843         * platform/graphics/Extensions3D.h:
1844         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
1845         (WebCore::Extensions3DOpenGLCommon::Extensions3DOpenGLCommon):
1846         * platform/graphics/opengl/Extensions3DOpenGLCommon.h:
1847         (WebCore::Extensions3DOpenGLCommon::isImagination):
1848         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
1849         (WebCore::GraphicsContext3D::reshapeFBOs):
1850
1851 2014-03-31  Alexey Proskuryakov  <ap@apple.com>
1852
1853         Crashes in PageConsole::addMessage
1854         https://bugs.webkit.org/show_bug.cgi?id=130991
1855         <rdar://problem/14795232>
1856
1857         Reviewed by Geoffrey Garen.
1858
1859         Test: http/tests/misc/detached-frame-console.html
1860
1861         * page/DOMWindow.cpp: (WebCore::DOMWindow::printErrorMessage): Added a null check.
1862         It's legitimate for this to be called for a window that is not currently displayed
1863         in a frame.
1864
1865 2014-03-31  Simon Fraser  <simon.fraser@apple.com>
1866
1867         [UI-side compositing] Proxy animations to the UI process
1868         https://bugs.webkit.org/show_bug.cgi?id=130946
1869
1870         Reviewed by Tim Horton.
1871         
1872         To proxy CA animations, make PlatformCAAnimation a pure virtual base class
1873         and subclass for Mac, Windows, and Remote (just like PlatformCALayer).
1874         
1875         Add coding support for TimingFunctions.
1876         
1877         Do some minor #include tidyup.
1878         
1879         Minor refactor in GraphicsLayerCA to share some animations code.
1880
1881         * WebCore.exp.in:
1882         * WebCore.xcodeproj/project.pbxproj:
1883         * platform/animation/TimingFunction.h: Add setters need for encode/decode.
1884         (WebCore::CubicBezierTimingFunction::setValues):
1885         (WebCore::CubicBezierTimingFunction::setTimingFunctionPreset):
1886         (WebCore::StepsTimingFunction::create):
1887         (WebCore::StepsTimingFunction::setNumberOfSteps):
1888         (WebCore::StepsTimingFunction::setStepAtStart):
1889         * platform/graphics/ca/GraphicsLayerCA.cpp:
1890         (WebCore::GraphicsLayerCA::createPlatformCAAnimation):
1891         (WebCore::GraphicsLayerCA::animationCanBeAccelerated): Minor refactor so we can share
1892         code with GraphicsLayerCARemote.
1893         (WebCore::GraphicsLayerCA::addAnimation):
1894         (WebCore::GraphicsLayerCA::createBasicAnimation):
1895         (WebCore::PassRefPtr<PlatformCAAnimation>GraphicsLayerCA::createKeyframeAnimation):
1896         * platform/graphics/ca/GraphicsLayerCA.h:
1897         * platform/graphics/ca/PlatformCAAnimation.h:
1898         (WebCore::PlatformCAAnimation::~PlatformCAAnimation):
1899         (WebCore::PlatformCAAnimation::isPlatformCAAnimationMac):
1900         (WebCore::PlatformCAAnimation::isPlatformCAAnimationWin):
1901         (WebCore::PlatformCAAnimation::isPlatformCAAnimationRemote):
1902         (WebCore::PlatformCAAnimation::PlatformCAAnimation):
1903         (WebCore::PlatformCAAnimation::setType):
1904         * platform/graphics/ca/PlatformCALayer.h:
1905         * platform/graphics/ca/mac/PlatformCAAnimationMac.h: Added.
1906         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
1907         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1908         (PlatformCALayerMac::addAnimationForKey):
1909         (PlatformCALayerMac::animationForKey):
1910         * platform/graphics/ca/mac/TileController.mm:
1911         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
1912         * platform/graphics/ca/win/PlatformCAAnimationWin.h: Added.
1913
1914 2014-03-31  Benjamin Poulain  <benjamin@webkit.org>
1915
1916         CSS JIT: compile the first-child pseudo class
1917         https://bugs.webkit.org/show_bug.cgi?id=130954
1918
1919         Reviewed by Andreas Kling.
1920
1921         * css/ElementRuleCollector.cpp:
1922         (WebCore::ElementRuleCollector::collectMatchingRules):
1923         The compiler use the context's style directly when resolving style. An error introduced
1924         in the rule collector would cause a crash in the compiled code which would be hard to debug.
1925         Add an assertion early in the stack to catch errors where it is easier to debug them.
1926
1927         * css/StyleResolver.cpp:
1928         (WebCore::StyleResolver::State::initForStyleResolve):
1929         * cssjit/SelectorCompiler.cpp:
1930         (WebCore::SelectorCompiler::addPseudoType):
1931         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
1932         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToPreviousAdjacentElement):
1933         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToPreviousAdjacent):
1934         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
1935         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateIndirectAdjacentTreeWalker):
1936         Refactor those to be able to reuse the code getting a sibling element preceding the current element.
1937
1938         (WebCore::SelectorCompiler::SelectorCodeGenerator::jumpIfNotResolvingStyle):
1939         Extract the code checking the current mode from SelectorCodeGenerator::markParentElementIfResolvingStyle()
1940         in a separate function. This will be useful for all the pseudo class with marking.
1941
1942         (WebCore::SelectorCompiler::SelectorCodeGenerator::markParentElementIfResolvingStyle):
1943         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
1944         (WebCore::SelectorCompiler::setFirstChildState):
1945         This is the slow path for when the first-child pseudo class is on a fragment that is not
1946         the rightmost.
1947         The reason to use a slow path is accessing renderStyle() is not trivial and this case isn't not
1948         as common. We should improve this later.
1949
1950         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
1951         This is just implementing the test for first-child plus the tree marking. Nothing fancy,
1952         this is basically the same thing as SelectorChecker.
1953
1954         * dom/Element.cpp:
1955         (WebCore::Element::setChildrenAffectedByFirstChildRules):
1956         * dom/Element.h:
1957         C++ fallback to set the flag, to be improved later with the other flags.
1958
1959         * rendering/style/RenderStyle.h:
1960         I accidentaly put noninheritedFlagsMemoryOffset() as private in the RenderStyle refactoring.
1961
1962         Also update the flags accessor to make them easier to work with from the compiler. In particular,
1963         setFirstChildStateFlags() sets both isUnique and firstChild. Currently the JIT does not need to access
1964         the value so individual flags are made private.
1965
1966 2014-03-31  Dean Jackson  <dino@apple.com>
1967
1968         Remove WEB_ANIMATIONS
1969         https://bugs.webkit.org/show_bug.cgi?id=130989
1970
1971         Reviewed by Simon Fraser.
1972
1973         Remove this feature flag until we plan to implement.
1974
1975         * Configurations/FeatureDefines.xcconfig:
1976
1977 2014-03-31  Simon Fraser  <simon.fraser@apple.com>
1978
1979         Fix iOS build.
1980
1981         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm:
1982         (WebCore::ScrollingTreeScrollingNodeIOS::updateLayersAfterDelegatedScroll):
1983
1984 2014-03-31  Pratik Solanki  <psolanki@apple.com>
1985
1986         Unreviewed. iOS build fix after r166532. Add missing comma.
1987
1988         * dom/DocumentMarker.h:
1989
1990 2014-03-31  Brady Eidson  <beidson@apple.com>
1991
1992         Add variant of phone number parsing that use DocumentMarker in the current selection
1993         <rdar://problem/16379566> and https://bugs.webkit.org/show_bug.cgi?id=130917
1994
1995         Reviewed by Darin Adler.
1996
1997         * dom/DocumentMarker.h:
1998         (WebCore::DocumentMarker::AllMarkers::AllMarkers): Add a new TelephoneNumber document marker type.
1999
2000         * editing/Editor.cpp:
2001         (WebCore::Editor::respondToChangedSelection):
2002         (WebCore::Editor::scanSelectionForTelephoneNumbers): TextIterate over the selected range looking for numbers.
2003         (WebCore::Editor::scanRangeForTelephoneNumbers): Scan the given range for a telephone number,
2004           adding the DocumentMarker to any that are found.
2005         (WebCore::Editor::clearDataDetectedTelephoneNumbers):
2006         * editing/Editor.h:
2007
2008         * html/parser/HTMLTreeBuilder.cpp:
2009         (WebCore::HTMLTreeBuilder::processCharacterBufferForInBody): Only linkify on iOS.
2010
2011         * rendering/InlineTextBox.cpp:
2012         (WebCore::InlineTextBox::paintTelephoneNumberMarker): Placeholder UI while the feature is developed.
2013         (WebCore::InlineTextBox::paintDocumentMarkers):
2014         * rendering/InlineTextBox.h:
2015
2016         * testing/Internals.cpp:
2017         (WebCore::markerTypesFrom):
2018
2019 2014-03-31  Simon Fraser  <simon.fraser@apple.com>
2020
2021         [iOS WK2] Hook up scroll events for accelerated overflow:scroll
2022         https://bugs.webkit.org/show_bug.cgi?id=130976
2023
2024         Reviewed by Tim Horton.
2025
2026         When an accelerated overflow:scroll is scrolled in the UI process,
2027         tell the WebProcess that the scroll happened to update RenderLayer
2028         state and fire events.
2029         
2030         In the WebProcess, RemoteScrollingCoordinator gets a message from the
2031         UI process and calls AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll().
2032         Fixed that function to handle scrolling nodes other than the root, which
2033         required storing a map of ScrollingNodeID->RenderLayer* on RenderLayerCompositor,
2034         accessible through FrameView::scrollableAreaForScrollLayerID().
2035
2036         * WebCore.exp.in:
2037         * page/FrameView.cpp:
2038         (WebCore::FrameView::scrollableAreaForScrollLayerID):
2039         * page/FrameView.h:
2040         * page/scrolling/AsyncScrollingCoordinator.cpp:
2041         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll): Handle
2042         overflow as well as main frame scrolling nodes.
2043         * page/scrolling/ScrollingTree.cpp:
2044         (WebCore::ScrollingTree::viewportChangedViaDelegatedScrolling): Use isScrollingNode().
2045         (WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling): When an overflow
2046         scroll node was scrolled externally, we have to update layers in decendant nodes,
2047         and then call scrollingTreeNodeDidScroll() which tells the ScrollingCoordinator that
2048         we scrolled.
2049         * page/scrolling/ScrollingTree.h: Try to reduce confusion between the roles played
2050         by these various functions, some of which happen in the UI process with UI-side
2051         compositing.
2052         * page/scrolling/ScrollingTreeScrollingNode.h:
2053         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h: Need some functions to be
2054         callable by subclasses.
2055         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm:
2056         (WebCore::ScrollingTreeScrollingNodeIOS::updateLayersAfterDelegatedScroll):
2057         * rendering/RenderLayerCompositor.cpp:
2058         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer): Add
2059         scrolling layers to the m_scrollingNodeToLayerMap
2060         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer): Remove
2061         layer from the m_scrollingNodeToLayerMap.
2062         (WebCore::RenderLayerCompositor::scrollableAreaForScrollLayerID):
2063         * rendering/RenderLayerCompositor.h:
2064
2065 2014-03-31  Antti Koivisto  <antti@apple.com>
2066
2067         Rename TileCache to LegacyTileCache
2068         https://bugs.webkit.org/show_bug.cgi?id=130986
2069
2070         Reviewed by Simon Fraser.
2071
2072         Rename iOS WebKit1 tile cache classes to reflect its status.
2073         This also frees some good type names.
2074
2075         TileCache -> LegacyTileCache
2076         TileGrid -> LegacyTileGrid
2077         TileGridTile -> LegacyTileGridTile
2078         etc.
2079
2080 2014-03-31  Tim Horton  <timothy_horton@apple.com>
2081
2082         Small adjustments to WebCore::IOSurface
2083         https://bugs.webkit.org/show_bug.cgi?id=130981
2084
2085         Reviewed by Simon Fraser.
2086
2087         * WebCore.exp.in:
2088         Export some more things.
2089
2090         * platform/graphics/cocoa/IOSurface.h:
2091         createImage() can't be const because it calls ensurePlatformContext().
2092
2093         * platform/graphics/cocoa/IOSurface.mm:
2094         (IOSurface::createImage):
2095         We should be able to create an image even if the CGContext has been cleared (or never created).
2096
2097         (IOSurface::isInUse):
2098         Rename inUse() to isInUse().
2099
2100         (IOSurface::clearGraphicsContext):
2101         Add clearGraphicsContext().
2102
2103 2014-03-31  Tim Horton  <timothy_horton@apple.com>
2104
2105         Allocate IOSurfaces with the same cache mode that CoreAnimation uses
2106         https://bugs.webkit.org/show_bug.cgi?id=130982
2107
2108         Reviewed by Simon Fraser.
2109
2110         * platform/graphics/cocoa/IOSurface.mm:
2111         (IOSurface::IOSurface):
2112         CA uses kIOMapWriteCombineCache for IOSurfaces allocated on iOS.
2113
2114 2014-03-31  Ion Rosca  <rosca@adobe.com>
2115
2116         [CSS Blending] Blend mode property is propagated to multiple GraphicLayers
2117         https://bugs.webkit.org/show_bug.cgi?id=130337
2118
2119         Reviewed by Dean Jackson.
2120
2121         Resets the blend mode for graphicsLayer when it has an ancestorClippingLayer.
2122
2123         Test: css3/compositing/blend-mode-ancestor-clipping-layer.html
2124
2125         * rendering/RenderLayer.cpp:
2126         (WebCore::RenderLayer::updateBlendMode):
2127         (WebCore::RenderLayer::calculateClipRects):
2128         * rendering/RenderLayerBacking.cpp:
2129         (WebCore::RenderLayerBacking::updateBlendMode):
2130         * rendering/RenderLayerBacking.h:
2131
2132 2014-03-31  Ion Rosca  <rosca@adobe.com>
2133
2134         [CSS Blending] showLayerTree should dump layer's blend mode and isolation properties
2135         https://bugs.webkit.org/show_bug.cgi?id=130922
2136
2137         Reviewed by Simon Fraser.
2138
2139         This change only updates existing tests involving blending. No new test required,
2140         as there is no new or changed functionality.
2141
2142         * rendering/RenderLayer.h: adding blendMode() getter.
2143         * rendering/RenderTreeAsText.cpp:
2144         (WebCore::write):
2145         adding blendMode property and layer's isolation status (does layer isolate blending descendants or not?).
2146
2147 2014-03-31  Benjamin Poulain  <benjamin@webkit.org>
2148
2149         CSS JIT: clean up the functions ending when generating a checker with context
2150         https://bugs.webkit.org/show_bug.cgi?id=130959
2151
2152         Reviewed by Andreas Kling.
2153
2154         This code got refactored over time and now both branches do the exact same action
2155         on the stack.
2156         This patch removes the stack split and move the stack cleanup in the common ending
2157         just before restoring the callee saved registers.
2158
2159         * cssjit/SelectorCompiler.cpp:
2160         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2161
2162 2014-03-31  Beth Dakin  <bdakin@apple.com>
2163
2164         ThemeMac should use std::array instead of IntSize* for control sizes
2165         https://bugs.webkit.org/show_bug.cgi?id=130985
2166
2167         Reviewed by Darin Adler.
2168
2169         Replace uses of const IntSize* with const std::array<IntSize, 3>
2170         * platform/mac/ThemeMac.mm:
2171         (WebCore::sizeFromNSControlSize):
2172         (WebCore::sizeFromFont):
2173         (WebCore::controlSizeFromPixelSize):
2174         (WebCore::setControlSize):
2175         (WebCore::checkboxSizes):
2176         (WebCore::radioSizes):
2177         (WebCore::buttonSizes):
2178         (WebCore::setUpButtonCell):
2179         (WebCore::stepperSizes):
2180
2181 2014-03-31  Hans Muller  <hmuller@adobe.com>
2182
2183         [CSS Shapes] Simplify RasterShape implementation
2184         https://bugs.webkit.org/show_bug.cgi?id=130916
2185
2186         Reviewed by Dean Jackson.
2187
2188         Since only floats can specify shape-outside, the RasterShapeIntervals
2189         class only needs to track the first and last above threshold pixel column
2190         (x1 and x2 in the implementation) for each row. Removed code for dealing with
2191         multiple "runs" per row as well as shape-inside internals.
2192
2193         No new tests, since functionality was only removed.
2194
2195         * rendering/shapes/RasterShape.cpp:
2196         (WebCore::RasterShapeIntervals::computeShapeMarginIntervals):
2197         (WebCore::RasterShapeIntervals::initializeBounds):
2198         (WebCore::RasterShapeIntervals::buildBoundsPath):
2199         (WebCore::RasterShape::getExcludedIntervals):
2200         * rendering/shapes/RasterShape.h:
2201         (WebCore::RasterShapeIntervals::RasterShapeIntervals):
2202         (WebCore::RasterShapeIntervals::intervalAt):
2203         (WebCore::RasterShape::RasterShape):
2204         * rendering/shapes/Shape.cpp:
2205         (WebCore::Shape::createRasterShape):
2206         * rendering/shapes/ShapeInterval.h:
2207         (WebCore::ShapeInterval::unite):
2208
2209 2014-03-31  Andreas Kling  <akling@apple.com>
2210
2211         Always inline toJS() for NodeList.
2212         <https://webkit.org/b/130974>
2213
2214         This is a pretty cheesy optimization, but it's a 3% progression on
2215         Dromaeo/dom-query.html on my MBP.
2216
2217         Reviewed by Benjamin Poulain.
2218
2219         * WebCore.exp.in:
2220         * WebCore.xcodeproj/project.pbxproj:
2221         * bindings/js/JSNodeListCustom.h: Added.
2222         (WebCore::toJS):
2223         * dom/NodeList.idl:
2224
2225 2014-03-31  Benjamin Poulain  <bpoulain@apple.com>
2226
2227         Attempt to fix the 32bits debug builds
2228
2229         The additional debug flags in RefCounted cause the structure to have different alignment
2230         with the 64bits flags.
2231
2232         * rendering/style/RenderStyle.cpp:
2233
2234 2014-03-29  Simon Fraser  <simon.fraser@apple.com>
2235
2236         Clarify some scrolling tree terminology
2237         https://bugs.webkit.org/show_bug.cgi?id=130929
2238
2239         Reviewed by Tim Horton.
2240
2241         Attempt to reduce some ambiguity in scrolling tree terminology.
2242         When async scrolling occurs, there are two tasks we have to perform:
2243         1. Layers need to be updated to reflect the scroll
2244         2. WebCore state has to be updated.
2245         The "updateForViewport" name didn't clearly reflect which of these
2246         tasks was being performed, so rename it to updateLayersAfterViewportChange()
2247         to reflect the fact that it only does the first.
2248         
2249         Remove the Mac implementation of updateLayersAfterViewportChange(), since
2250         it was confsued about this, and was never called anyway.
2251
2252         * WebCore.exp.in:
2253         * page/scrolling/ScrollingTree.cpp:
2254         (WebCore::ScrollingTree::viewportChangedViaDelegatedScrolling):
2255         * page/scrolling/ScrollingTreeScrollingNode.h:
2256         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h:
2257         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm:
2258         (WebCore::ScrollingTreeScrollingNodeIOS::updateLayersAfterViewportChange):
2259         (WebCore::ScrollingTreeScrollingNodeIOS::updateForViewport): Deleted.
2260         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
2261         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
2262         (WebCore::ScrollingTreeScrollingNodeMac::updateLayersAfterViewportChange):
2263         (WebCore::ScrollingTreeScrollingNodeMac::updateForViewport): Deleted.
2264
2265 2014-03-31  Tim Horton  <timothy_horton@apple.com>
2266
2267         [iOS WebKit2] Disable tile cohort retention for now
2268         https://bugs.webkit.org/show_bug.cgi?id=130926
2269         <rdar://problem/16465413>
2270
2271         Reviewed by Simon Fraser.
2272
2273         * WebCore.exp.in:
2274         * page/Settings.cpp:
2275         (WebCore::Settings::Settings):
2276         (WebCore::Settings::setScrollingPerformanceLoggingEnabled):
2277         (WebCore::Settings::setAggressiveTileRetentionEnabled): Deleted.
2278         * page/Settings.h:
2279         (WebCore::Settings::aggressiveTileRetentionEnabled): Deleted.
2280         * page/Settings.in:
2281         Use Settings.in for these simple settings.
2282
2283         * platform/graphics/GraphicsLayerClient.h:
2284         (WebCore::GraphicsLayerClient::shouldAggressivelyRetainTiles):
2285         (WebCore::GraphicsLayerClient::shouldTemporarilyRetainTileCohorts):
2286         * platform/graphics/TiledBacking.h:
2287         * platform/graphics/ca/GraphicsLayerCA.cpp:
2288         (WebCore::GraphicsLayerCA::platformCALayerShouldAggressivelyRetainTiles):
2289         (WebCore::GraphicsLayerCA::platformCALayerShouldTemporarilyRetainTileCohorts):
2290         * platform/graphics/ca/GraphicsLayerCA.h:
2291         * platform/graphics/ca/PlatformCALayerClient.h:
2292         (WebCore::PlatformCALayerClient::platformCALayerShouldAggressivelyRetainTiles):
2293         (WebCore::PlatformCALayerClient::platformCALayerShouldTemporarilyRetainTileCohorts):
2294         * rendering/RenderLayerBacking.cpp:
2295         (WebCore::RenderLayerBacking::shouldAggressivelyRetainTiles):
2296         (WebCore::RenderLayerBacking::shouldTemporarilyRetainTileCohorts):
2297         * rendering/RenderLayerBacking.h:
2298         Plumb the two tile-retention settings through to TileController in a pull manner
2299         instead of a push manner, as there were some cases (especially on iOS) where
2300         the settings weren't always getting pushed down.
2301
2302         * platform/graphics/ca/mac/TileController.h:
2303         * platform/graphics/ca/mac/TileController.mm:
2304         (WebCore::TileController::TileController):
2305         (WebCore::TileController::tileRevalidationTimerFired):
2306         (WebCore::TileController::revalidateTiles):
2307         (WebCore::TileController::drawTileMapContents):
2308         Aggressive tile retention wins over temporary retention. If we aren't
2309         using temporary (cohort) retention, throw away the cohort as soon as it
2310         is created.
2311
2312 2014-03-31  Beth Dakin  <bdakin@apple.com>
2313
2314         Radio buttons and checkboxes should share code
2315         https://bugs.webkit.org/show_bug.cgi?id=130915
2316
2317         Reviewed by Sam Weinig.
2318
2319         Radio buttons and checkboxes now share a lot of code. The common term for both is 
2320         toggle buttons.
2321
2322         Move these radio-sizing functions up in the file to be next to the checkbox sizing 
2323         functions.
2324         * platform/mac/ThemeMac.mm:
2325         (WebCore::radioSizes):
2326         (WebCore::radioMargins):
2327         (WebCore::radioSize):
2328
2329         Configures a radio button or a checkbox.
2330         (WebCore::configureToggleButton):
2331
2332         Creates a radio button or a checkbox.
2333         (WebCore::createToggleButtonCell):
2334
2335         Still have a shared cell for each.
2336         (WebCore::sharedRadioCell):
2337         (WebCore::sharedCheckboxCell):
2338
2339         Does the work of the old paintRadio() and paintCheckbox().
2340         (WebCore::paintToggleButton):
2341
2342         Use sharedRadioCell() here.
2343         (WebCore::ThemeMac::inflateControlPaintRect):
2344
2345         Call paintToggleButton() for radio buttons and checkboxes.
2346         (WebCore::ThemeMac::paint):
2347
2348         All gone.
2349         (WebCore::configureCheckbox): Deleted.
2350         (WebCore::createCheckboxCell): Deleted.
2351         (WebCore::paintCheckbox): Deleted.
2352         (WebCore::radio): Deleted.
2353         (WebCore::paintRadio): Deleted.
2354
2355 2014-03-31  Samuel White  <samuel_white@apple.com>
2356
2357         AX: Need ability to get line range for text marker.
2358         https://bugs.webkit.org/show_bug.cgi?id=130906
2359
2360         Reviewed by Chris Fleizach.
2361
2362         Added ability to get line range from any marker on that line. This matches the functionality of existing
2363         attributes such as AXParagraphTextMarkerRangeForTextMarker and AXSentenceTextMarkerRangeForTextMarker.
2364
2365         Test: platform/mac/accessibility/line-range-for-text-marker.html
2366
2367         * accessibility/AccessibilityObject.cpp:
2368         (WebCore::AccessibilityObject::visiblePositionRangeForRange):
2369         (WebCore::AccessibilityObject::lineRangeForPosition):
2370         * accessibility/AccessibilityObject.h:
2371         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2372         (-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
2373         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
2374
2375 2014-03-31  Anders Carlsson  <andersca@apple.com>
2376
2377         Fix iOS build.
2378
2379         * page/ChromeClient.h:
2380         (WebCore::ChromeClient::updateViewportConstrainedLayers):
2381
2382 2014-03-31  Jer Noble  <jer.noble@apple.com>
2383
2384         [MSE][Mac] Support lease-renewal.
2385         https://bugs.webkit.org/show_bug.cgi?id=130919
2386
2387         Reviewed by Eric Carlson.
2388
2389         Trigger a new key request when receiving an update message containting "renew".
2390
2391         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
2392         (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyRequest): Drive-by fix; generate a UTF-8
2393             based array.
2394         (WebCore::CDMSessionMediaSourceAVFObjC::update):
2395
2396 2014-03-31  Alexey Proskuryakov  <ap@apple.com>
2397
2398         Remove special handling of soft hyphens in search code
2399         https://bugs.webkit.org/show_bug.cgi?id=130940
2400
2401         Reviewed by Anders Carlsson.
2402
2403         ICU knows to ignore soft hyphens, so we don't need to replace them before searching.
2404
2405         Covered by existing tests.
2406
2407         * editing/TextIterator.cpp:
2408         (WebCore::foldQuoteMark):
2409         (WebCore::foldQuoteMarks):
2410         (WebCore::SearchBuffer::SearchBuffer):
2411         (WebCore::SearchBuffer::append):
2412         (WebCore::foldQuoteMarkOrSoftHyphen): Deleted.
2413         (WebCore::foldQuoteMarksAndSoftHyphens): Deleted.
2414
2415 2014-03-31  Alex Christensen  <achristensen@webkit.org>
2416
2417         Preparation for using Soup on Windows.
2418         https://bugs.webkit.org/show_bug.cgi?id=130615
2419
2420         Reviewed by Carlos Garcia Campos.
2421
2422         * WebCore.vcxproj/WebCore.vcxproj:
2423         * WebCore.vcxproj/WebCore.vcxproj.filters:
2424         Added Soup source files in WinCairo build.
2425         * loader/soup/CachedRawResourceSoup.cpp:
2426         * loader/soup/SubresourceLoaderSoup.cpp:
2427         * platform/soup/SharedBufferSoup.cpp:
2428         * platform/soup/URLSoup.cpp:
2429         * platform/network/NetworkStorageSessionStub.cpp:
2430         Only build if USE(SOUP) to prevent building when USE(CURL) is true.
2431         * platform/network/soup/ResourceHandleSoup.cpp:
2432         Only include unistd.h in non-Visual Studio builds.
2433         This would normally be done with a HAVE_UNISTD_H macro when compiling glib and Soup,
2434         but that would need to be left undefined for Visual Studio.
2435
2436 2014-03-31  Zan Dobersek  <zdobersek@igalia.com>
2437
2438         Unreviewed. Addressing reviewing comments for r166491 that I forgot
2439         to address before landing.
2440
2441         * html/FormController.cpp:
2442         (WebCore::SavedFormState::deserialize): No need to move the std::unique_ptr
2443         object on the way out.
2444         (WebCore::FormController::createSavedFormStateMap): FormKeyGenerator can be
2445         allocated on the stack.
2446         (WebCore::FormController::formStatesFromStateVector): Use auto.
2447
2448 2014-03-20  Carlos Garcia Campos  <cgarcia@igalia.com>
2449
2450         [GTK] Use GMainLoopSource for idle and timeout sources in WebCore
2451         https://bugs.webkit.org/show_bug.cgi?id=130078
2452
2453         Reviewed by Philippe Normand.
2454
2455         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
2456         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
2457         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
2458         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2459         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2460         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2461         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2462         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
2463         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
2464         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
2465         * platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
2466         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2467         * platform/gtk/GtkDragAndDropHelper.cpp:
2468         * platform/gtk/SharedTimerGtk.cpp:
2469
2470 2014-03-31  Andrei Bucur  <abucur@adobe.com>
2471
2472         Wrong layout while animating content in regions
2473         https://bugs.webkit.org/show_bug.cgi?id=125086
2474
2475         Reviewed by David Hyatt.
2476
2477         The region to layer and regions to layer mappings should be cleared when the region chain changes.
2478
2479         Test: fast/regions/layers/region-removed-during-animation.html
2480
2481         * rendering/RenderFlowThread.cpp:
2482         (WebCore::RenderFlowThread::invalidateRegions): Clear the two maps and flag them for recomputation.
2483         (WebCore::RenderFlowThread::cachedRegionForCompositedLayer): Assert that the returned region exists.
2484
2485 2014-03-31  Dániel Bátyai  <dbatyai.u-szeged@partner.samsung.com>
2486
2487         Remove hostThisRegister() and hostThisValue()
2488         https://bugs.webkit.org/show_bug.cgi?id=130895
2489
2490         Reviewed by Geoffrey Garen.
2491
2492         Removed hostThisRegister() and hostThisValue() and instead use thisArgumentOffset() and thisValue() respectively.
2493
2494         No new tests, no behavior changes.
2495
2496         * bindings/js/JSNavigatorCustom.cpp:
2497         (WebCore::JSNavigator::webkitGetUserMedia):
2498         * bindings/js/JSPluginElementFunctions.cpp:
2499         (WebCore::callPlugin):
2500         * bindings/scripts/CodeGeneratorJS.pm:
2501         (GenerateImplementation):
2502         * bindings/scripts/test/JS/JSFloat64Array.cpp:
2503         (WebCore::jsFloat64ArrayPrototypeFunctionFoo):
2504         (WebCore::jsFloat64ArrayPrototypeFunctionSet):
2505         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2506         (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
2507         (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
2508         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2509         (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
2510         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2511         (WebCore::jsTestEventTargetPrototypeFunctionItem):
2512         (WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
2513         (WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
2514         (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
2515         * bindings/scripts/test/JS/JSTestInterface.cpp:
2516         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod1):
2517         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
2518         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod3):
2519         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod1):
2520         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
2521         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod3):
2522         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2523         (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
2524         * bindings/scripts/test/JS/JSTestObj.cpp:
2525         (WebCore::jsTestObjPrototypeFunctionVoidMethod):
2526         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
2527         (WebCore::jsTestObjPrototypeFunctionByteMethod):
2528         (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
2529         (WebCore::jsTestObjPrototypeFunctionOctetMethod):
2530         (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
2531         (WebCore::jsTestObjPrototypeFunctionLongMethod):
2532         (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
2533         (WebCore::jsTestObjPrototypeFunctionObjMethod):
2534         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
2535         (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
2536         (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
2537         (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg):
2538         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
2539         (WebCore::jsTestObjPrototypeFunctionSerializedValue):
2540         (WebCore::jsTestObjPrototypeFunctionOptionsObject):
2541         (WebCore::jsTestObjPrototypeFunctionMethodWithException):
2542         (WebCore::jsTestObjPrototypeFunctionCustomMethod):
2543         (WebCore::jsTestObjPrototypeFunctionCustomMethodWithArgs):
2544         (WebCore::jsTestObjPrototypeFunctionAddEventListener):
2545         (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
2546         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoid):
2547         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObj):
2548         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoidException):
2549         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException):
2550         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext):
2551         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState):
2552         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException):
2553         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces):
2554         (WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack):
2555         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
2556         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
2557         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
2558         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString):
2559         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined):
2560         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString):
2561         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
2562         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
2563         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
2564         (WebCore::jsTestObjPrototypeFunctionConditionalMethod1):
2565         (WebCore::jsTestObjPrototypeFunctionConditionalMethod2):
2566         (WebCore::jsTestObjPrototypeFunctionConditionalMethod3):
2567         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
2568         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
2569         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
2570         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
2571         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
2572         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
2573         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
2574         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
2575         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9):
2576         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
2577         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
2578         (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
2579         (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
2580         (WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
2581         (WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
2582         (WebCore::jsTestObjPrototypeFunctionGetSVGDocument):
2583         (WebCore::jsTestObjPrototypeFunctionConvert1):
2584         (WebCore::jsTestObjPrototypeFunctionConvert2):
2585         (WebCore::jsTestObjPrototypeFunctionConvert4):
2586         (WebCore::jsTestObjPrototypeFunctionConvert5):
2587         (WebCore::jsTestObjPrototypeFunctionMutablePointFunction):
2588         (WebCore::jsTestObjPrototypeFunctionImmutablePointFunction):
2589         (WebCore::jsTestObjPrototypeFunctionOrange):
2590         (WebCore::jsTestObjPrototypeFunctionStrictFunction):
2591         (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithSequence):
2592         (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithArray):
2593         (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
2594         (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
2595         (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
2596         (WebCore::jsTestObjPrototypeFunctionAny):
2597         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2598         (WebCore::jsTestTypedefsPrototypeFunctionFunc):
2599         (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
2600         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
2601         (WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg):
2602         (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
2603         (WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
2604         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
2605         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction2):
2606         (WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude):
2607         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithException):
2608         * bridge/objc/objc_runtime.mm:
2609         (JSC::Bindings::callObjCFallbackObject):
2610         * bridge/runtime_method.cpp:
2611         (JSC::callRuntimeMethod):
2612
2613 2014-03-31  Zan Dobersek  <zdobersek@igalia.com>
2614
2615         Move the rest of Source/WebCore/html/ code to std::unique_ptr
2616         https://bugs.webkit.org/show_bug.cgi?id=129669
2617
2618         Reviewed by Anders Carlsson.
2619
2620         Replace the remaining uses of OwnPtr, PassOwnPtr under Source/WebCore/html/ with std::unique_ptr.
2621
2622         * html/FormController.cpp:
2623         (WebCore::SavedFormState::SavedFormState):
2624         (WebCore::SavedFormState::deserialize):
2625         (WebCore::FormController::createSavedFormStateMap):
2626         (WebCore::FormController::formElementsState):
2627         (WebCore::FormController::takeStateForFormElement):
2628         (WebCore::FormController::formStatesFromStateVector):
2629         * html/FormController.h:
2630         * html/HTMLAreaElement.cpp:
2631         (WebCore::HTMLAreaElement::mapMouseEvent):
2632         * html/HTMLAreaElement.h:
2633         * html/HTMLCanvasElement.cpp:
2634         (WebCore::HTMLCanvasElement::setSurfaceSize):
2635         (WebCore::HTMLCanvasElement::createImageBuffer):
2636         * html/HTMLCanvasElement.h:
2637         * html/HTMLCollection.h:
2638         * html/HTMLEmbedElement.cpp:
2639         (WebCore::HTMLEmbedElement::parseAttribute):
2640         * html/HTMLFormControlElement.cpp:
2641         (WebCore::HTMLFormControlElement::updateVisibleValidationMessage):
2642         * html/HTMLFormControlElement.h:
2643         * html/HTMLFormElement.cpp:
2644         (WebCore::HTMLFormElement::addToPastNamesMap):
2645         * html/HTMLFormElement.h:
2646         * html/HTMLInputElement.cpp:
2647         (WebCore::HTMLInputElement::imageLoader):
2648         (WebCore::HTMLInputElement::resetListAttributeTargetObserver):
2649         * html/HTMLInputElement.h:
2650         (WebCore::HTMLInputElement::hasImageLoader):
2651         * html/HTMLObjectElement.cpp:
2652         (WebCore::HTMLObjectElement::parseAttribute):
2653         * html/HTMLPlugInImageElement.cpp:
2654         (WebCore::HTMLPlugInImageElement::startLoadingImage):
2655         * html/HTMLPlugInImageElement.h:
2656         * html/HTMLVideoElement.cpp:
2657         (WebCore::HTMLVideoElement::didAttachRenderers):
2658         (WebCore::HTMLVideoElement::parseAttribute):
2659         * html/HTMLVideoElement.h:
2660         * html/ValidationMessage.cpp:
2661         (WebCore::ValidationMessage::ValidationMessage):
2662         (WebCore::ValidationMessage::setMessage):
2663         (WebCore::ValidationMessage::setMessageDOMAndStartTimer):
2664         (WebCore::ValidationMessage::requestToHideMessage):
2665         * html/ValidationMessage.h:
2666
2667 2014-03-31  Maurice van der Pot  <griffon26@kfk4ever.com>
2668
2669         Fix mixed use of booleans in JPEGImageDecoder.cpp
2670         https://bugs.webkit.org/show_bug.cgi?id=122412
2671
2672         Reviewed by Darin Adler.
2673
2674         Trivial fix for compilation error; no new tests.
2675
2676         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
2677         (WebCore::JPEGImageReader::decode):
2678         (WebCore::fill_input_buffer):
2679         Use TRUE/FALSE defined by libjpeg for libjpeg booleans
2680
2681 2014-03-23  Zan Dobersek  <zdobersek@igalia.com>
2682
2683         Move Source/WebCore/rendering/ code to std::unique_ptr
2684         https://bugs.webkit.org/show_bug.cgi?id=129664
2685
2686         Reviewed by Anders Carlsson.
2687
2688         Replace uses of OwnPtr and PassOwnPtr in code under Source/WebCore/rendering/ with std::unique_ptr.
2689
2690         * platform/graphics/FloatPolygon.cpp:
2691         (WebCore::FloatPolygon::FloatPolygon):
2692         * platform/graphics/FloatPolygon.h:
2693         * rendering/ClipPathOperation.h:
2694         * rendering/FlowThreadController.cpp:
2695         (WebCore::FlowThreadController::ensureRenderFlowThreadWithName):
2696         * rendering/FlowThreadController.h:
2697         * rendering/HitTestLocation.h:
2698         * rendering/HitTestResult.cpp:
2699         (WebCore::HitTestResult::HitTestResult):
2700         (WebCore::HitTestResult::operator=):
2701         (WebCore::HitTestResult::rectBasedTestResult):
2702         (WebCore::HitTestResult::mutableRectBasedTestResult):
2703         * rendering/HitTestResult.h:
2704         * rendering/HitTestingTransformState.cpp:
2705         * rendering/ImageQualityController.h:
2706         * rendering/RenderBlock.cpp:
2707         (WebCore::removeBlockFromDescendantAndContainerMaps):
2708         (WebCore::RenderBlock::finishDelayUpdateScrollInfo):
2709         (WebCore::RenderBlock::addContinuationWithOutline):
2710         (WebCore::RenderBlock::paintContinuationOutlines):
2711         (WebCore::RenderBlock::insertIntoTrackedRendererMaps):
2712         (WebCore::RenderBlock::removeFromTrackedRendererMaps):
2713         (WebCore::RenderBlock::setComputedColumnCountAndWidth):
2714         * rendering/RenderBlock.h:
2715         * rendering/RenderBlockFlow.cpp:
2716         (WebCore::RenderBlockFlow::createFloatingObjects):
2717         * rendering/RenderBlockFlow.h:
2718         * rendering/RenderBoxRegionInfo.h:
2719         * rendering/RenderButton.cpp:
2720         (WebCore::RenderButton::styleDidChange):
2721         * rendering/RenderButton.h:
2722         * rendering/RenderCounter.cpp:
2723         (WebCore::makeCounterNode):
2724         * rendering/RenderFlowThread.cpp:
2725         (WebCore::RenderFlowThread::updateAllLayerToRegionMappings):
2726         (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
2727         * rendering/RenderFlowThread.h:
2728         * rendering/RenderGeometryMap.cpp:
2729         (WebCore::RenderGeometryMap::push):
2730         (WebCore::RenderGeometryMap::pushView):
2731         * rendering/RenderGeometryMap.h:
2732         * rendering/RenderGrid.cpp:
2733         (WebCore::RenderGrid::GridIterator::nextEmptyGridArea):
2734         (WebCore::RenderGrid::placeItemsOnGrid):
2735         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
2736         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
2737         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
2738         (WebCore::RenderGrid::resolveGridPositionsFromStyle):
2739         (WebCore::RenderGrid::resolveGridPositionAgainstOppositePosition):
2740         (WebCore::RenderGrid::resolveNamedGridLinePositionAgainstOppositePosition):
2741         (WebCore::RenderGrid::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition):
2742         (WebCore::RenderGrid::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):
2743         * rendering/RenderGrid.h:
2744         * rendering/RenderImageResource.h:
2745         * rendering/RenderLayer.cpp:
2746         (WebCore::RenderLayer::updateDescendantsAreContiguousInStackingOrder):
2747         (WebCore::RenderLayer::updateTransform):
2748         (WebCore::RenderLayer::setupFilters):
2749         (WebCore::RenderLayer::paintLayerContents):
2750         (WebCore::RenderLayer::paintChildLayerIntoColumns):
2751         (WebCore::RenderLayer::hitTestChildLayerColumns):
2752         (WebCore::RenderLayer::updateClipRects):
2753         (WebCore::RenderLayer::calculateClipRects):
2754         * rendering/RenderLayer.h:
2755         (WebCore::RenderLayer::clearZOrderLists):
2756         * rendering/RenderLayerCompositor.cpp:
2757         (WebCore::RenderLayerCompositor::notifyFlushBeforeDisplayRefresh):
2758         (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
2759         * rendering/RenderLayerCompositor.h:
2760         * rendering/RenderLayerFilterInfo.cpp:
2761         (WebCore::RenderLayer::FilterInfo::map):
2762         (WebCore::RenderLayer::FilterInfo::get):
2763         * rendering/RenderLayerFilterInfo.h:
2764         * rendering/RenderRegion.cpp:
2765         (WebCore::RenderRegion::setRenderBoxRegionInfo):
2766         (WebCore::RenderRegion::takeRenderBoxRegionInfo):
2767         * rendering/RenderRegion.h:
2768         * rendering/RenderTable.cpp:
2769         (WebCore::RenderTable::styleDidChange):
2770         * rendering/RenderTable.h:
2771         * rendering/RenderView.cpp:
2772         (WebCore::RenderView::selectionBounds):
2773         (WebCore::RenderView::setSelection):
2774         (WebCore::RenderView::compositor):
2775         (WebCore::RenderView::flowThreadController):
2776         (WebCore::RenderView::imageQualityController):
2777         * rendering/RenderView.h:
2778         * rendering/RootInlineBox.h:
2779         (WebCore::RootInlineBox::appendFloat):
2780         * rendering/TextAutosizer.h:
2781         * rendering/shapes/PolygonShape.cpp:
2782         (WebCore::computeShapePaddingBounds):
2783         (WebCore::computeShapeMarginBounds):
2784         * rendering/shapes/PolygonShape.h:
2785         (WebCore::PolygonShape::PolygonShape):
2786         * rendering/shapes/RasterShape.cpp:
2787         (WebCore::RasterShapeIntervals::computeShapeMarginIntervals):
2788         * rendering/shapes/RasterShape.h:
2789         (WebCore::RasterShape::RasterShape):
2790         * rendering/shapes/Shape.cpp:
2791         (WebCore::createInsetShape):
2792         (WebCore::createRectangleShape):
2793         (WebCore::createCircleShape):
2794         (WebCore::createEllipseShape):
2795         (WebCore::createPolygonShape):
2796         (WebCore::Shape::createShape):
2797         (WebCore::Shape::createRasterShape):
2798         (WebCore::Shape::createLayoutBoxShape):
2799         * rendering/shapes/Shape.h:
2800         * rendering/shapes/ShapeInfo.h:
2801         (WebCore::ShapeInfo::markShapeAsDirty):
2802         (WebCore::ShapeInfo::isShapeDirty):
2803         * rendering/shapes/ShapeInsideInfo.h:
2804         * rendering/style/ContentData.h:
2805         * rendering/style/CounterDirectives.cpp:
2806         (WebCore::clone):
2807         * rendering/style/CounterDirectives.h:
2808         * rendering/style/GridCoordinate.h:
2809         * rendering/style/RenderStyle.cpp:
2810         (WebCore::RenderStyle::addCachedPseudoStyle):
2811         (WebCore::RenderStyle::accessCounterDirectives):
2812         (WebCore::RenderStyle::accessAnimations):
2813         (WebCore::RenderStyle::accessTransitions):
2814         * rendering/style/RenderStyle.h:
2815         * rendering/style/StyleRareNonInheritedData.cpp:
2816         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2817         * rendering/style/StyleRareNonInheritedData.h:
2818         * rendering/svg/RenderSVGResourceGradient.cpp:
2819         (WebCore::RenderSVGResourceGradient::applyResource):
2820         * rendering/svg/RenderSVGResourceGradient.h:
2821         * rendering/svg/RenderSVGResourcePattern.cpp:
2822         (WebCore::RenderSVGResourcePattern::buildPattern):
2823         * rendering/svg/RenderSVGResourcePattern.h:
2824         * rendering/svg/RenderSVGShape.cpp:
2825         (WebCore::RenderSVGShape::updateShapeFromElement):
2826         * rendering/svg/RenderSVGShape.h:
2827         * rendering/svg/SVGResources.cpp:
2828         (WebCore::SVGResources::setClipper):
2829         (WebCore::SVGResources::setFilter):
2830         (WebCore::SVGResources::setMarkerStart):
2831         (WebCore::SVGResources::setMarkerMid):
2832         (WebCore::SVGResources::setMarkerEnd):
2833         (WebCore::SVGResources::setMasker):
2834         (WebCore::SVGResources::setFill):
2835         (WebCore::SVGResources::setStroke):
2836         * rendering/svg/SVGResources.h:
2837         * rendering/svg/SVGResourcesCache.cpp:
2838         (WebCore::SVGResourcesCache::addResourcesFromRenderer):
2839         (WebCore::SVGResourcesCache::removeResourcesFromRenderer):
2840         * rendering/svg/SVGResourcesCache.h:
2841         * rendering/svg/SVGTextMetricsBuilder.cpp:
2842         (WebCore::SVGTextMetricsBuilder::initializeMeasurementWithTextRenderer):
2843         * rendering/svg/SVGTextMetricsBuilder.h:
2844
2845 2014-03-28  Sergio Villar Senin  <svillar@igalia.com>
2846
2847         Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T> in loader
2848         https://bugs.webkit.org/show_bug.cgi?id=130893
2849
2850         Reviewed by Darin Adler.
2851
2852         * loader/ImageLoader.cpp:
2853         (WebCore::beforeLoadEventSender):
2854         (WebCore::loadEventSender):
2855         (WebCore::errorEventSender):
2856         * loader/appcache/ApplicationCacheStorage.cpp:
2857         (WebCore::cacheStorage):
2858         * loader/appcache/ApplicationCacheStorage.h:
2859         * loader/archive/ArchiveFactory.cpp:
2860         (WebCore::archiveMIMETypes):
2861         * loader/cache/CachedImage.cpp:
2862         (WebCore::CachedImage::brokenImage):
2863         * loader/cache/CachedRawResource.cpp:
2864         (WebCore::shouldIgnoreHeaderForCacheReuse):
2865         * loader/cache/MemoryCache.cpp:
2866         (WebCore::dummyCachedImageClient):
2867
2868 2014-03-28  Sergio Villar Senin  <svillar@igalia.com>
2869
2870         Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T> in css
2871         https://bugs.webkit.org/show_bug.cgi?id=130409
2872
2873         Reviewed by Darin Adler.
2874
2875         * css/CSSComputedStyleDeclaration.cpp:
2876         (WebCore::logUnimplementedPropertyID):
2877         * css/CSSDefaultStyleSheets.cpp:
2878         (WebCore::screenEval):
2879         (WebCore::printEval):
2880         * css/CSSParser.cpp:
2881         (WebCore::strictCSSParserContext):
2882         * css/CSSPrimitiveValue.cpp:
2883         (WebCore::cssTextCache):
2884         * css/CSSProperty.cpp:
2885         (WebCore::borderDirections):
2886         * css/CSSStyleRule.cpp:
2887         (WebCore::selectorTextCache):
2888         * css/CSSValuePool.cpp:
2889         (WebCore::cssValuePool):
2890         * css/CSSValuePool.h:
2891         * css/DeprecatedStyleBuilder.cpp:
2892         (WebCore::ApplyPropertyPageSize::getPageSizeFromName):
2893         (WebCore::DeprecatedStyleBuilder::sharedStyleBuilder):
2894         * css/DeprecatedStyleBuilder.h:
2895
2896 2014-03-30  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2897
2898         [GTK] [TextureMapper] Weird brightness with some videos with acceletared compositing
2899         https://bugs.webkit.org/show_bug.cgi?id=130665
2900
2901         Reviewed by Martin Robinson.
2902
2903         When we uploaded a video texture to the mapper we were not
2904         considering that some videos could be decoded into a format
2905         without alpha component. Now we check if the video has alpha and
2906         if it does not, we remove the alpha flag when retrieving the
2907         texture from the pool. For this, the method to get the texture
2908         from the pool was modified to receive the flags, that is mapped to
2909         have alpha by default in order not to break any other existing
2910         code.
2911
2912         Though we have a problem with AC in WTR and that makes it
2913         currently not testable, no new tests are needed because once this
2914         is fixed the current test set suffices to detect a possible
2915         regression in this.
2916
2917         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2918         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): Check
2919         the video format and decide if the texture shall be pulled with
2920         alpha support or not.
2921         * platform/graphics/texmap/TextureMapper.cpp:
2922         (WebCore::TextureMapper::acquireTextureFromPool): Use the flags
2923         when resetting the texture.
2924         * platform/graphics/texmap/TextureMapper.h:
2925         (WebCore::BitmapTexture::Flag::None): Added with 0x00.
2926         (WebCore::TextureMapper::acquireTextureFromPool): Added flag
2927         parameter to set up the texture with the default for including
2928         alpha channel.
2929
2930 2014-03-30  Jinwoo Song  <jinwoo7.song@samsung.com>
2931
2932         Adopt range-based for loops to TextCheckerEnchant
2933         https://bugs.webkit.org/show_bug.cgi?id=130714
2934
2935         Reviewed by Darin Adler.
2936
2937         * platform/text/enchant/TextCheckerEnchant.cpp:
2938         (WebCore::TextCheckerEnchant::ignoreWord):
2939         (WebCore::TextCheckerEnchant::learnWord):
2940         (WebCore::TextCheckerEnchant::checkSpellingOfWord):
2941         (WebCore::TextCheckerEnchant::getGuessesForWord):
2942         (WebCore::TextCheckerEnchant::updateSpellCheckingLanguages):
2943         (WebCore::TextCheckerEnchant::loadedSpellCheckingLanguages):
2944         (WebCore::TextCheckerEnchant::availableSpellCheckingLanguages):
2945         (WebCore::TextCheckerEnchant::freeEnchantBrokerDictionaries):
2946
2947 2014-03-30  Benjamin Poulain  <benjamin@webkit.org>
2948
2949         Second attempt to fix 32bits build after r166465
2950
2951         * rendering/style/RenderStyle.h:
2952         The compiler probably complain about the return value, that makes more sense.
2953
2954 2014-03-30  Benjamin Poulain  <benjamin@webkit.org>
2955
2956         Attempt to fix 32bits build after r166465
2957
2958         * rendering/style/RenderStyle.h:
2959
2960 2014-03-30  Benjamin Poulain  <benjamin@webkit.org>
2961
2962         Make RenderStyle's non inherited flags more JSC friendly
2963         https://bugs.webkit.org/show_bug.cgi?id=130939
2964
2965         Reviewed by Andreas Kling.
2966
2967         Make RenderStyle::NonInheritedFlags accessible to the JIT:
2968         -Make the struct public to give access to the offset.
2969         -Move away from a bit field to static offsets we can use
2970          with the MacroAssembler.
2971         -Reorder the field to simplify bit access of the flags we need.
2972
2973         * css/DeprecatedStyleBuilder.cpp:
2974         (WebCore::ApplyPropertyVerticalAlign::createHandler):
2975         (WebCore::ApplyPropertyDisplay::applyInitialValue):
2976         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2977         * css/StyleResolver.cpp:
2978         (WebCore::StyleResolver::adjustRenderStyle):
2979         * rendering/style/RenderStyle.cpp:
2980         (WebCore::RenderStyle::RenderStyle):
2981         (WebCore::RenderStyle::copyNonInheritedFrom):
2982         (WebCore::RenderStyle::hashForTextAutosizing):
2983         (WebCore::RenderStyle::equalForTextAutosizing):
2984         (WebCore::RenderStyle::changeRequiresLayout):
2985         * rendering/style/RenderStyle.h:
2986         (WebCore::RenderStyle::hasAnyPublicPseudoStyles):
2987         (WebCore::RenderStyle::hasPseudoStyle):
2988         (WebCore::RenderStyle::setHasPseudoStyle):
2989         * rendering/style/StyleMultiColData.cpp:
2990         (WebCore::StyleMultiColData::StyleMultiColData):
2991         * rendering/style/StyleRareNonInheritedData.cpp:
2992         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2993
2994 2014-03-30  David Kilzer  <ddkilzer@apple.com>
2995
2996         [iOS] Fix build of HTMLConverter.mm after r166454
2997
2998         Fixes the following build failures:
2999
3000             WebCore/editing/cocoa/HTMLConverter.mm:1507:13: error: value of type 'WebCore::Element' is not contextually convertible to 'bool'
3001                     if (element)
3002                         ^~~~~~~
3003             WebCore/editing/cocoa/HTMLConverter.mm:1508:49: error: no matching function for call to 'core'
3004                         _caches->floatPropertyValueForNode(*core(element), CSSPropertyVerticalAlign, verticalAlign);
3005                                                             ^~~~
3006             In file included from WebCore/editing/cocoa/HTMLConverter.mm:41:
3007             In file included from WebCore/page/Frame.h:42:
3008             In file included from WebCore/editing/VisibleSelection.h:30:
3009             In file included from WebCore/editing/VisiblePosition.h:30:
3010             In file included from WebCore/dom/Position.h:31:
3011             WebCore/editing/TextAffinity.h:54:27: note: candidate function not viable: no known conversion from 'WebCore::Element' to 'NSSelectionAffinity' (aka '_NSSelectionAffinity') for 1st argument
3012             inline WebCore::EAffinity core(NSSelectionAffinity affinity)
3013                                       ^
3014             WebCore/editing/cocoa/HTMLConverter.mm:1509:81: error: reference to non-static member function must be called; did you mean to call it with no arguments?
3015                     attachment.get().bounds = CGRectMake(0, (verticalAlign / 100) * element.clientHeight, element.clientWidth, element.clientHeight);
3016                                                                                     ~~~~~~~~^~~~~~~~~~~~
3017                                                                                                         ()
3018             WebCore/editing/cocoa/HTMLConverter.mm:1509:103: error: reference to non-static member function must be called; did you mean to call it with no arguments?
3019                     attachment.get().bounds = CGRectMake(0, (verticalAlign / 100) * element.clientHeight, element.clientWidth, element.clientHeight);
3020                                                                                                           ~~~~~~~~^~~~~~~~~~~
3021                                                                                                                              ()
3022             WebCore/editing/cocoa/HTMLConverter.mm:1509:124: error: reference to non-static member function must be called; did you mean to call it with no arguments?
3023                     attachment.get().bounds = CGRectMake(0, (verticalAlign / 100) * element.clientHeight, element.clientWidth, element.clientHeight);
3024                                                                                                                                ~~~~~~~~^~~~~~~~~~~~
3025                                                                                                                                                    ()
3026             5 errors generated.
3027
3028         * editing/cocoa/HTMLConverter.mm:
3029         (HTMLConverter::_addAttachmentForElement):
3030
3031 2014-03-30  Andreas Kling  <akling@apple.com>
3032
3033         Make NodeList and HTMLCollection caching helpers use PassRef.
3034         <https://webkit.org/b/130943>
3035
3036         Tweak the helpers in NodeListsNodeData to return PassRef instead of
3037         PassRefPtr. This knocks 2 branches off of some pretty hot code on
3038         Dromaeo/dom-query.
3039
3040         Reviewed by Antti Koivisto.
3041
3042         * dom/ChildNodeList.h:
3043         * dom/ClassNodeList.h:
3044         * dom/NameNodeList.h:
3045         * dom/NodeRareData.h:
3046         (WebCore::NodeListsNodeData::ensureChildNodeList):
3047         (WebCore::NodeListsNodeData::ensureEmptyChildNodeList):
3048         (WebCore::NodeListsNodeData::addCacheWithAtomicName):
3049         (WebCore::NodeListsNodeData::addCacheWithName):
3050         (WebCore::NodeListsNodeData::addCacheWithQualifiedName):
3051         (WebCore::NodeListsNodeData::addCachedCollection):
3052         * dom/TagNodeList.h:
3053         * html/HTMLCollection.cpp:
3054         (WebCore::HTMLCollection::create):
3055         * html/HTMLCollection.h:
3056         * html/HTMLFormControlsCollection.cpp:
3057         (WebCore::HTMLFormControlsCollection::create):
3058         * html/HTMLFormControlsCollection.h:
3059         * html/RadioNodeList.h:
3060
3061 2014-03-29  Antti Koivisto  <antti@apple.com>
3062
3063         LiveNodeLists should use ElementDescendantIterator
3064         https://bugs.webkit.org/show_bug.cgi?id=130931
3065
3066         Reviewed by Andreas Kling.
3067         
3068         Make LiveNodeList traversal use the common DOM tree iterator.
3069
3070         * dom/ChildNodeList.cpp:
3071         (WebCore::ChildNodeList::ChildNodeList):
3072         (WebCore::ChildNodeList::collectionBegin):
3073         (WebCore::ChildNodeList::collectionTraverseForward):
3074         (WebCore::ChildNodeList::collectionTraverseBackward):
3075         (WebCore::ChildNodeList::invalidateCache):
3076         (WebCore::ChildNodeList::collectionFirst): Deleted.
3077         
3078             Iterator for ChildNodeList is still just Node*.
3079
3080         * dom/ChildNodeList.h:
3081         * dom/CollectionIndexCache.h:
3082         (WebCore::CollectionIndexCache::hasValidCache):
3083         (WebCore::Iterator>::CollectionIndexCache):
3084         (WebCore::Iterator>::nodeCount):
3085         (WebCore::Iterator>::computeNodeCountUpdatingListCache):
3086         (WebCore::Iterator>::traverseBackwardTo):
3087         (WebCore::Iterator>::traverseForwardTo):
3088         (WebCore::Iterator>::nodeAt):
3089         (WebCore::Iterator>::invalidate):
3090         
3091             Make CollectionIndexCache iterator based instead of using NodeType*. The iterator type may
3092             still be a Node* though.
3093
3094         (WebCore::NodeType>::CollectionIndexCache): Deleted.
3095         (WebCore::NodeType>::nodeCount): Deleted.
3096         (WebCore::NodeType>::computeNodeCountUpdatingListCache): Deleted.
3097         (WebCore::NodeType>::nodeBeforeCached): Deleted.
3098         (WebCore::NodeType>::nodeAfterCached): Deleted.
3099         (WebCore::NodeType>::nodeAt): Deleted.
3100         (WebCore::NodeType>::invalidate): Deleted.
3101         * dom/ElementDescendantIterator.h:
3102         (WebCore::ElementDescendantIterator::operator--):
3103         
3104             Add backward iteration support.
3105
3106         (WebCore::ElementDescendantIteratorAdapter::last):
3107         (WebCore::ElementDescendantConstIteratorAdapter::last):
3108         
3109             Add a way to get the last item.
3110             Provide std::iterator_traits so we can extract the type.
3111
3112         * dom/LiveNodeList.h:
3113         (WebCore::CachedLiveNodeList::collectionEnd):
3114         (WebCore::CachedLiveNodeList<NodeListType>::CachedLiveNodeList):
3115         (WebCore::CachedLiveNodeList<NodeListType>::~CachedLiveNodeList):
3116         (WebCore::CachedLiveNodeList<NodeListType>::collectionBegin):
3117         (WebCore::CachedLiveNodeList<NodeListType>::collectionLast):
3118         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseForward):
3119         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseBackward):
3120         (WebCore::CachedLiveNodeList<NodeListType>::invalidateCache):
3121         (WebCore::CachedLiveNodeList<NodeListType>::collectionFirst): Deleted.
3122         
3123             Make LiveNodeList traversal use ElementDescendantIterator.
3124
3125         (WebCore::nextMatchingElement): Deleted.
3126         (WebCore::previousMatchingElement): Deleted.
3127         * html/HTMLCollection.cpp:
3128         (WebCore::HTMLCollection::HTMLCollection):
3129         (WebCore::HTMLCollection::~HTMLCollection):
3130         (WebCore::HTMLCollection::collectionBegin):
3131         (WebCore::HTMLCollection::collectionTraverseForward):
3132         (WebCore::HTMLCollection::collectionTraverseBackward):
3133         (WebCore::HTMLCollection::invalidateCache):
3134         (WebCore::HTMLCollection::collectionFirst): Deleted.
3135         * html/HTMLCollection.h:
3136         (WebCore::HTMLCollection::collectionEnd):
3137         
3138             HTMLCollection still uses Element* as iterator for now.
3139
3140 2014-03-29  Commit Queue  <commit-queue@webkit.org>
3141
3142         Unreviewed, rolling out r166434.
3143         https://bugs.webkit.org/show_bug.cgi?id=130938
3144
3145         Caused crashes and other failures on cache tests (Requested by
3146         ap on #webkit).
3147
3148         Reverted changeset:
3149
3150         "Web Replay: add page-level setting to bypass the MemoryCache"
3151         https://bugs.webkit.org/show_bug.cgi?id=130728
3152         http://trac.webkit.org/changeset/166434
3153
3154 2014-03-29  David Kilzer  <ddkilzer@apple.com>
3155
3156         Preserve selection end positions in directionOfSelection
3157         <http://webkit.org/b/104813>
3158         <rdar://problem/13666417>
3159
3160         Reviewed by Brent Fulgham.
3161
3162         Merged from Blink (patch by kenrb@chromium.org):
3163         https://src.chromium.org/viewvc/blink?revision=150621&view=revision
3164         http://crbug.com/164263
3165
3166             VisibleSelection::visibleStart() and VisibleSelection::visibleEnd()
3167             can both cause layouts, which has the potential to invalidate any
3168             rendertree-based objects. This was causing a problem in
3169             FrameSelection::directionOfSelection(), where a reference to a
3170             lineBox was being held across a call to visibleEnd().
3171
3172             This patch ensures that the any layout is completed before linebox
3173             references are retrieved.
3174
3175         Test: editing/selection/layout-during-move-selection-crash.html
3176
3177         * editing/FrameSelection.cpp:
3178         (WebCore::FrameSelection::directionOfSelection):
3179
3180 2014-03-29  Zalan Bujtas  <zalan@apple.com>
3181
3182         Subpixel rendering: Simple line layout should not round to integral position while painting.
3183         https://bugs.webkit.org/show_bug.cgi?id=130934
3184
3185         Reviewed by Simon Fraser.
3186
3187         Remove rounding to integral position. When RenderLayer is injected and hides subpixel positions,
3188         integral rounding produces different paint position.
3189
3190         Test: fast/flexbox/hidpi-simple-line-layout-with-flexbox-and-transition.html
3191
3192         * rendering/SimpleLineLayoutFunctions.cpp:
3193         (WebCore::SimpleLineLayout::paintFlow):
3194
3195 2014-03-29  Zalan Bujtas  <zalan@apple.com>
3196
3197         Subpixel rendering: Make GraphicsContext::drawImageBuffer* functions float based.
3198         https://bugs.webkit.org/show_bug.cgi?id=130932
3199
3200         Reviewed by Simon Fraser.
3201         
3202         This is in preparation to support device pixel based filter painting.
3203         Filter calculation is still integral based.
3204
3205         No change in behavior.
3206
3207         * platform/graphics/GraphicsContext.cpp:
3208         (WebCore::GraphicsContext::drawImageBuffer):
3209         * platform/graphics/GraphicsContext.h:
3210         * platform/graphics/filters/FilterEffect.cpp: This will eventually be fully float based.
3211         Right now, this IntRect->FloatRect change is only to ensure that we can call 
3212         the float based drawImageBuffer(). 
3213         (WebCore::FilterEffect::drawingRegionOfInputImage):
3214         * platform/graphics/filters/FilterEffect.h:
3215
3216 2014-03-27  Sam Weinig  <sam@webkit.org>
3217
3218         Convert yet more of HTMLConverter to C++
3219         https://bugs.webkit.org/show_bug.cgi?id=130850
3220
3221         Reviewed by Anders Carlsson.
3222
3223         * editing/cocoa/HTMLConverter.mm:
3224         (HTMLConverterCaches::isAncestorsOfStartToBeConverted):
3225         (HTMLConverter::HTMLConverter):
3226         (HTMLConverter::~HTMLConverter):
3227         (HTMLConverter::convert):
3228         (HTMLConverter::computedAttributesForElement):
3229         (HTMLConverter::attributesForElement):
3230         (HTMLConverter::_newParagraphForElement):
3231         (HTMLConverter::_newLineForElement):
3232         (HTMLConverter::_newTabForElement):
3233         (HTMLConverter::_addAttachmentForElement):
3234         (HTMLConverter::_addQuoteForElement):
3235         (HTMLConverter::_addValue):
3236         (HTMLConverter::_processHeadElement):
3237         (HTMLConverter::_enterElement):
3238         (HTMLConverter::_addTableCellForElement):
3239         (HTMLConverter::_processElement):
3240         (HTMLConverter::_addMarkersToList):
3241         (HTMLConverter::_exitElement):
3242         (HTMLConverter::_processText):
3243         (HTMLConverter::_traverseNode):
3244         (HTMLConverter::_traverseFooterNode):
3245         (WebCore::attributedStringFromRange):
3246         (_childrenForNode): Deleted.
3247         (HTMLConverter::_computedAttributesForElement): Deleted.
3248         (HTMLConverter::_attributesForElement): Deleted.
3249         (HTMLConverter::_loadFromDOMRange): Deleted.
3250
3251 2014-03-28  Csaba Osztrogonác  <ossy@webkit.org>
3252
3253         Unreviewed buildfix after r166441 and r166443.
3254
3255         * CMakeLists.txt: Add platform/audio/AudioHardwareListener.cpp.
3256
3257 2014-03-28  Javier Fernandez  <jfernandez@igalia.com>
3258
3259         [CSS Grid Layout] The 'auto' height must be adapted to the item's margin.
3260         https://bugs.webkit.org/show_bug.cgi?id=130920
3261
3262         Reviewed by Darin Adler.
3263
3264         Adding the grid-item's marginLogicalHeight to the used breadth when computing
3265         content based grid-track sizes.
3266
3267         Test: fast/css-grid-layout/grid-item-margin-auto-columns-rows.html
3268
3269         * rendering/RenderGrid.cpp:
3270         (WebCore::RenderGrid::logicalContentHeightForChild):
3271
3272 2014-03-28  James Craig  <jcraig@apple.com>
3273
3274         Web Inspector: AXI: support for live regions
3275         https://bugs.webkit.org/show_bug.cgi?id=130725
3276
3277         Reviewed by Timothy Hatcher.
3278
3279         Tests: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
3280                inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion.html
3281
3282         Initial support for @aria-live, @aria-atomic, and @aria-busy.
3283
3284         * inspector/InspectorDOMAgent.cpp:
3285         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
3286         * inspector/protocol/DOM.json:
3287
3288 2014-03-28  Darin Adler  <darin@apple.com>
3289
3290         Fix recently-introduced off-by-one error in centerTruncateToBuffer
3291         https://bugs.webkit.org/show_bug.cgi?id=130889
3292         <rdar://problem/16408694>
3293
3294         Reviewed by Alexey Proskuryakov.
3295
3296         * platform/graphics/StringTruncator.cpp:
3297         (WebCore::centerTruncateToBuffer): Simplified expression that computes truncatedLength.
3298         Removed incorrect "+ 1" from computation of where to write characters.
3299
3300 2014-03-28  Benjamin Poulain  <bpoulain@apple.com>
3301
3302         Update the code related to SelectorPseudoTypeMap to reflect its new purpose
3303         https://bugs.webkit.org/show_bug.cgi?id=130620
3304
3305         Reviewed by Andreas Kling.
3306
3307         Since r166094, SelectorPseudoTypeMap only contains PseudoClass instances and the 4 compatibility PseudoElement.
3308
3309         This patch rename SelectorPseudoTypeMap to SelectorPseudoClassAndCompatibilityElementMap and update the parsing
3310         to split PseudoClass and PseudoElement.
3311
3312         * CMakeLists.txt:
3313         * DerivedSources.make:
3314         * WebCore.xcodeproj/project.pbxproj:
3315         * css/CSSGrammar.y.in:
3316         * css/CSSParserValues.cpp:
3317         (WebCore::CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector):
3318         (WebCore::CSSParserSelector::setPseudoClassValue):
3319         * css/CSSParserValues.h:
3320         * css/CSSSelector.cpp:
3321         (WebCore::appendPseudoClassFunctionTail):
3322         (WebCore::CSSSelector::selectorText):
3323         * css/SelectorPseudoClassAndCompatibilityElementMap.in: Renamed from Source/WebCore/css/SelectorPseudoTypeMap.in.
3324         * css/SelectorPseudoTypeMap.h:
3325         * css/makeSelectorPseudoClassAndCompatibilityElementMap.py: Renamed from Source/WebCore/css/makeSelectorPseudoTypeMap.py.
3326         (enumerablePseudoType):
3327         (expand_ifdef_condition):
3328
3329 2014-03-28  Stephanie Lewis  <slewis@apple.com>
3330
3331         Unreviewed build fix.
3332
3333         * platform/audio/AudioHardwareListener.cpp:
3334         (WebCore::AudioHardwareListener::create):
3335         (WebCore::AudioHardwareListener::audioHardwareListenerIsSupported): Deleted.
3336         * platform/audio/AudioHardwareListener.h:
3337
3338 2014-03-28  Lukasz Bialek  <l.bialek@samsung.com>
3339
3340         Refactor cut and copy functions as suggested in FIXME line
3341         https://bugs.webkit.org/show_bug.cgi?id=129867
3342
3343         Reviewed by Darin Adler.
3344
3345         Cut and Copy functions in Editor.cpp use lots of common code.
3346         Those functions are merged into one to share code, several
3347         additional conditions are added to preserve Cut and Copy
3348         functionality.
3349
3350         * editing/Editor.cpp:
3351         (WebCore::Editor::cut):
3352         (WebCore::Editor::copy):
3353         (WebCore::Editor::performCutOrCopy):
3354         * editing/Editor.h:
3355
3356 2014-03-28  Stephanie Lewis  <slewis@apple.com>
3357
3358         Rename pluginDidEvaluate to better represent when it’s called.
3359         Part of <rdar://problem/16061257> PluginProcess should AppNap when no plugins on active tab.
3360
3361         Reviewed by Anders Carlsson.
3362
3363         No new test because it’s just a name change.
3364
3365         * page/PageThrottler.h:
3366         (WebCore::PageThrottler::pluginDidEvaluateWhileAudioIsPlaying):
3367
3368 2014-03-28  Stephanie Lewis  <slewis@apple.com>
3369
3370         Notification handler for telling if audio hardware is active.
3371         https://bugs.webkit.org/show_bug.cgi?id=130743
3372
3373         Reviewed by Jer Noble.
3374
3375         Not web-exposed so no easy way to test.
3376
3377         Listen to CoreAudio to see if audio hardware is active in the current process.
3378
3379         * WebCore.exp.in:
3380         * WebCore.xcodeproj/project.pbxproj:
3381         * platform/audio/AudioHardwareListener.cpp: Added.
3382         (WebCore::AudioHardwareListener::create):
3383         (WebCore::AudioHardwareListener::AudioHardwareListener):
3384         * platform/audio/AudioHardwareListener.h: Added.
3385         (WebCore::AudioHardwareListener::Client::~Client):
3386         (WebCore::AudioHardwareListener::~AudioHardwareListener):
3387         (WebCore::AudioHardwareListener::isHardwareActive):
3388         * platform/audio/mac/AudioHardwareListenerMac.cpp: Added.
3389         (WebCore::isAudioHardwareProcessRunning):
3390         (WebCore::AudioHardwareListener::create):
3391         (WebCore::AudioHardwareListenerMac::create):
3392         (WebCore::AudioHardwareListenerMac::AudioHardwareListenerMac):
3393         (WebCore::AudioHardwareListenerMac::~AudioHardwareListenerMac):
3394         (WebCore::AudioHardwareListenerMac::setHardwareActive):
3395         * platform/audio/mac/AudioHardwareListenerMac.h: Added.
3396
3397 2014-03-28  James Craig  <jcraig@apple.com>
3398
3399         Web Inspector: AXI: expose what elements get generic "clickable" status
3400         https://bugs.webkit.org/show_bug.cgi?id=130721
3401
3402         Reviewed by Timothy Hatcher.
3403
3404         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html:
3405         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode_mouseEventNodeId.html
3406
3407         Expose ancestor element link to "Click Listener" or generic "Clickable: Yes" if current node has mouse handler.
3408
3409         Update AccessibilityNodeObject::mouseButtonListener() to optionally return body element if 
3410             requested so that Web Inspector can display body event delegate handlers.
3411
3412         * accessibility/AccessibilityNodeObject.cpp:
3413         (WebCore::AccessibilityNodeObject::mouseButtonListener):
3414         * accessibility/AccessibilityNodeObject.h:
3415         * inspector/InspectorDOMAgent.cpp:
3416         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
3417         * inspector/protocol/DOM.json:
3418
3419 2014-03-28  Joseph Pecoraro  <pecoraro@apple.com>
3420
3421         Web Inspector: Really drop all locks in nested run loop on iOS if WebThread is enabled
3422         https://bugs.webkit.org/show_bug.cgi?id=130912
3423
3424         Reviewed by Geoffrey Garen.
3425
3426         Previously we were calling DropAllLocks inside of a single line if statement,
3427         so the JSLock was getting reaquired very quickly. We really want to DropAllLocks
3428         for the duration of running the nested run loop on iOS if there is a WebThread.
3429
3430         * bindings/js/PageScriptDebugServer.h:
3431         * bindings/js/PageScriptDebugServer.cpp:
3432         (WebCore::PageScriptDebugServer::runEventLoopWhilePaused):
3433         (WebCore::PageScriptDebugServer::runEventLoopWhilePausedInternal):
3434
3435 2014-03-28  Brent Fulgham  <bfulgham@apple.com>
3436
3437         [Win] Enable Media Track testing features on Windows
3438         https://bugs.webkit.org/show_bug.cgi?id=130851
3439
3440         Reviewed by Eric Carlson.
3441
3442         * testing/Internals.cpp:
3443         (WebCore::Internals::resetToConsistentState): Execute code on Windows as well.
3444         (WebCore::Internals::Internals): Ditto.
3445         (WebCore::Internals::captionsStyleSheetOverride): Ditto.
3446         (WebCore::Internals::setCaptionsStyleSheetOverride): Ditto.
3447         (WebCore::Internals::setPrimaryAudioTrackLanguageOverride): Ditto.
3448         (WebCore::Internals::setCaptionDisplayMode): Ditto.
3449
3450 2014-03-28  Brian Burg  <bburg@apple.com>
3451
3452         Web Replay: add page-level setting to bypass the MemoryCache
3453         https://bugs.webkit.org/show_bug.cgi?id=130728
3454
3455         Reviewed by Timothy Hatcher.
3456
3457         When replaying a specific Page we don't want to store its cached resources in the
3458         MemoryCache. This patch adds a page setting to prevent the page's resources from
3459         being saved in the MemoryCache.
3460
3461         If Settings::usesMemoryCache() is false, page resources are given the special
3462         SessionID bypassCacheSessionID(). The cached resource loader and memory cache
3463         act as if the memory cache is disabled if the resource has this special session id.
3464
3465         Hook up ReplayController to override the memory cache setting during capture/replay.
3466
3467         Test: http/tests/cache/bypass-memory-cache-after-reload.html
3468
3469         * loader/cache/CachedResourceLoader.cpp:
3470         (WebCore::CachedResourceLoader::requestResource):
3471         (WebCore::CachedResourceLoader::revalidateResource):
3472         * loader/cache/MemoryCache.cpp:
3473         (WebCore::MemoryCache::add):
3474         * page/Page.cpp:
3475         (WebCore::Page::sessionID):
3476         * page/SessionID.h:
3477         (WebCore::SessionID::bypassCacheSessionID):
3478         * page/Settings.cpp:
3479         (WebCore::Settings::Settings):
3480         * page/Settings.h:
3481         (WebCore::Settings::setUsesMemoryCache):
3482         (WebCore::Settings::usesMemoryCache):
3483         * replay/ReplayController.cpp:
3484         (WebCore::ReplayController::setForceDeterministicSettings):
3485         * replay/ReplayController.h:
3486         * testing/InternalSettings.cpp:
3487         (WebCore::InternalSettings::Backup::Backup):
3488         (WebCore::InternalSettings::Backup::restoreTo):
3489         (WebCore::InternalSettings::setUsesMemoryCache):
3490         * testing/InternalSettings.h:
3491         * testing/InternalSettings.idl:
3492
3493 2014-03-28  Radu Stavila  <stavila@adobe.com>
3494
3495         In some situations, partial layouts of floating elements produce incorrect results.
3496         https://bugs.webkit.org/show_bug.cgi?id=122668
3497
3498         Reviewed by David Hyatt.
3499
3500         When performing partial layout of float elements and checking if other float
3501         elements are encountered, incorrect results were obtained by not checking
3502         the size of the existing floats vector.
3503
3504         Test: fast/block/float/floats-in-clean-line-crash.html
3505
3506         * rendering/RenderBlockLineLayout.cpp:
3507         (WebCore::RenderBlockFlow::checkFloatsInCleanLine):
3508
3509 2014-03-28  Beth Dakin  <bdakin@apple.com>
3510
3511         Build fix.
3512
3513         * rendering/RenderTheme.cpp:
3514         (WebCore::RenderTheme::paint):
3515
3516 2014-03-28  Jer Noble  <jer.noble@apple.com>
3517
3518         [MSE] Implement support for SourceBuffer.remove()
3519         https://bugs.webkit.org/show_bug.cgi?id=121562
3520
3521         Reviewed by Eric Carlson.
3522
3523         Test: media/media-source/media-source-remove.html
3524
3525         Add support for SourceBuffer.remove().
3526
3527         * Modules/mediasource/SourceBuffer.cpp:
3528         (WebCore::SourceBuffer::SourceBuffer): Initialize new member variables.
3529         (WebCore::SourceBuffer::setTimestampOffset): Update comments to match spec.
3530         (WebCore::SourceBuffer::remove): Added; start removeTimer.
3531         (WebCore::SourceBuffer::abortIfUpdating): Cancel removeTimer.
3532         (WebCore::SourceBuffer::removedFromMediaSource): Call abortIfUpdating().
3533         (WebCore::SourceBuffer::stop): Cancel removeTimer.
3534         (WebCore::SourceBuffer::removeCodedFrames): Added.
3535         (WebCore::SourceBuffer::removeTimerFired): Added.
3536         * Modules/mediasource/SourceBuffer.h:
3537         * Modules/mediasource/SourceBuffer.idl:
3538
3539 2014-03-27  Dean Jackson  <dino@apple.com>
3540
3541         Support form controls that may need incremental redraw
3542         https://bugs.webkit.org/show_bug.cgi?id=130736
3543
3544         Reviewed by Beth Dakin.
3545
3546         There are some form controls that change appearance
3547         over time. Expand the ControlStates so that it can
3548         hold a little more information, including a reference
3549         to the native form control. This way the Theme implementation
3550         can repaint the existing native control if necessary. At
3551         least ThemeMac was reusing a single control for painting
3552         all instances before this change.
3553
3554         Since ControlStates is now a class, pass it around by
3555         reference.
3556
3557         The other major change is keeping a timer to trigger a
3558         repaint in RenderBox, which happens if Theme/RenderTheme
3559         update the ControlState to request one.
3560
3561         * WebCore.xcodeproj/project.pbxproj: Add ControlStates.h.
3562         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
3563         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
3564         * dom/Element.cpp:
3565         (WebCore::Element::setActive): States now within ControlStates.
3566         (WebCore::Element::setHovered): Ditto.
3567         * editing/FrameSelection.cpp:
3568         (WebCore::FrameSelection::focusedOrActiveStateChanged): Ditto.
3569         * html/HTMLFormControlElement.cpp:
3570         (WebCore::HTMLFormControlElement::disabledStateChanged): Ditto.
3571         (WebCore::HTMLFormControlElement::readOnlyAttributeChanged): Ditto.
3572         * html/HTMLInputElement.cpp:
3573         (WebCore::HTMLInputElement::setChecked): Ditto.
3574         (WebCore::HTMLInputElement::setIndeterminate): Ditto.
3575         * html/HTMLOptionElement.cpp:
3576         (WebCore::HTMLOptionElement::parseAttribute): Ditto.
3577         * platform/ControlStates.h: New file. Copied the old ControlStates enum,
3578         and added accessors to hold whether or not the state is dirty, and
3579         a reference to a platform control if necessary.
3580         * platform/Theme.h:
3581         (WebCore::Theme::selectionColor): Pass ControlStates pointer.
3582         (WebCore::Theme::paint): Ditto.
3583         (WebCore::Theme::inflateControlPaintRect): Ditto.
3584         * platform/ThemeTypes.h: Remove ControlStates enum.
3585         * platform/efl/RenderThemeEfl.cpp:
3586         (WebCore::RenderThemeEfl::applyEdjeStateFromForm): Pass ControlStates pointer.
3587         (WebCore::RenderThemeEfl::paintThemePart): Ditto.
3588         * platform/efl/RenderThemeEfl.h: Ditto.
3589         * platform/mac/ThemeMac.h: Ditto.
3590         * platform/mac/ThemeMac.mm:
3591         (-[WebCoreThemeView addSubview:]): New method to make sure we don't add CALayer backed
3592         views to the NSView we're using for rendering.
3593         (WebCore::updateStates): Use the private animated setters if necessary.
3594         (WebCore::convertControlStatesToThemeDrawState): Namespacing.
3595         (WebCore::configureCheckbox): Pass ControlStates pointer.
3596         (WebCore::createCheckboxCell): New helper since we're creating non-static cells.
3597         (WebCore::sharedCheckboxCell): The old static provider, renamed.
3598         (WebCore::paintCheckbox): Check if this paint was triggered by a state change
3599         or an animation. Update the ControlStates if we need to be repainted.
3600         (WebCore::radio): Parameter is now ControlStates*.
3601         (WebCore::paintRadio): Ditto.
3602         (WebCore::setUpButtonCell): Ditto.
3603         (WebCore::button): Ditto.
3604         (WebCore::paintButton): Ditto.
3605         (WebCore::paintStepper): Ditto.
3606         (WebCore::ThemeMac::ensuredView): Ditto.
3607         (WebCore::ThemeMac::inflateControlPaintRect): Ditto.
3608         (WebCore::ThemeMac::paint): Ditto.
3609         (WebCore::checkbox): Deleted.
3610         * rendering/RenderBox.cpp:
3611         (WebCore::RenderBox::RenderBox): Initialize timer.
3612         (WebCore::RenderBox::~RenderBox): Stop any pending timers and delete the ControlState if necessary.
3613         (WebCore::RenderBox::paintBoxDecorations): Create a ControlStates if needed. Paint, and start the repaint
3614         timer if the ControlStates say we should.
3615         (WebCore::RenderBox::repaintTimerFired): Call repaint when the timer fires.
3616         * rendering/RenderBox.h: Add a timer for repainting.
3617         * rendering/RenderElement.cpp:
3618         (WebCore::controlStatesRendererMap): A static HashMap that associates renderers with ControlStates.
3619         (WebCore::RenderElement::hasControlStatesForRenderer):
3620         (WebCore::RenderElement::controlStatesForRenderer):
3621         (WebCore::RenderElement::removeControlStatesForRenderer):
3622         (WebCore::RenderElement::addControlStatesForRenderer):
3623         * rendering/RenderElement.h:
3624         * rendering/RenderTheme.cpp:
3625         (WebCore::RenderTheme::paint): Use a pointer to ControlStates.
3626         (WebCore::RenderTheme::adjustRepaintRect): Ditto.
3627         (WebCore::RenderTheme::stateChanged): Ditto.
3628         (WebCore::RenderTheme::updateControlStatesForRenderer): New method that just updates the states part of ControlStates.
3629         (WebCore::RenderTheme::extractControlStatesForRenderer): New method that calculates the state.
3630         (WebCore::RenderTheme::controlStatesForRenderer): Deleted.
3631         * rendering/RenderTheme.h:
3632         * rendering/RenderThemeMac.mm:
3633         (WebCore::RenderThemeMac::documentViewFor): Use a ControlStates pointer.
3634
3635 2014-03-28  Myles C. Maxfield  <mmaxfield@apple.com>
3636
3637         Clear SVGInlineTextBox fragments when the text changes.
3638         https://bugs.webkit.org/show_bug.cgi?id=130879
3639
3640         Reviewed by Darin Adler.
3641
3642         Ported from Blink: https://src.chromium.org/viewvc/blink?revision=150456&view=revision
3643
3644         This patch modifies SVGInlineTextBox::dirtyLineBoxes to clear all
3645         following text boxes when invoked. Typically this method is called
3646         when the underlying text string changes, and that change needs to
3647         be propagated to all the boxes that use the text beyond the point
3648         where the text is first modified.
3649         
3650         Also cleans up final function keywords for SVGRootInlineBox.
3651
3652         Test: svg/custom/unicode-in-tspan-multi-svg-crash.html
3653
3654         * rendering/InlineTextBox.h: Added (non-recursive) dirtyOwnLineBoxes() function
3655         (WebCore::InlineTextBox::dirtyOwnLineBoxes): Calls dirtyLineBoxes()
3656         * rendering/svg/SVGInlineTextBox.h: Added (non-recursive) dirtyOwnLineBoxes() function
3657         (WebCore::SVGInlineTextBox::dirtyOwnLineBoxes):
3658         * rendering/svg/SVGInlineTextBox.cpp:
3659         (WebCore::SVGInlineTextBox::dirtyOwnLineBoxes): Non-recursive part of dirtyLineBoxes()
3660         (WebCore::SVGInlineTextBox::dirtyLineBoxes): Calls dirtyOwnLineBoxes() in a loop
3661         * rendering/svg/SVGRootInlineBox.h:
3662
3663 2014-03-28  Andreas Kling  <akling@apple.com>
3664
3665         Rebaseline bindings tests.
3666
3667 2014-03-28  Michael Saboff  <msaboff@apple.com>
3668
3669         Unreviewed, rolling r166248 back in.
3670
3671         Turns out r166070 didn't cause a 2% performance loss in page load times
3672
3673         Reverted changeset:
3674
3675         Unreviewed, rolling out r166126.
3676         Rollout r166126 in prepartion to roll out prerequisite r166070
3677
3678 2014-03-26  Antonio Gomes  <a1.gomes@sisa.samsung.com>
3679
3680         [Bindings] constants are always typed to 'int'
3681         https://bugs.webkit.org/show_bug.cgi?id=130775
3682
3683         Reviewed by Darin Adler.
3684
3685         Patch fixes a bug where all constant getter generated
3686         methods were returning 'integer' values due to static_cast.
3687
3688         Compilers should be smarth enough to properly infer which
3689         jsNumber class construtor to call given a literal value.
3690
3691         Patch also fixes a bug where values whose representation
3692         is bigger an integer maximum were overflowing. For instance,
3693         NodeFilter.SHOW_ALL (0xFFFFFFFF).
3694
3695         Tests:
3696         Binding tests updated.
3697         Rebaselined fast/dom/constants.html
3698
3699         * bindings/scripts/CodeGeneratorJS.pm:
3700         (GenerateImplementation):
3701         * bindings/scripts/test/JS/JSTestInterface.cpp:
3702         (WebCore::jsTestInterfaceIMPLEMENTSCONSTANT1):
3703         (WebCore::jsTestInterfaceIMPLEMENTSCONSTANT2):
3704         (WebCore::jsTestInterfaceSUPPLEMENTALCONSTANT1):
3705         (WebCore::jsTestInterfaceSUPPLEMENTALCONSTANT2):
3706         * bindings/scripts/test/JS/JSTestObj.cpp:
3707         (WebCore::jsTestObjCONDITIONAL_CONST):
3708         (WebCore::jsTestObjCONST_VALUE_0):
3709         (WebCore::jsTestObjCONST_VALUE_1):
3710         (WebCore::jsTestObjCONST_VALUE_2):
3711         (WebCore::jsTestObjCONST_VALUE_4):
3712         (WebCore::jsTestObjCONST_VALUE_8):
3713         (WebCore::jsTestObjCONST_VALUE_9):
3714         (WebCore::jsTestObjCONST_VALUE_11):
3715         (WebCore::jsTestObjCONST_VALUE_12):
3716         (WebCore::jsTestObjCONST_VALUE_13):
3717         (WebCore::jsTestObjCONST_VALUE_14):
3718         (WebCore::jsTestObjCONST_JAVASCRIPT):
3719         (WebCore::jsTestObjReadonly):
3720
3721 2014-03-28  Myles C. Maxfield  <mmaxfield@apple.com>
3722
3723         A TrailingObject's endpoint might get decremented twice
3724         https://bugs.webkit.org/show_bug.cgi?id=130874
3725
3726         Reviewed by Darin Adler.
3727
3728         There are two places where we might shave off a trailing space from the end
3729         of a line. We don't want to hit both codepaths for a single line.
3730
3731         Fixes fast/block/update-midpoints-for-trailing-boxes-crash.html after r166245.
3732
3733         * rendering/line/BreakingContextInlineHeaders.h:
3734         (WebCore::checkMidpoints):
3735         (WebCore::BreakingContext::handleEndOfLine):
3736
3737 2014-03-28  Andreas Kling  <akling@apple.com>
3738
3739         Inline JSDOMWrapper subclasses' finishCreation().
3740         <https://webkit.org/b/130890>
3741
3742         finishCreation() is really a no-op for JSDOMWrapper subclasses in
3743         release builds. None of the ancestor classes do anything but assert
3744         in their implementations.
3745
3746         Generate the function inline, reducing binary size, and removing
3747         an unnecessary call from the JSFoo::create() helpers.
3748
3749         Reviewed by Sam Weinig.
3750
3751         * bindings/scripts/CodeGeneratorJS.pm:
3752         (GenerateHeader):
3753         (GenerateImplementation):
3754
3755 2014-03-28  Jer Noble  <jer.noble@apple.com>
3756
3757         [Mac] HLS streams will report an incorrect natural size.
3758         https://bugs.webkit.org/show_bug.cgi?id=130859
3759
3760         Reviewed by Eric Carlson.
3761
3762         Some HLS streams will report incorrect naturalSizes due to the asset's preferredTransform
3763         property not being  available at the same time as the track's natural size. Given that
3764         AVFoundation only allows one video track to be selected at a time, simply use the asset's
3765         presentation size, cached in m_cachedPresentation size in all cases.
3766
3767         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3768         (WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged):
3769
3770 2014-03-28  Antti Koivisto  <antti@apple.com>
3771
3772         Remove NodeListRootType flag
3773         https://bugs.webkit.org/show_bug.cgi?id=130896
3774
3775         Reviewed by Anders Carlsson.
3776
3777         This can be handled statically (except for the RadioNodeList case) removing
3778         a branch from NodeList traversal.
3779
3780         * dom/ClassNodeList.h:
3781         * dom/Document.cpp:
3782         (WebCore::Document::registerNodeListForInvalidation):
3783         (WebCore::Document::unregisterNodeListForInvalidation):
3784         (WebCore::Document::registerNodeList): Deleted.
3785         (WebCore::Document::unregisterNodeList): Deleted.
3786         
3787             Mark document invalidation registered lists with a bit.
3788             Renamed for clarity.
3789
3790         * dom/Document.h:
3791         * dom/LiveNodeList.cpp:
3792         (WebCore::LiveNodeList::LiveNodeList):
3793         (WebCore::LiveNodeList::rootNode):
3794         
3795             Base class version that invokes virtual isRootedAtDocument. It is needed to support 
3796             LiveNodeList::namedItem.
3797
3798         * dom/LiveNodeList.h:
3799         (WebCore::LiveNodeList::isRegisteredForInvalidationAtDocument):
3800         (WebCore::LiveNodeList::setRegisteredForInvalidationAtDocument):
3801         (WebCore::LiveNodeList::document):
3802         (WebCore::CachedLiveNodeList<NodeListType>::CachedLiveNodeList):
3803         (WebCore::CachedLiveNodeList<NodeListType>::~CachedLiveNodeList):
3804         (WebCore::CachedLiveNodeList<NodeListType>::rootNode):
3805         
3806             Call isRootedAtDocument on the final leaf type. Except for RadioNodeList this
3807             resolves statically.
3808
3809         (WebCore::CachedLiveNodeList<NodeListType>::willValidateIndexCache):
3810         (WebCore::CachedLiveNodeList<NodeListType>::invalidateCache):
3811         (WebCore::LiveNodeList::isRootedAtDocument): Deleted.
3812         (WebCore::LiveNodeList::rootType): Deleted.
3813         (WebCore::LiveNodeList::rootNode): Deleted.
3814         * dom/NameNodeList.h:
3815         * dom/NodeRareData.h:
3816         (WebCore::NodeListsNodeData::adoptDocument):
3817         * dom/TagNodeList.h:
3818         * html/HTMLCollection.cpp:
3819         (WebCore::rootTypeFromCollectionType):
3820         * html/HTMLCollection.h:
3821         (WebCore::HTMLCollection::isRootedAtDocument):
3822         (WebCore::HTMLCollection::rootType):
3823         
3824             HTMLCollections still needs the flag.
3825
3826         * html/LabelsNodeList.cpp:
3827         (WebCore::LabelsNodeList::LabelsNodeList):
3828         * html/LabelsNodeList.h:
3829         * html/RadioNodeList.cpp:
3830         (WebCore::RadioNodeList::RadioNodeList):
3831         * html/RadioNodeList.h:
3832
3833 2014-03-28  Mario Sanchez Prada  <mario.prada@samsung.com>
3834
3835         [GTK] Geoclue2 providers won't work after reloading
3836         https://bugs.webkit.org/show_bug.cgi?id=130898
3837
3838         Reviewed by Martin Robinson.
3839
3840         Don't reuse the Geoclue2 client proxy between different calls to
3841         startPosition(), and create a new client proxy each time instead.
3842
3843         * platform/geoclue/GeolocationProviderGeoclue2.cpp:
3844         (GeolocationProviderGeoclue::startUpdating): Don't reuse the
3845         client proxy, by always calling geoclue_manager_call_get_client().
3846         (GeolocationProviderGeoclue::stopUpdating): Disconnect from the
3847         'location-updated' signal and dispose the client proxy.
3848
3849 2014-03-28  Diego Pino Garcia  <dpino@igalia.com>
3850
3851         [GTK] Too many redirects visiting www.globalforestwatch.org
3852         https://bugs.webkit.org/show_bug.cgi?id=129681
3853
3854         Reviewed by Martin Robinson.
3855
3856         * platform/gtk/UserAgentGtk.cpp:
3857         (WebCore::standardUserAgent): Append Safari version to UserAgent
3858         string.
3859
3860 2014-03-28  Michael Saboff  <msaboff@apple.com>
3861
3862         Unreviewed, rolling r166249 back in.
3863
3864         Turns out r166070 didn't cause a 2% performance loss in page load times
3865
3866         Reverted changeset:
3867
3868         Unreviewed, rolling out r166070.
3869         Rollout r166070 due to 2% performance loss in page load times
3870
3871 2014-03-28  James Craig  <jcraig@apple.com>
3872
3873         Web Inspector: Copy/paste error. EventListener block in DOM.json uses description from Node.
3874         https://bugs.webkit.org/show_bug.cgi?id=130158
3875
3876         Reviewed by Timothy Hatcher.
3877
3878         * inspector/protocol/DOM.json: Fixed a copy/paste annoyance.
3879
3880 2014-03-27  James Craig  <jcraig@apple.com>
3881
3882         Web Inspector: AXI: expose selectedChildNodeIds of list boxes, tree controls, etc., and reconcile UI with childNodeIds
3883         https://bugs.webkit.org/show_bug.cgi?id=130827
3884
3885         Reviewed by Timothy Hatcher.
3886
3887         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
3888
3889         Support for selectedChildNodeIds in inspector-protocol: DOM.getAccessibilityPropertiesForNode.
3890
3891         * inspector/InspectorDOMAgent.cpp:
3892         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
3893         * inspector/protocol/DOM.json:
3894
3895 2014-03-27  Brent Fulgham  <bfulgham@apple.com>
3896
3897         Specify Shadow DOM Pseudo IDs in Media Element Constructors
3898         https://bugs.webkit.org/show_bug.cgi?id=130882
3899
3900         Reviewed by Eric Carlson.
3901
3902         * html/shadow/MediaControlElements.cpp:
3903         (WebCore::MediaControlPanelElement::MediaControlPanelElement): Call setPseudoId in constructor.
3904         (WebCore::MediaControlPanelEnclosureElement::MediaControlPanelEnclosureElement): Ditto.
3905         (WebCore::MediaControlTimelineContainerElement::MediaControlTimelineContainerElement): Ditto.
3906         (WebCore::MediaControlVolumeSliderContainerElement::MediaControlVolumeSliderContainerElement): Ditto.
3907         (WebCore::MediaControlStatusDisplayElement::MediaControlStatusDisplayElement): Ditto.
3908         (WebCore::MediaControlPanelMuteButtonElement::MediaControlPanelMuteButtonElement): Ditto.
3909         (WebCore::MediaControlVolumeSliderMuteButtonElement::MediaControlVolumeSliderMuteButtonElement): Ditto.
3910         (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement): Ditto.
3911         (WebCore::MediaControlOverlayPlayButtonElement::MediaControlOverlayPlayButtonElement): Ditto.
3912         (WebCore::MediaControlSeekForwardButtonElement::MediaControlSeekForwardButtonElement): Ditto.
3913         (WebCore::MediaControlSeekBackButtonElement::MediaControlSeekBackButtonElement): Ditto.
3914         (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement): Ditto.
3915         (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement): Ditto.
3916         (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement): Ditto.
3917         (WebCore::MediaControlClosedCaptionsContainerElement::MediaControlClosedCaptionsContainerElement): Ditto.
3918         (WebCore::MediaControlClosedCaptionsTrackListElement::MediaControlClosedCaptionsTrackListElement): Ditto.
3919         (WebCore::MediaControlTimelineElement::MediaControlTimelineElement): Ditto.
3920         (WebCore::MediaControlPanelVolumeSliderElement::MediaControlPanelVolumeSliderElement): Ditto.
3921         (WebCore::MediaControlFullscreenVolumeSliderElement::MediaControlFullscreenVolumeSliderElement): Ditto.
3922         (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement): Ditto.
3923         (WebCore::MediaControlFullscreenVolumeMinButtonElement::MediaControlFullscreenVolumeMinButtonElement): Ditto.
3924         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::MediaControlFullscreenVolumeMaxButtonElement): Ditto.
3925         (WebCore::MediaControlTimeRemainingDisplayElement::MediaControlTimeRemainingDisplayElement): Ditto.
3926         (WebCore::MediaControlCurrentTimeDisplayElement::MediaControlCurrentTimeDisplayElement): Ditto.
3927         (WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement): Ditto.
3928
3929 2014-03-27  Benjamin Poulain  <bpoulain@apple.com>
3930
3931         [iOS][WK2] Adjust the tile coverage on the scrollview's edges
3932         https://bugs.webkit.org/show_bug.cgi?id=130884
3933
3934         Reviewed by Dan Bernstein.
3935
3936         * platform/ios/ScrollViewIOS.mm:
3937         (WebCore::ScrollView::computeCoverageRect):
3938         Pull back the future rect inside the contentRect if it goes outside.
3939         There is no point in retiling for rubberbanding and the extra tiles should be always be
3940         on the opposite side to the edges.
3941
3942 2014-03-27  Joseph Pecoraro  <pecoraro@apple.com>
3943
3944         Remove unused LocaleMac::create method
3945         https://bugs.webkit.org/show_bug.cgi?id=130870
3946
3947         Reviewed by Andreas Kling.
3948
3949         * platform/text/mac/LocaleMac.h:
3950         * platform/text/mac/LocaleMac.mm:
3951         (WebCore::LocaleMac::create): Deleted.
3952         (WebCore::LocaleMac::shortDateFormatter): Deleted.
3953
3954 2014-03-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3955
3956         Clean up unneeded "mutable" keyword
3957         https://bugs.webkit.org/show_bug.cgi?id=130832
3958
3959         Reviewed by Andreas Kling.
3960
3961         As r166350, this patch cleans up unneeded "mutable" keywords.
3962         Additionally, m_validatedSelectionCache is removed because it is not used anywhere else.
3963
3964         * css/CSSFontFaceRule.h:
3965         * css/CSSStyleRule.h:
3966         * editing/FrameSelection.h:
3967
3968 2014-03-27  Enrica Casucci  <enrica@apple.com>
3969
3970         Add support for AirPlay picker in WK2 for iOS.
3971         https://bugs.webkit.org/show_bug.cgi?id=130855
3972         <rdar://problem/15349859>
3973
3974         Reviewed by Eric Carlson, Joseph Pecoraro and Benjamin Poulain.
3975
3976         Adds support in HTMLMediaSession to display the airplay picker
3977         and to monitor presence of available wireless targets.
3978
3979         * html/HTMLMediaSession.cpp:
3980         (WebCore::HTMLMediaSession::showPlaybackTargetPicker):
3981         (WebCore::HTMLMediaSession::hasWirelessPlaybackTargets):
3982         (WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners):
3983         * loader/EmptyClients.h:
3984         * page/ChromeClient.h:
3985         * platform/audio/MediaSessionManager.cpp:
3986         (WebCore::MediaSessionManager::wirelessRoutesAvailableChanged):
3987         * platform/audio/MediaSessionManager.h:
3988         (WebCore::MediaSessionManager::hasWirelessTargetsAvailable):
3989         (WebCore::MediaSessionManager::startMonitoringAirPlayRoutes):
3990         (WebCore::MediaSessionManager::stopMonitoringAirPlayRoutes):
3991         * platform/audio/ios/MediaSessionManagerIOS.h:
3992         * platform/audio/ios/MediaSessionManagerIOS.mm:
3993         (WebCore::MediaSessionManageriOS::hasWirelessTargetsAvailable):
3994         (WebCore::MediaSessionManageriOS::startMonitoringAirPlayRoutes):
3995         (WebCore::MediaSessionManageriOS::stopMonitoringAirPlayRoutes):
3996         (-[WebMediaSessionHelper initWithCallback:]):
3997         (-[WebMediaSessionHelper hasWirelessTargetsAvailable]):
3998         (-[WebMediaSessionHelper startMonitoringAirPlayRoutes]):
3999         (-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]):
4000         (-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]):
4001         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
4002         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessVideoPlaybackDisabled):
4003         (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessVideoPlaybackDisabled):
4004
4005 2014-03-27  Bem Jones-Bey  <bjonesbe@adobe.com>
4006
4007         [CSS Shapes][css clip-path] rounded corner calculation for box shapes is wrong
4008         https://bugs.webkit.org/show_bug.cgi?id=127982
4009
4010         Reviewed by Simon Fraser.
4011
4012         Calculate rounded corners for box shapes as defined in the CSS Shapes
4013         spec.
4014
4015         Tests: css3/masking/clip-path-border-radius-border-box-000.html
4016                css3/masking/clip-path-border-radius-content-box-000.html
4017                css3/masking/clip-path-border-radius-content-box-001.html
4018                css3/masking/clip-path-border-radius-padding-box-000.html
4019                css3/masking/clip-path-border-radius-padding-box-001.html
4020                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-border-box-000.html
4021                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-border-box-001.html
4022                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-border-box-002.html
4023                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-000.html
4024                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-001.html
4025                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-002.html