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