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