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