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