Remove some unnecessary branches from LiveNodeList traversal
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-03-27  Antti Koivisto  <antti@apple.com>
2
3         Remove some unnecessary branches from LiveNodeList traversal
4         https://bugs.webkit.org/show_bug.cgi?id=130854
5
6         Reviewed by Andreas Kling.
7
8         Compile different traversal code paths for all NodeList subclasses.
9
10         * dom/ClassNodeList.cpp:
11         (WebCore::ClassNodeList::ClassNodeList):
12         (WebCore::ClassNodeList::~ClassNodeList):
13         (WebCore::ClassNodeList::nodeMatches): Deleted.
14         * dom/ClassNodeList.h:
15         (WebCore::ClassNodeList::nodeMatches):
16         (WebCore::ClassNodeList::nodeMatchesInlined): Deleted.
17         
18             Remove separate nodeMatchesInlined functions. 
19             We now rely on exact types and marking classes final.
20
21         * dom/LiveNodeList.cpp:
22         (WebCore::LiveNodeList::LiveNodeList):
23         (WebCore::LiveNodeList::~LiveNodeList):
24         (WebCore::LiveNodeList::namedItem):
25         (WebCore::LiveNodeList::rootNode): Deleted.
26         (WebCore::isMatchingElement): Deleted.
27         (WebCore::firstMatchingElement): Deleted.
28         (WebCore::lastMatchingElement): Deleted.
29         (WebCore::nextMatchingElement): Deleted.
30         (WebCore::previousMatchingElement): Deleted.
31         (WebCore::traverseMatchingElementsForward): Deleted.
32         (WebCore::traverseMatchingElementsBackward): Deleted.
33         (WebCore::LiveNodeList::collectionFirst): Deleted.
34         (WebCore::LiveNodeList::collectionLast): Deleted.
35         (WebCore::LiveNodeList::collectionTraverseForward): Deleted.
36         (WebCore::LiveNodeList::collectionTraverseBackward): Deleted.
37         (WebCore::LiveNodeList::length): Deleted.
38         (WebCore::LiveNodeList::item): Deleted.
39         (WebCore::LiveNodeList::memoryCost): Deleted.
40         (WebCore::LiveNodeList::invalidateCache): Deleted.
41         * dom/LiveNodeList.h:
42         (WebCore::LiveNodeList::invalidateCacheForAttribute):
43         (WebCore::CachedLiveNodeList::collectionCanTraverseBackward):
44         (WebCore::LiveNodeList::rootNode):
45         (WebCore::CachedLiveNodeList<NodeListType>::CachedLiveNodeList):
46         
47             Add CachedLiveNodeList<NodeListType> utility type that interfaces with CollectionIndexCache.
48             It is the base class for all concrete LiveNodeLists.
49
50         (WebCore::CachedLiveNodeList<NodeListType>::~CachedLiveNodeList):
51         (WebCore::CachedLiveNodeList<NodeListType>::collectionFirst):
52         (WebCore::CachedLiveNodeList<NodeListType>::collectionLast):
53         (WebCore::nextMatchingElement):
54         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseForward):
55         (WebCore::previousMatchingElement):
56         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseBackward):
57         (WebCore::CachedLiveNodeList<NodeListType>::willValidateIndexCache):
58         (WebCore::CachedLiveNodeList<NodeListType>::invalidateCache):
59         (WebCore::CachedLiveNodeList<NodeListType>::length):
60         (WebCore::CachedLiveNodeList<NodeListType>::item):
61         (WebCore::CachedLiveNodeList<NodeListType>::memoryCost):
62         
63             Templated code moves to header.
64
65         (WebCore::LiveNodeList::LiveNodeList): Deleted.
66         (WebCore::LiveNodeList::~LiveNodeList): Deleted.
67         (WebCore::LiveNodeList::invalidateCache): Deleted.
68         (WebCore::LiveNodeList::collectionCanTraverseBackward): Deleted.
69         (WebCore::LiveNodeList::willValidateIndexCache): Deleted.
70         * dom/NameNodeList.cpp:
71         (WebCore::NameNodeList::NameNodeList):
72         * dom/NameNodeList.h:
73         * dom/Node.cpp:
74         (WebCore::Document::invalidateNodeListAndCollectionCaches):
75         (WebCore::NodeListsNodeData::invalidateCaches):
76         * dom/TagNodeList.cpp:
77         (WebCore::TagNodeList::TagNodeList):
78         (WebCore::HTMLTagNodeList::HTMLTagNodeList):
79         (WebCore::HTMLTagNodeList::~HTMLTagNodeList):
80         (WebCore::TagNodeList::nodeMatches): Deleted.
81         (WebCore::HTMLTagNodeList::nodeMatches): Deleted.
82         * dom/TagNodeList.h:
83         (WebCore::TagNodeList::nodeMatches):
84         (WebCore::HTMLTagNodeList::nodeMatches):
85         (WebCore::TagNodeList::create): Deleted.
86         (WebCore::HTMLTagNodeList::nodeMatchesInlined): Deleted.
87         * html/LabelsNodeList.cpp:
88         (WebCore::LabelsNodeList::LabelsNodeList):
89         * html/LabelsNodeList.h:
90         * html/RadioNodeList.cpp:
91         (WebCore::RadioNodeList::RadioNodeList):
92         * html/RadioNodeList.h:
93
94 2014-03-27  Adenilson Cavalcanti  <cavalcantii@gmail.com>
95
96         Remove comment from Filter.h
97         https://bugs.webkit.org/show_bug.cgi?id=130848
98
99         Reviewed by Simon Fraser.
100
101         Exploring the use of consts on applyScale() methods didn't yield
102         good results.
103
104         No new tests, no change on behavior.
105
106         * platform/graphics/filters/Filter.h:
107
108 2014-03-27  Frédéric Wang  <fred.wang@free.fr>
109
110         Operator stretching: expose a math data API
111         https://bugs.webkit.org/show_bug.cgi?id=130572
112
113         Reviewed by Chris Fleizach.
114
115         We expose a new SimpleFontData API to give access to the data from the
116         OpenType MATH table using a font cache. The class OpenTypeMathData will
117         be implemented in bug 130324. On Darwin platform, we also implement the
118         missing FontPlatformData::openTypeTable function which will be necessary
119         to load the OpenType MATH table. The changes are intended to be used
120         for MathML operator stretching (bug 130322) so tests are not added yet.
121
122         * CMakeLists.txt: add new OpenTypeMathData files.
123         * WebCore.vcxproj/WebCore.vcxproj: ditto.
124         * WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
125         * WebCore.xcodeproj/project.pbxproj: ditto.
126         * platform/graphics/FontCache.cpp: We add a FontCache::getMathData function to implement a cache for the math data.
127         We make the math and vertical data share the same key for the cache.
128         (WebCore::fontMathDataCacheInstance):
129         (WebCore::FontCache::getMathData):
130         (WebCore::fontVerticalDataCacheInstance):
131         * platform/graphics/FontCache.h: We declare FontCache::getMathData and FontFileKey on all platforms.
132         * platform/graphics/FontPlatformData.cpp:
133         (WebCore::FontPlatformData::openTypeTable): We implement openTypeTable() on Darwin platform.
134         * platform/graphics/FontPlatformData.h: We expose openTypeTable() on Darwin platform.
135         * platform/graphics/SimpleFontData.cpp: We initialize m_mathData from the font cache.
136         (WebCore::SimpleFontData::SimpleFontData):
137         * platform/graphics/SimpleFontData.h: We expose a mathData() function to access the MATH data.
138         * platform/graphics/opentype/OpenTypeMathData.cpp: Added. This is a new class that will be used to parse the data from the OpenType MATH table.
139         (WebCore::OpenTypeMathData::OpenTypeMathData):
140         * platform/graphics/opentype/OpenTypeMathData.h: Added.
141         (WebCore::OpenTypeMathData::create):
142         (WebCore::OpenTypeMathData::hasMathData):
143
144 2014-03-27  Brent Fulgham  <bfulgham@apple.com>
145
146         Fix a crash caused by track insertion after load()
147         https://bugs.webkit.org/show_bug.cgi?id=130777
148
149         Reviewed by Eric Carlson.
150
151         Test: media/track/track-insert-after-load-crash.html
152
153         Based on the Blink change (patch by acolwell@chromium.org):
154         https://codereview.chromium.org/211373009/
155
156         * html/HTMLMediaElement.cpp:
157         (WebCore::HTMLMediaElement::parseAttribute): Remove stale LoadMediaResource flag after explicit load.
158
159 2014-03-27  Alexey Proskuryakov  <ap@apple.com>
160
161         Connection::dispatchOneMessage() can be re-entered while handling Cmd-key menu
162         equivalents, ASSERT(!_data->_keyDownEventBeingResent)
163         https://bugs.webkit.org/show_bug.cgi?id=130767
164         <rdar://problem/16307487>
165
166         Added a wrapper for RunLoop::initializeMainThread that also adds modal run loop
167         mode to it on Mac.
168
169         * CMakeLists.txt:
170         * WebCore.exp.in:
171         * WebCore.vcxproj/WebCore.vcxproj:
172         * WebCore.vcxproj/WebCore.vcxproj.filters:
173         * WebCore.xcodeproj/project.pbxproj:
174         * platform/MainRunLoop.cpp: Added.
175         (WebCore::initializeMainRunLoop):
176         * platform/MainRunLoop.h: Added.
177         * platform/mac/MainRunLoop.mm: Added.
178         (WebCore::initializeMainRunLoop):
179
180 2014-03-27  Krzysztof Czech  <k.czech@samsung.com>
181
182         AX: Returns const reference to static string.
183         https://bugs.webkit.org/show_bug.cgi?id=130835
184
185         Reviewed by Mario Sanchez Prada.
186
187         Avoiding some unnecessary copies by returning const reference to static string.
188
189         No new tests. No behaviour change.
190
191         * accessibility/AccessibilityMediaControls.cpp:
192         (WebCore::AccessibilityMediaControl::controlTypeName):
193         (WebCore::AccessibilityMediaControlsContainer::elementTypeName):
194         * accessibility/AccessibilityMediaControls.h:
195
196 2014-03-27  Mihnea Ovidenie  <mihnea@adobe.com>
197
198         [CSSRegions] Rename inNamedFlow flag to isNamedFlowContentNode flag
199         https://bugs.webkit.org/show_bug.cgi?id=130731
200
201         Reviewed by Andrei Bucur.
202
203         Currently, the inNamedFlow flag in Node class tells if a node is a content node, one that has a style with flow-into.
204         Since it is used only for those nodes and not propagated through hierarchy, i want to renamed it to a more meaningful name.
205         No new functionality, no new tests.
206
207         * dom/ContainerNode.cpp:
208         (WebCore::destroyRenderTreeIfNeeded):
209         * dom/Element.cpp:
210         (WebCore::Element::~Element):
211         (WebCore::Element::unregisterNamedFlowContentElement):
212         * dom/Node.h:
213         (WebCore::Node::isNamedFlowContentNode):
214         (WebCore::Node::setIsNamedFlowContentNode):
215         (WebCore::Node::clearIsNamedFlowContentNode):
216         * rendering/RenderNamedFlowThread.cpp:
217         (WebCore::RenderNamedFlowThread::clearContentElements):
218         (WebCore::RenderNamedFlowThread::registerNamedFlowContentElement):
219         (WebCore::RenderNamedFlowThread::unregisterNamedFlowContentElement):
220         (WebCore::nextNodeInsideContentElement):
221         * style/StyleResolveTree.cpp:
222         (WebCore::Style::attachChildren):
223         (WebCore::Style::resolveLocal):
224
225 2014-03-27  Mihnea Ovidenie  <mihnea@adobe.com>
226
227         [CSSRegions] Crash when cloning a region child with a content node child
228         https://bugs.webkit.org/show_bug.cgi?id=129811
229
230         Reviewed by David Hyatt.
231
232         Collecting the children of a region in another named flow will be supported
233         again in the future and it will be revisited when we will implement the content
234         keyword: http://dev.w3.org/csswg/css-regions-1/#the-flow-into-property.
235         Remove the support for now as it introduces unnecessary complexity in the code
236         and potential wrong behavior.
237
238         Test: fast/regions/region-content-node-child-clone-crash.html
239
240         * dom/Element.cpp:
241         (WebCore::Element::shouldMoveToFlowThread):
242         (WebCore::Element::clearStyleDerivedDataBeforeDetachingRenderer):
243         * dom/Element.h:
244         * dom/ElementRareData.h:
245         (WebCore::ElementRareData::ElementRareData):
246         * rendering/FlowThreadController.cpp:
247         * rendering/FlowThreadController.h:
248         * style/StyleResolveTree.cpp:
249         (WebCore::Style::moveToFlowThreadIfNeeded):
250         (WebCore::Style::createRendererIfNeeded):
251
252 2014-03-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
253
254         Remove unneeded mutable keyword in some member variables 
255         https://bugs.webkit.org/show_bug.cgi?id=130813
256
257         Reviewed by Andreas Kling.
258
259         Some member variables have mutable keyword though they don't used by const function.
260         This patch removes them. 
261
262         No new tests, no behavior changes. Just clean up.
263
264         * storage/StorageAreaSync.h:
265         * svg/animation/SVGSMILElement.h:
266
267 2014-03-27  Commit Queue  <commit-queue@webkit.org>
268
269         Unreviewed, rolling out r166296 and r166331.
270         https://bugs.webkit.org/show_bug.cgi?id=130822
271
272         caused some crashes and frequent assertion failures, and the
273         fix is going to take a little while (Requested by thorton on
274         #webkit).
275
276         Reverted changesets:
277
278         "[iOS WebKit2] Flush all surfaces after painting into all of
279         them, instead of after painting into each one"
280         https://bugs.webkit.org/show_bug.cgi?id=130768
281         http://trac.webkit.org/changeset/166296
282
283         "Assertion failure in RemoteLayerBackingStore::flush"
284         https://bugs.webkit.org/show_bug.cgi?id=130810
285         http://trac.webkit.org/changeset/166331
286
287 2014-03-26  Simon Fraser  <simon.fraser@apple.com>
288
289         Fix failing scrolling tests by reverting to previous behavior where
290         the scrolling geometry for the main frame scrolling node was only
291         updated from frameViewLayoutUpdated() and no-where else.
292
293         * WebCore.exp.in:
294         * page/scrolling/AsyncScrollingCoordinator.cpp:
295         (WebCore::AsyncScrollingCoordinator::updateScrollingNode):
296         * page/scrolling/AsyncScrollingCoordinator.h:
297         * page/scrolling/ScrollingCoordinator.h:
298         (WebCore::ScrollingCoordinator::updateScrollingNode):
299         * rendering/RenderLayerCompositor.cpp:
300         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
301         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer): Deleted.
302
303 2014-03-26  Ryosuke Niwa  <rniwa@webkit.org>
304
305         HTMLConverter::_processText is slow because it walks up ancestor elements
306         https://bugs.webkit.org/show_bug.cgi?id=130820
307
308         Reviewed by Sam Weinig.
309
310         Avoid walking up the tree from each text node by caching the aggregated attributed strings for each element.
311         Also compute the attributed strings top-down to avoid calling mutableCopy in every iteration. 
312
313         This reduces the runtime of Interactive/CopyAll.html from 15s to 13s (15%).
314
315         * editing/cocoa/HTMLConverter.mm:
316         (HTMLConverter::_attributesForElement):
317         (HTMLConverter::attributesForElement):
318         (HTMLConverter::aggregatedAttributesForAncestors):
319         (HTMLConverter::_processText):
320
321 2014-03-26  Sam Weinig  <sam@webkit.org>
322
323         Fix iOS build.
324
325         * editing/cocoa/HTMLConverter.mm:
326         (_font):
327
328 2014-03-26  Ryosuke Niwa  <rniwa@webkit.org>
329
330         Make _processText and _traverseNode in HTMLConverter more efficient
331         https://bugs.webkit.org/show_bug.cgi?id=130769
332
333         Reviewed by Sam Weinig.
334
335         Rewrote a bunch of code in C++ and avoided creating wrappers.
336         This reduces the runtime of Interactive/CopyAll.html from ~16.5s to 15s.
337
338         * editing/cocoa/HTMLConverter.mm:
339         (HTMLConverterCaches::isAncestorsOfStartToBeConverted):
340         (HTMLConverter::HTMLConverter):
341         (HTMLConverter::~HTMLConverter):
342         (HTMLConverter::_processElement):
343         (HTMLConverter::_processText):
344         (HTMLConverter::_traverseNode):
345         (HTMLConverter::_traverseFooterNode):
346         (HTMLConverterCaches::cacheAncestorsOfStartToBeConverted):
347         (HTMLConverter::_loadFromDOMRange):
348
349 2014-03-26  Adenilson Cavalcanti  <cavalcantii@gmail.com>
350
351         FEGaussianBlur: unify and const-ify calculateKernelSize
352         https://bugs.webkit.org/show_bug.cgi?id=130779
353
354         Some methods can benefit of using const refs as also make sense to
355         unify the interface (i.e. parameters) in calculateKernelSize/Unscaled.
356
357         FilterEffect::filter() will now return a reference, which helps since
358         its descendants were accessing methods into the pointer without testing
359         for it.
360
361         Reviewed by Simon Fraser.
362
363         No new tests, no changes on behavior.
364
365         * platform/graphics/filters/FEDisplacementMap.cpp:
366         (WebCore::FEDisplacementMap::platformApplySoftware):
367         * platform/graphics/filters/FEDropShadow.cpp:
368         (WebCore::FEDropShadow::determineAbsolutePaintRect):
369         (WebCore::FEDropShadow::platformApplySoftware):
370         * platform/graphics/filters/FEGaussianBlur.cpp:
371         (WebCore::FEGaussianBlur::calculateUnscaledKernelSize):
372         (WebCore::FEGaussianBlur::calculateKernelSize):
373         (WebCore::FEGaussianBlur::determineAbsolutePaintRect):
374         (WebCore::FEGaussianBlur::platformApplySoftware):
375         * platform/graphics/filters/FEGaussianBlur.h:
376         * platform/graphics/filters/FEMorphology.cpp:
377         (WebCore::FEMorphology::determineAbsolutePaintRect):
378         (WebCore::FEMorphology::platformApplySoftware):
379         * platform/graphics/filters/FEOffset.cpp:
380         (WebCore::FEOffset::determineAbsolutePaintRect):
381         (WebCore::FEOffset::platformApplySoftware):
382         * platform/graphics/filters/FETile.cpp:
383         (WebCore::FETile::platformApplySoftware):
384         * platform/graphics/filters/FETurbulence.cpp:
385         (WebCore::FETurbulence::fillRegion):
386         * platform/graphics/filters/Filter.h:
387         (WebCore::Filter::applyHorizontalScale):
388         (WebCore::Filter::applyVerticalScale):
389         * platform/graphics/filters/FilterEffect.h:
390         (WebCore::FilterEffect::filter):
391         * platform/graphics/filters/SourceAlpha.cpp:
392         (WebCore::SourceAlpha::determineAbsolutePaintRect):
393         (WebCore::SourceAlpha::platformApplySoftware):
394         * platform/graphics/filters/SourceGraphic.cpp:
395         (WebCore::SourceGraphic::determineAbsolutePaintRect):
396         (WebCore::SourceGraphic::platformApplySoftware):
397         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
398         (WebCore::RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion):
399         * svg/graphics/filters/SVGFEImage.cpp:
400         (WebCore::FEImage::determineAbsolutePaintRect):
401         (WebCore::FEImage::platformApplySoftware):
402
403 2014-03-26  Simon Fraser  <simon.fraser@apple.com>
404
405         Make sure childContainmentLayer is parented
406         https://bugs.webkit.org/show_bug.cgi?id=130808
407
408         Reviewed by Tim Horton.
409
410         m_childContainmentLayer was never parented if the page
411         created no other compositing layers, which left a dangling
412         GraphicsLayer which in turn confused UI-side compositing a little.
413         Fix by always parenting this layer.
414
415         * rendering/RenderLayerBacking.cpp:
416         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
417
418 2014-03-26  Brian Burg  <bburg@apple.com>
419
420         Web Replay: disable page cache during capture/replay
421         https://bugs.webkit.org/show_bug.cgi?id=130672
422
423         Reviewed by Timothy Hatcher.
424
425         Save, set, and restore page cache settings at the correct times.
426
427         No new tests. If this code fails, then the tests for network replay will fail.
428
429         * replay/ReplayController.cpp:
430         (WebCore::ReplayController::setForceDeterministicSettings): Added.
431         (WebCore::ReplayController::startCapturing):
432         (WebCore::ReplayController::stopCapturing):
433         (WebCore::ReplayController::cancelPlayback):
434         (WebCore::ReplayController::replayToPosition):
435         * replay/ReplayController.h:
436
437 2014-03-26  Sam Weinig  <sam@webkit.org>
438
439         Convert more of HTMLConverter to C++
440         https://bugs.webkit.org/show_bug.cgi?id=130811
441
442         Reviewed by Anders Carlsson.
443
444         * editing/cocoa/HTMLConverter.mm:
445         (HTMLConverter::HTMLConverter):
446         (HTMLConverter::~HTMLConverter):
447         (HTMLConverter::_blockLevelElementForNode):
448         (HTMLConverter::_colorForElement):
449         (HTMLConverter::_computedAttributesForElement):
450         (HTMLConverter::_attributesForElement):
451         (HTMLConverter::_fillInBlock):
452         (HTMLConverter::_enterElement):
453         (HTMLConverter::_addTableForElement):
454         (HTMLConverter::_addTableCellForElement):
455         (HTMLConverter::_processElement):
456         (HTMLConverter::_exitElement):
457         (HTMLConverter::_getFloat): Deleted.
458         (HTMLConverter::_elementIsBlockLevel): Deleted.
459         (HTMLConverter::_elementHasOwnBackgroundColor): Deleted.
460         (HTMLConverter::_colorForNode): Deleted.
461
462 2014-03-26  Simon Fraser  <simon.fraser@apple.com>
463
464         Hook up -webkit-overflow-scrolling:touch for iOS WK2
465         https://bugs.webkit.org/show_bug.cgi?id=130809
466
467         Reviewed by Tim Horton.
468
469         Get -webkit-overflow-scrolling: touch working for iOS WK2.
470         
471         * WebCore.exp.in:
472         * page/scrolling/AsyncScrollingCoordinator.cpp:
473         (WebCore::AsyncScrollingCoordinator::updateScrollingNode):
474         Send in ScrollingGeometry when we update scrolling nodes.
475         * page/scrolling/AsyncScrollingCoordinator.h:
476         * page/scrolling/ScrollingCoordinator.h:
477         (WebCore::ScrollingCoordinator::updateScrollingNode):
478         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h:
479         Need to get to the scrolling layer in a subclass.
480         (WebCore::ScrollingTreeScrollingNodeIOS::scrollLayer):
481         * rendering/RenderLayer.cpp:
482         (WebCore::RenderLayer::hasAcceleratedTouchScrolling): Remove code
483         that temporarily disabled touch-scrolling.
484         * rendering/RenderLayerCompositor.cpp:
485         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer): When we
486         update scrolling nodes, send in the right scrolling geometry.
487
488 2014-03-26  Timothy Hatcher  <timothy@apple.com>
489
490         Modernize the loops in InspectorPageAgent.cpp.
491
492         Also moves the check for hiddenFromInspector to a lower level.
493         This hides hidden resources from more places.
494
495         https://bugs.webkit.org/show_bug.cgi?id=130803
496
497         Reviewed by Joseph Pecoraro.
498
499         * inspector/InspectorPageAgent.cpp:
500         (WebCore::buildArrayForCookies):
501         (WebCore::cachedResourcesForFrame):
502         (WebCore::allResourcesURLsForFrame):
503         (WebCore::InspectorPageAgent::getCookies):
504         (WebCore::InspectorPageAgent::searchInResources):
505         (WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
506         (WebCore::InspectorPageAgent::loaderDetachedFromFrame):
507         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
508
509 2014-03-26  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
510
511         Add platform implementation for RTCOfferAnswerOptions and RTCOfferOptions
512         https://bugs.webkit.org/show_bug.cgi?id=130689
513
514         Reviewed by Eric Carlson.
515
516         RTCOfferAnswerOptions and RTCOfferOptions objects were being passed to platform class, causing a layer
517         violation.
518
519         * Modules/mediastream/RTCOfferAnswerOptions.cpp:
520         (WebCore::RTCOfferAnswerOptions::initialize):
521         (WebCore::RTCOfferOptions::initialize):
522         * Modules/mediastream/RTCOfferAnswerOptions.h:
523         (WebCore::RTCOfferAnswerOptions::requestIdentity):
524         (WebCore::RTCOfferAnswerOptions::privateOfferAnswerOptions):
525         (WebCore::RTCOfferAnswerOptions::RTCOfferAnswerOptions):
526         (WebCore::RTCOfferOptions::offerToReceiveVideo):
527         (WebCore::RTCOfferOptions::offerToReceiveAudio):
528         (WebCore::RTCOfferOptions::voiceActivityDetection):
529         (WebCore::RTCOfferOptions::iceRestart):
530         (WebCore::RTCOfferOptions::privateOfferOptions):
531         (WebCore::RTCOfferOptions::RTCOfferOptions):
532         * Modules/mediastream/RTCPeerConnection.cpp:
533         (WebCore::RTCPeerConnection::createOffer):
534         (WebCore::RTCPeerConnection::createAnswer):
535         * platform/mediastream/RTCOfferAnswerOptionsPrivate.h: Added.
536         * platform/mediastream/RTCPeerConnectionHandler.h:
537         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
538         (WebCore::RTCPeerConnectionHandlerMock::createOffer):
539         (WebCore::RTCPeerConnectionHandlerMock::createAnswer):
540         * platform/mock/RTCPeerConnectionHandlerMock.h:
541
542 2014-03-26  Zalan Bujtas  <zalan@apple.com>
543
544         Device scale factor should always be greater than 0.
545         https://bugs.webkit.org/show_bug.cgi?id=130798
546
547         Reviewed by David Kilzer.
548
549         Rendering context requires a device scale factor > 0 so that we can map CSS pixels
550         to device pixels properly. Neither 0 nor a negative device pixel ratio are considered to be valid.
551
552         * page/Page.cpp:
553         (WebCore::Page::setDeviceScaleFactor):
554
555 2014-03-26  Myles C. Maxfield  <mmaxfield@apple.com>
556
557         Skipping underlines disregard points completely inside the underline rect
558         https://bugs.webkit.org/show_bug.cgi?id=130800
559
560         Reviewed by Dean Jackson.
561
562         When determining bounds for underline skipping, endpoints of glyph contours
563         that lie entirely within the rect of the underline are ignored. This patch
564         makes these points affect the skipping regions the same way that intersections
565         do.
566
567         Test: fast/css3-text/css3-text-decoration/text-decoration-skip/glyph-inside-underline.html
568
569         * platform/graphics/mac/FontMac.mm:
570         (WebCore::updateX): Refactored common code into a function
571         (WebCore::findPathIntersections): Test for endpoints which lie entirely within
572         the underline bounds
573
574 2014-03-26  Pratik Solanki  <psolanki@apple.com>
575
576         Unreviewed. iOS build fix after r166312. Soft link CMTimeRangeGetEnd.
577
578         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
579
580 2014-03-26  Timothy Hatcher  <timothy@apple.com>
581
582         Propagate the hiddenFromInspector flag on ResourceRequest in
583         places when a new request a made or passed between processes.
584
585         https://bugs.webkit.org/show_bug.cgi?id=130741
586
587         Reviewed by Joseph Pecoraro.
588
589         * WebCore.exp.in: Updated symbols for updateFromDelegatePreservingOldProperties.
590         * platform/network/cf/ResourceRequest.h:
591         * platform/network/cf/ResourceRequestCFNet.cpp:
592         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties): Added.
593         (WebCore::ResourceRequest::updateFromDelegatePreservingOldHTTPBody): Deleted.
594         * platform/network/curl/ResourceRequest.h:
595         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties): Added.
596         (WebCore::ResourceRequest::updateFromDelegatePreservingOldHTTPBody): Deleted.
597         * platform/network/mac/ResourceRequestMac.mm:
598         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties): Added.
599         (WebCore::ResourceRequest::updateFromDelegatePreservingOldHTTPBody): Deleted.
600         * platform/network/soup/ResourceRequest.h:
601         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties): Added.
602         (WebCore::ResourceRequest::updateFromDelegatePreservingOldHTTPBody): Deleted.
603
604 2014-03-26  Zoltan Horvath  <zoltan@webkit.org>
605
606         [CSS Shapes] Remove no-longer-used shape-inside geometry code
607         https://bugs.webkit.org/show_bug.cgi?id=130740
608
609         Reviewed by David Hyatt.
610
611         This patch removes shape-padding support, since it can be used only with shape-inside.
612         Shape-inside support has been removed in r166301.
613
614         No new tests needed, existing tests have been removed by r166301.
615
616         * rendering/shapes/BoxShape.cpp:
617         (WebCore::BoxShape::shapePaddingLogicalBoundingBox): Deleted.
618         (WebCore::BoxShape::shapePaddingBounds): Deleted.
619         (WebCore::BoxShape::getIncludedIntervals): Deleted.
620         (WebCore::BoxShape::firstIncludedIntervalLogicalTop): Deleted.
621         * rendering/shapes/BoxShape.h:
622         * rendering/shapes/PolygonShape.cpp:
623         (WebCore::leftSide): Deleted.
624         (WebCore::isReflexVertex): Deleted.
625         (WebCore::computeShapePaddingBounds): Deleted.
626         (WebCore::PolygonShape::shapePaddingBounds): Deleted.
627         (WebCore::PolygonShape::getIncludedIntervals): Deleted.
628         (WebCore::firstFitRectInPolygon): Deleted.
629         (WebCore::aboveOrToTheLeft): Deleted.
630         (WebCore::PolygonShape::firstIncludedIntervalLogicalTop): Deleted.
631         * rendering/shapes/PolygonShape.h:
632         (WebCore::PolygonShape::PolygonShape):
633         * rendering/shapes/RasterShape.cpp:
634         (WebCore::RasterShapeIntervals::firstIncludedIntervalY): Deleted.
635         (WebCore::RasterShapeIntervals::getIncludedIntervals): Deleted.
636         (WebCore::RasterShape::paddingIntervals): Deleted.
637         (WebCore::RasterShape::getIncludedIntervals): Deleted.
638         (WebCore::RasterShape::firstIncludedIntervalLogicalTop): Deleted.
639         * rendering/shapes/RasterShape.h:
640         * rendering/shapes/RectangleShape.cpp:
641         (WebCore::ellipseYIntercept): Deleted.
642         (WebCore::RectangleShape::shapePaddingBounds): Deleted.
643         (WebCore::RectangleShape::getIncludedIntervals): Deleted.
644         (WebCore::cornerInterceptForWidth): Deleted.
645         (WebCore::RectangleShape::firstIncludedIntervalLogicalTop): Deleted.
646         * rendering/shapes/RectangleShape.h:
647         * rendering/shapes/Shape.cpp:
648         (WebCore::Shape::createShape):
649         (WebCore::Shape::createRasterShape):
650         (WebCore::Shape::createBoxShape):
651         * rendering/shapes/Shape.h:
652         (WebCore::Shape::lineOverlapsShapePaddingBounds): Deleted.
653         (WebCore::Shape::shapePadding): Deleted.
654         * rendering/shapes/ShapeInfo.cpp:
655         (WebCore::ShapeInfo<RenderType>::computedShape):
656         * rendering/style/RenderStyle.cpp:
657         (WebCore::RenderStyle::changeRequiresLayout):
658         * rendering/style/RenderStyle.h:
659         * rendering/style/StyleRareNonInheritedData.cpp:
660         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
661         (WebCore::StyleRareNonInheritedData::operator==):
662         * rendering/style/StyleRareNonInheritedData.h:
663
664 2014-03-26  Jeremy Jones  <jeremyj@apple.com>
665
666         Implement hasLiveStreamingContent property in WebAVPlayerController
667         https://bugs.webkit.org/show_bug.cgi?id=128684
668
669         Reviewed by Simon Fraser.
670
671         * WebCore.exp.in:
672         Add export for WebVideoFullscreenInterfaceAVKit::setSeekableRanges().
673
674         * platform/ios/WebVideoFullscreenInterface.h:
675         Add setSeekableRanges()
676
677         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
678         Add setSeekableRanges()
679
680         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
681         Remove vestigial playerLayer property. Add seekableTimeRanges property.
682
683         (-[WebAVPlayerController dealloc]):
684         Release _seekableTimeRanges.
685         Remove references to _playerLayer.
686
687         (-[WebAVPlayerController hasLiveStreamingContent]):
688         Implement based on duration. Live stream has an infinite duration.
689
690         (+[WebAVPlayerController keyPathsForValuesAffectingHasLiveStreamingContent]):
691         Describe dependent keys for computed property hasLiveStreamingContent.
692
693         (-[WebAVPlayerController skipBackwardThirtySeconds:]):
694         Seek back 30 seconds if that time is in the seekable ranges.
695
696         (-[WebAVPlayerController gotoEndOfSeekableRanges:]):
697         Jump to live by going to the of the seekable ranges.
698
699         (WebVideoFullscreenInterfaceAVKit::setSeekableRanges):
700         Convert TimeRange to CMTimeRange.
701
702         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
703         (WebVideoFullscreenModelMediaElement::setMediaElement):
704         Set initial seekable ranges.
705
706         (WebVideoFullscreenModelMediaElement::handleEvent):
707         Update seekable ranges when time changes.
708
709 2014-03-26  Brent Fulgham  <bfulgham@apple.com>
710
711         Fix OS X build.
712
713         * WebCore.exp.in: Add missing export symbol.
714
715 2014-03-26  Simon Fraser  <simon.fraser@apple.com>
716
717         Fix the Windows build. Add a no-op impl for Mac non-UI-side.
718
719         * platform/graphics/ca/mac/PlatformCALayerMac.h:
720         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
721         (PlatformCALayerWin::PlatformCALayerWin):
722         * platform/graphics/ca/win/PlatformCALayerWin.h:
723
724 2014-03-26  Simon Fraser  <simon.fraser@apple.com>
725
726         REGRESSION (r155977): matrix animations no longer animate
727         https://bugs.webkit.org/show_bug.cgi?id=130789
728         <rdar://problem/15650946>
729
730         Reviewed by Dean Jackson.
731         
732         r155977 erroneously removed two lines that set the end points for
733         matrix animations (used when transform lists don't match), so
734         put them back.
735         
736         Also don't repaint when updateContentsScale()
737         is called and doesn't change the contents scale.
738
739         Test: compositing/animation/matrix-animation.html
740
741         * platform/graphics/ca/GraphicsLayerCA.cpp:
742         (WebCore::GraphicsLayerCA::updateRootRelativeScale):
743         (WebCore::GraphicsLayerCA::setTransformAnimationEndpoints):
744         (WebCore::GraphicsLayerCA::updateContentsScale):
745
746 2014-03-26  Simon Fraser  <simon.fraser@apple.com>
747
748         Add a custom behavior flag to GraphicsLayer, piped down to PlatformCALayer, for scrolling layers
749         https://bugs.webkit.org/show_bug.cgi?id=130778
750
751         Reviewed by Tim Horton.
752
753         Make it possible to put a "custom behavior" flag on a layer so that,
754         with UI-side compositing, we know to create a specific type of
755         layer or view for that GraphicsLayer.
756
757         * WebCore.exp.in:
758         * platform/graphics/GraphicsLayer.cpp:
759         (WebCore::GraphicsLayer::GraphicsLayer):
760         * platform/graphics/GraphicsLayer.h:
761         (WebCore::GraphicsLayer::setCustomBehavior):
762         (WebCore::GraphicsLayer::customBehavior):
763         * platform/graphics/ca/GraphicsLayerCA.cpp:
764         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
765         (WebCore::GraphicsLayerCA::updateCustomBehavior):
766         (WebCore::GraphicsLayerCA::setCustomBehavior):
767         * platform/graphics/ca/GraphicsLayerCA.h:
768         * platform/graphics/ca/PlatformCALayer.h:
769         * platform/graphics/ca/mac/PlatformCALayerMac.h:
770         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
771         (PlatformCALayerMac::PlatformCALayerMac):
772         * rendering/RenderLayerBacking.cpp:
773         (WebCore::RenderLayerBacking::updateScrollingLayers):
774
775 2014-03-26  Brent Fulgham  <bfulgham@apple.com>
776
777         Unreviewed test correction.
778
779         Because of the way DRT on Windows links to WebCore, having the implementaion of the update
780         method in the header caused a runtime failure due to duplicate symbols being bound to the
781         compilation unit.
782
783         * accessibility/AXObjectCache.cpp:
784         (WebCore::AXObjectCache::setEnhancedUserInterfaceAccessibility): Moved from header.
785         * accessibility/AXObjectCache.h:
786         (WebCore::AXObjectCache::setEnhancedUserInterfaceAccessibility): Deleted.
787
788 2014-03-26  Jer Noble  <jer.noble@apple.com>
789
790         REGRESSION(r162679): Poster image visible under the video
791         https://bugs.webkit.org/show_bug.cgi?id=130783
792
793         Reviewed by Simon Fraser.
794
795         In the listed revision, we started checking for isRenderImage()
796         instead of isImage(). RenderMedias return 'true' for the first
797         but 'false' for the second. Change the if() statement to check
798         for isRenderMedia() in addition to !isRenderImage().
799
800         * rendering/RenderLayerBacking.cpp:
801         (WebCore::RenderLayerBacking::isDirectlyCompositedImage):
802
803 2014-03-26  Antti Koivisto  <antti@apple.com>
804
805         Render tree construction is O(N^2) in number of siblings
806         https://bugs.webkit.org/show_bug.cgi?id=129065
807
808         Reviewed by Darin Adler.
809         
810         When adding a new renderer to the tree we would search for the correct render tree
811         position by traversing DOM children forward to find something that already has a renderer.
812         In common case there is no such renderer. This would be repeated for each inserted renderer
813         leading to O(n^2) in respect to child node count.
814         
815         This patch caches the computed render tree insertion position and passes it to siblings.
816         Until the cached position is reached it can be used for all new renderers.
817
818         Test: perf/sibling-renderer-On2.html
819
820         * style/StyleResolveTree.cpp:
821         (WebCore::Style::RenderTreePosition::parent):
822         (WebCore::Style::RenderTreePosition::RenderTreePosition):
823         (WebCore::Style::RenderTreePosition::canInsert):
824         (WebCore::Style::RenderTreePosition::insert):
825         (WebCore::Style::RenderTreePosition::computeNextSibling):
826         (WebCore::Style::RenderTreePosition::invalidateNextSibling):
827         (WebCore::Style::styleForElement):
828         (WebCore::Style::elementInsideRegionNeedsRenderer):
829         (WebCore::Style::createRendererIfNeeded):
830         (WebCore::Style::createTextRendererIfNeeded):
831         (WebCore::Style::attachTextRenderer):
832         (WebCore::Style::updateTextRendererAfterContentChange):
833         (WebCore::Style::attachChildren):
834         (WebCore::Style::attachDistributedChildren):
835         (WebCore::Style::attachShadowRoot):
836         (WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded):
837         (WebCore::Style::attachRenderTree):
838         (WebCore::Style::resolveLocal):
839         (WebCore::Style::resolveTextNode):
840         (WebCore::Style::resolveShadowTree):
841         (WebCore::Style::updateBeforeOrAfterPseudoElement):
842         (WebCore::Style::resolveTree):
843
844 2014-03-26  Commit Queue  <commit-queue@webkit.org>
845
846         Unreviewed, rolling out r166264.
847         https://bugs.webkit.org/show_bug.cgi?id=130785
848
849         Broke some window.opener tests for WK2 Mavericks (Requested by
850         brrian__ on #webkit).
851
852         Reverted changeset:
853
854         "Web Replay: resource unique identifiers should be unique-per-
855         frame, not globally"
856         https://bugs.webkit.org/show_bug.cgi?id=130632
857         http://trac.webkit.org/changeset/166264
858
859 2014-03-26  Zoltan Horvath  <zoltan@webkit.org>
860
861         [CSS Shapes] Remove shape-inside support
862         https://bugs.webkit.org/show_bug.cgi?id=130698
863
864         Reviewed by David Hyatt.
865
866         CSS Shapes Level 1 (CR) only contains shape-outside. We are focusing our efforts on finalizing
867         the implementation of shape-outside, it's worth to remove shape-inside code at this point for now.
868
869         A list of reasons for the removal:
870           - Shape-inside is only part of Shapes Level 2, which needs to be improved on some topics.
871           - Shape-inside is lack of new shapes support (e.g. inset).
872           - Deprecated shapes (r165472) are removed from the code (e.g. rectangle), which affects shape-inside. 
873           - The current shape-inside code spreads across the layout code.
874           - The current shape-inside implementation is experimental in some areas,
875             and the partially implemented code can have security implications.
876           - Removal of shape-inside opens possibilities for code complexity and performance
877             optimizations for shape-outside. (e.g. simpler geometry code)
878
879         No new tests are needed.
880
881         * CMakeLists.txt:
882         * Configurations/FeatureDefines.xcconfig:
883         * GNUmakefile.list.am:
884         * WebCore.xcodeproj/project.pbxproj:
885         * css/CSSComputedStyleDeclaration.cpp:
886         (WebCore::ComputedStyleExtractor::propertyValue):
887         * css/CSSParser.cpp:
888         (WebCore::isSimpleLengthPropertyID):
889         (WebCore::CSSParser::parseValue):
890         (WebCore::CSSParser::parseShapeProperty):
891         * css/CSSPropertyNames.in:
892         * css/DeprecatedStyleBuilder.cpp:
893         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
894         * css/StyleResolver.cpp:
895         (WebCore::StyleResolver::applyProperty):
896         (WebCore::StyleResolver::loadPendingImages):
897         * page/animation/CSSPropertyAnimation.cpp:
898         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
899         * rendering/LayoutState.cpp:
900         (WebCore::LayoutState::LayoutState):
901         * rendering/LayoutState.h:
902         (WebCore::LayoutState::LayoutState):
903         (WebCore::LayoutState::shapeInsideInfo): Deleted.
904         * rendering/RenderBlock.cpp:
905         (WebCore::RenderBlock::styleDidChange):
906         (WebCore::RenderBlock::imageChanged):
907         (WebCore::RenderBlock::preparePaginationBeforeBlockLayout):
908         (WebCore::RenderBlock::relayoutShapeDescendantIfMoved): Deleted.
909         (WebCore::RenderBlock::logicalOffsetFromShapeAncestorContainer): Deleted.
910         (WebCore::RenderBlock::updateShapeInsideInfoAfterStyleChange): Deleted.
911         (WebCore::RenderBlock::ensureShapeInsideInfo): Deleted.
912         (WebCore::RenderBlock::shapeInsideInfo): Deleted.
913         (WebCore::RenderBlock::setShapeInsideInfo): Deleted.
914         (WebCore::RenderBlock::markShapeInsideDescendantsForLayout): Deleted.
915         (WebCore::RenderBlock::layoutShapeInsideInfo): Deleted.
916         (WebCore::shapeInfoRequiresRelayout): Deleted.
917         (WebCore::RenderBlock::computeShapeSize): Deleted.
918         (WebCore::RenderBlock::updateShapesBeforeBlockLayout): Deleted.
919         (WebCore::RenderBlock::updateShapesAfterBlockLayout): Deleted.
920         (WebCore::RenderBlock::prepareShapesAndPaginationBeforeBlockLayout): Deleted.
921         * rendering/RenderBlock.h:
922         (WebCore::RenderBlock::allowsShapeInsideInfoSharing): Deleted.
923         * rendering/RenderBlockFlow.cpp:
924         (WebCore::RenderBlockFlow::layoutBlock):
925         (WebCore::RenderBlockFlow::layoutBlockChild):
926         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
927         * rendering/RenderBlockFlow.h:
928         * rendering/RenderBlockLineLayout.cpp:
929         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
930         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
931         (WebCore::constructBidiRunsForLine): Deleted.
932         (WebCore::pushShapeContentOverflowBelowTheContentBox): Deleted.
933         (WebCore::RenderBlockFlow::updateShapeAndSegmentsForCurrentLine): Deleted.
934         (WebCore::RenderBlockFlow::updateShapeAndSegmentsForCurrentLineInFlowThread): Deleted.
935         (WebCore::adjustLogicalLineTop): Deleted.
936         (WebCore::RenderBlockFlow::adjustLogicalLineTopAndLogicalHeightIfNeeded): Deleted.
937         * rendering/RenderDeprecatedFlexibleBox.cpp:
938         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
939         * rendering/RenderElement.cpp:
940         (WebCore::RenderElement::~RenderElement):
941         (WebCore::RenderElement::initializeStyle):
942         (WebCore::RenderElement::setStyle):
943         * rendering/RenderFlexibleBox.cpp:
944         (WebCore::RenderFlexibleBox::layoutBlock):
945         * rendering/RenderGrid.cpp:
946         (WebCore::RenderGrid::layoutBlock):
947         * rendering/RenderNamedFlowFragment.cpp:
948         (WebCore::RenderNamedFlowFragment::createStyle):
949         * rendering/RenderView.h:
950         * rendering/SimpleLineLayout.cpp:
951         (WebCore::SimpleLineLayout::canUseFor):
952         * rendering/line/BreakingContextInlineHeaders.h:
953         (WebCore::BreakingContext::handleText):
954         (WebCore::BreakingContext::handleEndOfLine):
955         (WebCore::updateSegmentsForShapes): Deleted.
956         * rendering/line/LineBreaker.cpp:
957         (WebCore::LineBreaker::nextLineBreak):
958         * rendering/line/LineWidth.cpp:
959         (WebCore::LineWidth::LineWidth):
960         (WebCore::LineWidth::updateAvailableWidth):
961         (WebCore::LineWidth::wrapNextToShapeOutside):
962         (WebCore::LineWidth::fitBelowFloats):
963         (WebCore::LineWidth::updateLineSegment): Deleted.
964         (WebCore::LineWidth::updateCurrentShapeSegment): Deleted.
965         * rendering/line/LineWidth.h:
966         * rendering/shapes/ShapeInsideInfo.cpp: Removed.
967         * rendering/shapes/ShapeInsideInfo.h: Removed.
968         * rendering/style/RenderStyle.cpp:
969         (WebCore::RenderStyle::changeRequiresLayout):
970         * rendering/style/RenderStyle.h:
971         * rendering/style/StyleRareNonInheritedData.cpp:
972         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
973         (WebCore::StyleRareNonInheritedData::operator==):
974         * rendering/style/StyleRareNonInheritedData.h:
975
976 2014-03-25  Brent Fulgham  <bfulgham@apple.com>
977
978         Avoid duplicate size checks when creating empty image
979         https://bugs.webkit.org/show_bug.cgi?id=130730
980
981         Reviewed by Dean Jackson.
982
983         Merged from Blink (patch by ch.dumez@samsung.com):
984         https://chromium.googlesource.com/chromium/blink/+/4861a71bc1f284fc97417f405ab7d08dc6947b88
985         http://crbug.com/190633011
986
987         * html/canvas/CanvasRenderingContext2D.cpp:
988         (WebCore::createEmptyImageData): Don't perform overflow calculation twice.
989
990 2014-03-26  Sergio Villar Senin  <svillar@igalia.com>
991
992         [CSS Grid Layout] getComputedStyle() must return the specified value for positioning properties
993         https://bugs.webkit.org/show_bug.cgi?id=130010
994
995         Reviewed by Darin Adler.
996
997         According to the specs
998         http://dev.w3.org/csswg/css-grid/#property-index and also to
999         http://lists.w3.org/Archives/Public/www-style/2014Mar/0162.html
1000         the function getComputedStyle() must return the specified values
1001         for positioning properties, i.e, grid-{columns|rows}-{start|end}.
1002
1003         We were in some cases, adjusting the style in the StyleResolver
1004         (for example with two opposing spans) something that is now done
1005         in the RenderGrid because we cannot alter the original style.
1006
1007         The code moved to the renderer became more self explanatory and it
1008         now supports named grid areas with names ending in "-start" and
1009         "-end".
1010
1011         Test: fast/css-grid-layout/named-grid-lines-with-named-grid-areas-get-set.html
1012
1013         * css/StyleResolver.cpp:
1014         (WebCore::StyleResolver::adjustRenderStyle):
1015         (WebCore::gridLineDefinedBeforeGridArea): Deleted.
1016         (WebCore::StyleResolver::adjustNamedGridItemPosition): Deleted.
1017         (WebCore::StyleResolver::adjustGridItemPosition): Deleted.
1018         * css/StyleResolver.h:
1019         * rendering/RenderGrid.cpp:
1020         (WebCore::isColumnSide):
1021         (WebCore::RenderGrid::explicitGridSizeForSide):
1022         (WebCore::gridLineDefinedBeforeGridArea):
1023         (WebCore::setNamedLinePositionIfDefinedBeforeArea):
1024         (WebCore::RenderGrid::adjustNamedGridItemPosition):
1025         (WebCore::RenderGrid::adjustGridPositionsFromStyle):
1026         (WebCore::RenderGrid::resolveGridPositionsFromStyle):
1027         (WebCore::RenderGrid::resolveNamedGridLinePositionFromStyle):
1028         (WebCore::RenderGrid::resolveNamedGridLinePositionAgainstOppositePosition):
1029         * rendering/RenderGrid.h:
1030         * rendering/style/GridPosition.h:
1031         (WebCore::GridPosition::setAutoPosition): New helper function.
1032
1033 2014-03-26  Simon Fraser  <simon.fraser@apple.com>
1034
1035         Fix the iOS build.
1036
1037         * WebCore.exp.in:
1038
1039 2014-03-26  Tim Horton  <timothy_horton@apple.com>
1040
1041         [iOS WebKit2] Flush all surfaces after painting into all of them, instead of after painting into each one
1042         https://bugs.webkit.org/show_bug.cgi?id=130768
1043         <rdar://problem/16421471>
1044
1045         Reviewed by Simon Fraser.
1046
1047         * platform/graphics/cocoa/IOSurface.h:
1048         Add a non-ensuring platformContext() getter.
1049
1050 2014-03-26  James Craig  <jcraig@apple.com>
1051
1052         Web Inspector: AXI: crash when inspecting "bar" text node in getAccessibilityPropertiesForNode layout test
1053         https://bugs.webkit.org/show_bug.cgi?id=130290
1054
1055         Reviewed by Timothy Hatcher.
1056
1057         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
1058
1059         Fixing regression from r165590. http://webkit.org/b/129779
1060         Verify isElementNode to avoid calling toElement on document or text nodes.
1061
1062         * inspector/InspectorDOMAgent.cpp:
1063         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
1064
1065 2014-03-25  Sergio Villar Senin  <svillar@igalia.com>
1066
1067         Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T> in editing/
1068         https://bugs.webkit.org/show_bug.cgi?id=130722
1069
1070         Reviewed by Antti Koivisto.
1071
1072         * editing/AlternativeTextController.cpp:
1073         (WebCore::markerTypesForAutocorrection):
1074         (WebCore::markerTypesForReplacement):
1075         (WebCore::markerTypesForAppliedDictationAlternative):
1076         * editing/EditingStyle.cpp:
1077         (WebCore::htmlElementEquivalents):
1078         (WebCore::htmlAttributeEquivalents):
1079         * editing/FormatBlockCommand.cpp:
1080         (WebCore::isElementForFormatBlock):
1081         * editing/RemoveFormatCommand.cpp:
1082         (WebCore::isElementForRemoveFormatCommand):
1083         * editing/ReplaceSelectionCommand.cpp:
1084         (WebCore::isProhibitedParagraphChild):
1085         * editing/atk/FrameSelectionAtk.cpp:
1086         (WebCore::maybeEmitTextFocusChange):
1087
1088 2014-03-25  Simon Fraser  <simon.fraser@apple.com>
1089
1090         Add a new type of scrolling tree node for overflow scrolling
1091         https://bugs.webkit.org/show_bug.cgi?id=130763
1092
1093         Reviewed by Tim Horton.
1094
1095         Prepare for overflow scrolling via the scrolling tree by adding
1096         a new scrolling node type for overflow:scroll nodes. Mostly
1097         this is a new ScrollingNodeType that gets mapped to the same
1098         scrolling state nodes and scrolling nodes, but iOS creates
1099         state and scrolling nodes specific to overflow:scroll.
1100         
1101         Change the type checking on nodes to use virtual functions instead
1102         of just checking the node type, to allow the macros to work with
1103         the new scrolling node type.
1104
1105         * WebCore.exp.in:
1106         * page/scrolling/AsyncScrollingCoordinator.cpp:
1107         (WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):
1108         * page/scrolling/ScrollingCoordinator.h:
1109         * page/scrolling/ScrollingStateFixedNode.h:
1110         * page/scrolling/ScrollingStateNode.h:
1111         (WebCore::ScrollingStateNode::isFixedNode):
1112         (WebCore::ScrollingStateNode::isStickyNode):
1113         (WebCore::ScrollingStateNode::isScrollingNode):
1114         * page/scrolling/ScrollingStateScrollingNode.cpp:
1115         (WebCore::ScrollingStateScrollingNode::create):
1116         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
1117         * page/scrolling/ScrollingStateScrollingNode.h:
1118         * page/scrolling/ScrollingStateStickyNode.h:
1119         * page/scrolling/ScrollingStateTree.cpp:
1120         (WebCore::ScrollingStateTree::attachNode):
1121         * page/scrolling/ScrollingTree.cpp:
1122         (WebCore::ScrollingTree::viewportChangedViaDelegatedScrolling):
1123         (WebCore::ScrollingTree::updateTreeFromStateNode):
1124         * page/scrolling/ScrollingTreeNode.h:
1125         (WebCore::ScrollingTreeNode::isFixedNode):
1126         (WebCore::ScrollingTreeNode::isStickyNode):
1127         (WebCore::ScrollingTreeNode::isScrollingNode):
1128         * page/scrolling/ScrollingTreeScrollingNode.cpp:
1129         (WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode):
1130         * page/scrolling/ScrollingTreeScrollingNode.h:
1131         * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
1132         (WebCore::ScrollingCoordinatorIOS::createScrollingTreeNode):
1133         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h:
1134         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm:
1135         (WebCore::ScrollingTreeScrollingNodeIOS::create):
1136         (WebCore::ScrollingTreeScrollingNodeIOS::ScrollingTreeScrollingNodeIOS):
1137         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1138         (WebCore::ScrollingCoordinatorMac::createScrollingTreeNode):
1139         * page/scrolling/mac/ScrollingTreeFixedNode.h:
1140         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
1141         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
1142         (WebCore::ScrollingTreeScrollingNodeMac::create):
1143         (WebCore::ScrollingTreeScrollingNodeMac::ScrollingTreeScrollingNodeMac):
1144         * page/scrolling/mac/ScrollingTreeStickyNode.h:
1145         * rendering/RenderLayerCompositor.cpp:
1146         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
1147
1148 2014-03-26  Krzysztof Czech  <k.czech@samsung.com>
1149
1150         [ATK] Utilize new AtkValue interface coming in ATK 2.11.92
1151         https://bugs.webkit.org/show_bug.cgi?id=130575
1152
1153         Reviewed by Mario Sanchez Prada.
1154
1155         ATK 2.11.92 introduces some new API and deprecates an old one.
1156         Adjust current implementation to meet requirements of the new API.
1157
1158         No new tests. Covered by existing ones.
1159
1160         * accessibility/atk/AXObjectCacheAtk.cpp:
1161         (WebCore::AXObjectCache::postPlatformNotification):
1162         * accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
1163         (webkitAccessibleSetNewValue):
1164         (webkitAccessibleGetIncrementValue):
1165         (webkitAccessibleGetValueAndText):
1166         (webkitAccessibleGetIncrement):
1167         (webkitAccessibleSetValue):
1168         (webkitAccessibleGetRange):
1169         (webkitAccessibleValueSetCurrentValue):
1170         (webkitAccessibleValueGetMinimumIncrement):
1171         (webkitAccessibleValueInterfaceInit):
1172
1173 2014-03-26  Zan Dobersek  <zdobersek@igalia.com>
1174
1175         Unreviewed. Removing the remaining Automake cruft.
1176
1177         * GNUmakefile.list.am: Removed.
1178
1179 2014-03-25  Pratik Solanki  <psolanki@apple.com>
1180
1181         iOS build fix. Add missing semicolon.
1182
1183         * editing/cocoa/HTMLConverter.mm:
1184         (HTMLConverter::_addAttachmentForElement):
1185
1186 2014-03-25  Sam Weinig  <sam@webkit.org>
1187
1188         Speculative iOS build fix.
1189
1190         * editing/cocoa/HTMLConverter.mm:
1191         (HTMLConverter::_addAttachmentForElement):
1192
1193 2014-03-25  Jer Noble  <jer.noble@apple.com>
1194
1195         [MSE] Duplicate 'seeked' events.
1196         https://bugs.webkit.org/show_bug.cgi?id=130754
1197
1198         Reviewed by Eric Carlson.
1199
1200         Test: media/media-source/media-source-duplicate-seeked.html
1201
1202         During certain seek operations, HTMLMediaElement::finishSeek() can be called re-entrantly due to
1203         the ready state changing as a result of MediaSource::monitorSourceBuffers(). Move this call to the
1204         end of finishSeek() after m_seeking has been cleared.
1205
1206         * html/HTMLMediaElement.cpp:
1207         (WebCore::HTMLMediaElement::parseAttribute):
1208
1209 2014-03-25  James Craig  <jcraig@apple.com>
1210
1211         Web Inspector: AXI: add support for aria-activedescendant and reconcile UI/testing with parentNode
1212         https://bugs.webkit.org/show_bug.cgi?id=130712
1213
1214         Reviewed by Timothy Hatcher.
1215
1216         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
1217
1218         Support for @aria-activedescendant; code reuse changes w/ parentNode and activeDescendantNode.
1219
1220         * inspector/InspectorDOMAgent.cpp:
1221         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
1222         * inspector/protocol/DOM.json:
1223
1224 2014-03-25  Sanghyup Lee  <sh53.lee@samsung.com>
1225
1226         When the mouse is upped after dragged out of shadowDOM, it should lose :active.
1227         https://bugs.webkit.org/show_bug.cgi?id=130660
1228
1229         Reviewed by Darin Adler.
1230
1231         This caused a regression after r165037.
1232         When we have to clear :active style of shadow DOM, we should clear host's style.
1233         This patch replaces parentElement() by parentOrShadowHostElement().
1234
1235         * dom/Document.cpp:
1236         (WebCore::Document::updateHoverActiveState):
1237
1238 2014-03-25  Eric Carlson  <eric.carlson@apple.com>
1239
1240         [Mac] Always retry a failed MediaDocument as a PluginDocument
1241         https://bugs.webkit.org/show_bug.cgi?id=130742
1242
1243         Reviewed by Jer Noble.
1244
1245         * html/HTMLMediaElement.cpp:
1246         (WebCore::HTMLMediaElement::mediaLoadingFailedFatally): If the element is in a media document,
1247             tell it that loading failed so it can retry as a plug-in.
1248
1249 2014-03-25  Ryosuke Niwa  <rniwa@webkit.org>
1250
1251         Replace HTMLConverter::_stringForNode by propertyValueForNode
1252         https://bugs.webkit.org/show_bug.cgi?id=130711
1253
1254         Reviewed by Sam Weinig.
1255
1256         Replaced all calls to HTMLConverter::_stringForNode by that to propertyValueForNode.
1257
1258         * editing/cocoa/HTMLConverter.mm:
1259         (HTMLConverter::_computedAttributesForElement):
1260         (HTMLConverter::_addAttachmentForElement):
1261         (HTMLConverter::_enterElement):
1262         (HTMLConverter::_addTableForElement):
1263         (HTMLConverter::_addTableCellForElement):
1264         (HTMLConverter::_processElement):
1265         (HTMLConverter::_exitElement):
1266         (HTMLConverter::_processText):
1267         (HTMLConverter::_traverseNode):
1268         (HTMLConverter::_traverseFooterNode):
1269         (HTMLConverter::_stringForNode): Deleted.
1270
1271 2014-03-25  Pratik Solanki  <psolanki@apple.com>
1272
1273         Attempt to fix iOS build after r166261.
1274
1275         * WebCore.xcodeproj/project.pbxproj: Make SystemSleepListener.h a private header.
1276
1277 2014-03-21  Jer Noble  <jer.noble@apple.com>
1278
1279         [iOS] Enable caption support in full screen.
1280         https://bugs.webkit.org/show_bug.cgi?id=130603
1281
1282         Reviewed by Eric Carlson.
1283
1284         Add TextTrackRepresentation support to MediaPlayerPrivateAVFoundationObjC.
1285
1286         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1287         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1288         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer): Add the m_textTrackRepresenationLayer if present.
1289         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer): Ditto.
1290         (WebCore::MediaPlayerPrivateAVFoundationObjC::requiresTextTrackRepresentation): True, if a m_videoFullscreenLayer is present.
1291         (WebCore::MediaPlayerPrivateAVFoundationObjC::setTextTrackRepresentation): Remove the old, and add the new m_textTrackRepresenationLayer.
1292
1293         Make the text track container a stacking context for painting purposes.
1294         * Modules/mediacontrols/mediaControlsiOS.css:
1295         (video::-webkit-media-text-track-container):
1296
1297 2014-03-25  Brian Burg  <bburg@apple.com>
1298
1299         Web Replay: resource unique identifiers should be unique-per-frame, not globally
1300         https://bugs.webkit.org/show_bug.cgi?id=130632
1301
1302         Reviewed by Timothy Hatcher.
1303
1304         For replay purposes, we want to deterministically assign resource load identifiers
1305         to resource loaders, provided that the resource loaders are created in the same
1306         order.
1307
1308         To do this, we convert unique identifiers from being globally-unique to being
1309         frame-unique. When a new frame is being loaded, unique identifiers for
1310         subresources of that frame begin counting from 1.
1311
1312         No new tests. Identifier invariants are exercised by existing assertions and tests.
1313
1314         * loader/ProgressTracker.cpp:
1315         (WebCore::ProgressTracker::ProgressTracker):
1316         (WebCore::ProgressTracker::reset):
1317         (WebCore::ProgressTracker::createUniqueIdentifier):
1318         * loader/ProgressTracker.h:
1319
1320 2014-03-25  Jer Noble  <jer.noble@apple.com>
1321
1322         [Mac] Pause the media element during system sleep.
1323         https://bugs.webkit.org/show_bug.cgi?id=130718
1324
1325         Reviewed by Eric Carlson.
1326
1327         Test: media/video-system-sleep.html
1328
1329         Relying on the platform media system to pause and restart playback during
1330         system sleep can cause problems on some platforms, especially where hardware
1331         decoders are concerned. Rather than implicitly pausing the media during
1332         system sleep, explicitly pause the media before sleeping and resume (if
1333         appropriate) upon waking.
1334
1335         Add a new class to be used for system sleep notifications:
1336         * platform/SystemSleepListener.cpp: Added.
1337         (WebCore::SystemSleepListener::create):
1338         (WebCore::SystemSleepListener::SystemSleepListener):
1339         * platform/SystemSleepListener.h: Added.
1340         (WebCore::SystemSleepListener::Client::~Client):
1341         (WebCore::SystemSleepListener::~SystemSleepListener):
1342         (WebCore::SystemSleepListener::client):
1343
1344         Add a Mac-specific implementation:
1345         * platform/mac/SystemSleepListenerMac.h: Added.
1346         * platform/mac/SystemSleepListenerMac.mm: Added.
1347         (WebCore::SystemSleepListener::create):
1348         (WebCore::SystemSleepListenerMac::SystemSleepListenerMac):
1349         (WebCore::SystemSleepListenerMac::~SystemSleepListenerMac):
1350
1351         Listen for system sleep notifications in MediaSessionManager:
1352         * platform/audio/MediaSessionManager.cpp:
1353         (WebCore::MediaSessionManager::MediaSessionManager):
1354         (WebCore::MediaSessionManager::systemWillSleep):
1355         (WebCore::MediaSessionManager::systemDidWake):
1356         * platform/audio/MediaSessionManager.h:
1357
1358         Drive-by fix; notify the MediaSession that playback will begin
1359         due to autoplay, but do not begin autoplaying if the session
1360         is already interrupted:
1361         * html/HTMLMediaElement.cpp:
1362         (WebCore::HTMLMediaElement::parseAttribute):
1363
1364         Add new files to project:
1365         * WebCore.vcxproj/WebCore.vcxproj:
1366         * WebCore.xcodeproj/project.pbxproj:
1367         * CMakeLists.txt:
1368         * GNUmakefile.list.am:
1369
1370 2014-03-25  Radu Stavila  <stavila@adobe.com>
1371
1372         [CSS Regions] The background of children of scrollable elements flowed into regions is not properly scrolled
1373         https://bugs.webkit.org/show_bug.cgi?id=130574
1374
1375         Reviewed by David Hyatt.
1376
1377         When computing the clip rect for painting the box decorations, the scrolled content offset
1378         must be computed by going up the containing block tree, up to the region.
1379
1380         Tests: fast/regions/scrollable-region-scrollable-absolute-content-background.html
1381                fast/regions/scrollable-region-scrollable-content-background.html
1382
1383         * rendering/RenderNamedFlowThread.cpp:
1384         (WebCore::RenderNamedFlowThread::decorationsClipRectForBoxInNamedFlowFragment):
1385
1386 2014-03-25  Joseph Pecoraro  <pecoraro@apple.com>
1387
1388         [iOS] Inspector View Indication Support
1389         https://bugs.webkit.org/show_bug.cgi?id=130709
1390
1391         Reviewed by Simon Fraser.
1392
1393         * inspector/InspectorClient.h:
1394         (WebCore::InspectorClient::showInspectorIndication):
1395         (WebCore::InspectorClient::hideInspectorIndication):
1396         * inspector/InspectorController.cpp:
1397         (WebCore::InspectorController::setIndicating):
1398         Rename indicate/hideIndication to show/hide names.
1399
1400 2014-03-25  Brent Fulgham  <bfulgham@apple.com>
1401
1402         Unreviewed build fix. Typo on checkin.
1403
1404         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1405         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Left an unmatched open bracket.
1406
1407 2014-03-25  Jer Noble  <jer.noble@apple.com>
1408
1409         Even further unreviewed build fix after r166247. Unprotect the implementation of HTMLMediaElement::shouldDisableSleep().
1410
1411         * html/HTMLMediaElement.cpp:
1412         (WebCore::HTMLMediaElement::parseAttribute):
1413
1414 2014-03-25  Jer Noble  <jer.noble@apple.com>
1415
1416         Further unreviewed build fix after r166247. Add DisplaySleepDisabler to the windows project file and
1417         move the definition of DisplaySleepDisabler's constructor and destructor into the cpp file.
1418
1419         * WebCore.vcxproj/WebCore.vcxproj:
1420         * platform/DisplaySleepDisabler.cpp:
1421         (WebCore::DisplaySleepDisabler::DisplaySleepDisabler):
1422         (WebCore::DisplaySleepDisabler::~DisplaySleepDisabler):
1423         * platform/DisplaySleepDisabler.h:
1424
1425 2014-03-25  Jer Noble  <jer.noble@apple.com>
1426
1427         Unreviewed build fix after r166247. Un-platform-protect the declaration of HTMLMediaElement::shouldDisableSleep()
1428         and make WebVideoFullscreenController's _displaySleepDisabler a std::unique_ptr.
1429
1430         * html/HTMLMediaElement.h:
1431         * platform/mac/WebVideoFullscreenController.h:
1432
1433 2014-03-25  Brent Fulgham  <bfulgham@apple.com>
1434
1435         [iOS] Pass additional options to AVFoundation during playback.
1436         https://bugs.webkit.org/show_bug.cgi?id=130624
1437
1438         Reviewed by Eric Carlson.
1439
1440         * html/HTMLMediaElement.cpp:
1441         (WebCore::HTMLMediaElement::doesHaveAttribute): Return attribute value if the user
1442         passes a pointer to fill in.
1443         * html/HTMLMediaElement.h:
1444         * platform/graphics/MediaPlayer.cpp:
1445         (WebCore::MediaPlayer::doesHaveAttribute):
1446         * platform/graphics/MediaPlayer.h:
1447         (WebCore::MediaPlayerClient::doesHaveAttribute):
1448         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1449         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Pass additional
1450         option if supplied by user.
1451
1452 2014-03-25  Michael Saboff  <msaboff@apple.com>
1453
1454         Unreviewed, rolling out r166070.
1455
1456         Rollout r166070 due to 2% performance loss in page load times
1457
1458         Reverted changeset:
1459
1460         "Change CodeGeneratorJS.pm special cases for "DOMWindow" to be
1461         general purpose"
1462         https://bugs.webkit.org/show_bug.cgi?id=130553
1463         http://trac.webkit.org/changeset/166070
1464
1465 2014-03-25  Michael Saboff  <msaboff@apple.com>
1466
1467         Unreviewed, rolling out r166126.
1468
1469         Rollout r166126 in prepartion to roll out prerequisite r166070
1470
1471         Reverted changeset:
1472
1473         "toThis() on a JSWorkerGlobalScope should return a JSProxy and
1474         not undefined"
1475         https://bugs.webkit.org/show_bug.cgi?id=130554
1476         http://trac.webkit.org/changeset/166126
1477
1478 2014-03-25  Jer Noble  <jer.noble@apple.com>
1479
1480         [iOS] Playing video does not disable display sleep.
1481         https://bugs.webkit.org/show_bug.cgi?id=130729
1482
1483         Reviewed by Eric Carlson.
1484
1485         DisplaySleepDisabler was broken by r161589, which replaced the iOS implementation with
1486         an empty one. Make a platform independent version with a Cocoa-platform subclass. Update
1487         the APIs to non-deprecated ones.
1488
1489         * platform/DisplaySleepDisabler.cpp: Added.
1490         (WebCore::DisplaySleepDisabler::create):
1491         * platform/DisplaySleepDisabler.h: Added.
1492         (WebCore::DisplaySleepDisabler::~DisplaySleepDisabler):
1493         (WebCore::DisplaySleepDisabler::DisplaySleepDisabler):
1494         * platform/cocoa/DisplaySleepDisablerCocoa.cpp: Renamed from Source/WebCore/platform/mac/DisplaySleepDisabler.cpp.
1495         (WebCore::DisplaySleepDisabler::create):
1496         (WebCore::DisplaySleepDisablerCocoa::DisplaySleepDisablerCocoa):
1497         (WebCore::DisplaySleepDisablerCocoa::~DisplaySleepDisablerCocoa):
1498         * platform/cocoa/DisplaySleepDisablerCocoa.h: Renamed from Source/WebCore/platform/mac/DisplaySleepDisabler.h.
1499
1500         Update m_sleepDisabler to be a std::unique_ptr, and unprotect the definition of methods which use it.
1501         * html/HTMLMediaElement.cpp:
1502         (WebCore::HTMLMediaElement::updateSleepDisabling):
1503         (WebCore::HTMLMediaElement::shouldDisableSleep):
1504         * html/HTMLMediaElement.h:
1505
1506         Add the new and renamed files to the project:
1507         * CMakeLists.txt:
1508         * GNUmakefile.list.am:
1509         * WebCore.xcodeproj/project.pbxproj:
1510
1511 2014-03-25  Dirk Schulze  <krit@webkit.org>
1512
1513         Implement ImageData constructors and WebWorkers exposure
1514         https://bugs.webkit.org/show_bug.cgi?id=130668
1515
1516         Reviewed by Dean Jackson.
1517
1518         Add new constructors for ImageData.
1519
1520         http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#pixel-manipulation
1521
1522         Test: fast/canvas/canvas-imageData.html
1523
1524         * html/ImageData.cpp: 
1525         (WebCore::ImageData::create):
1526         * html/ImageData.h:
1527         * html/ImageData.idl:
1528
1529 2014-03-25  Myles C. Maxfield  <mmaxfield@apple.com>
1530
1531         InlineIterator position (unsigned int) variable can wrap around
1532         https://bugs.webkit.org/show_bug.cgi?id=130540
1533
1534         Reviewed by Simon Fraser.
1535
1536         We trigger an ASSERT that occurs when we are ignoring spaces (to collapse them
1537         into a single whitespace mark) but then encounter a line break. Because we don't ignore
1538         the first space (but do ignore subsequent spaces), when we hit a newline in an RTL context
1539         we want to ignore that first space as well (so as not to push the text away from the right
1540         edge). We do this by decrementing the InlineIterator pointing to this first space, so all
1541         the spaces get ignored. However, if that space is the first character in a Text node, the
1542         decrement will try to go past the beginning of the node, and trigger an ASSERT.
1543
1544         This design is not great. At some point we should rework it to more elegantly handle
1545         collapsing whitespace in both RTL and LTR writing modes.
1546
1547         This patch adds an ASSERT earlier in this codepath to catch potential problems earlier.
1548         It also pulls our sentinel value out into a separate boolean to make it more clear what is
1549         going on.
1550
1551         Test: fast/text/whitespace-only-text-in-rtl.html
1552
1553         * rendering/InlineIterator.h:
1554         (WebCore::InlineIterator::moveTo): Use the set***() calls
1555         (WebCore::InlineIterator::setOffset): ASSERT early that our math hasn't wrapped
1556         * rendering/RenderBlockLineLayout.cpp:
1557         (WebCore::RenderBlockFlow::appendRunsForObject): Use new boolean value
1558         * rendering/line/BreakingContextInlineHeaders.h:
1559         (WebCore::BreakingContext::handleText): Guard against wraps
1560         (WebCore::checkMidpoints): Use new boolean value
1561         * rendering/line/TrailingObjects.cpp:
1562         (WebCore::TrailingObjects::updateMidpointsForTrailingBoxes): Use new boolean value
1563
1564 2014-03-25  Martin Robinson  <mrobinson@igalia.com>
1565
1566         [GTK] Remove the autotools build
1567         https://bugs.webkit.org/show_bug.cgi?id=130717
1568
1569         Reviewed by Anders Carlsson.
1570
1571         * GNUmakefile.am: Removed.
1572         * bindings/gobject/GNUmakefile.am: Removed.
1573         * config.h: Removed references to autotools configure file.
1574
1575 2014-03-24  Brent Fulgham  <bfulgham@apple.com>
1576
1577         Prevent 'removetrack' events from firing when all inband text tracks are removed.
1578         https://bugs.webkit.org/show_bug.cgi?id=130704
1579
1580         Reviewed by Eric Carlson.
1581
1582         Test: media/track/track-remove-track.html
1583
1584         Based on the Blink change (patch by acolwell@chromium.org):
1585         https://codereview.chromium.org/177243018/
1586
1587         * html/HTMLMediaElement.cpp:
1588         (WebCore::HTMLMediaElement::prepareForLoad): Reorder steps to match W3C specification.
1589         (WebCore::HTMLMediaElement::noneSupported): Forget tracks as required by specification.
1590         (WebCore::HTMLMediaElement::mediaLoadingFailed): Forget tracks as required by specification.
1591         (WebCore::HTMLMediaElement::removeTextTrack): Only request the 'removetracks' event if
1592         requested by caller.
1593         (WebCore::HTMLMediaElement::removeAllInbandTracks): Renamed to 'forgetResourceSpecificTracks'
1594         (WebCore::HTMLMediaElement::noneSupported): Specify that we want the 'removetracks' event
1595         fired for this use case.
1596         (WebCore::HTMLMediaElement::prepareForLoad): Switch to new 'forgetResourceSpecificTracks' name.
1597         * html/HTMLMediaElement.h:
1598         * html/track/TextTrackList.cpp:
1599         (TextTrackList::remove): Only fire the 'removetrack' event if the caller requests it.
1600         * html/track/TextTrackList.h: Add default argument to fire the 'removetrack' event
1601         when removing a track.
1602         * html/track/TrackListBase.cpp:
1603         (TrackListBase::remove): Only fire the 'removetrack' event if the caller requests it.
1604         * html/track/TrackListBase.h: Add default argument to fire the 'removetrack' event.
1605
1606 2014-03-25  David Kilzer  <ddkilzer@apple.com>
1607
1608         Hold a reference to firstSuccessfulSubmitButton in HTMLFormElement::submit
1609         <http://webkit.org/b/130713>
1610         <rdar://problem/15661876>
1611
1612         Reviewed by Darin Adler.
1613
1614         Merged from Blink (patch by Ian Beer):
1615         http://crbug.com/303657
1616         https://src.chromium.org/viewvc/blink?view=rev&revision=158938
1617
1618         Test: fast/forms/form-submission-crash-successful-submit-button.html
1619
1620         * html/HTMLFormElement.cpp:
1621         (WebCore::HTMLFormElement::submit):
1622
1623 2014-03-25  Gabor Rapcsanyi  <rgabor@webkit.org>
1624
1625         [ARM64] GNU assembler fails in TransformationMatrix::multiply
1626         https://bugs.webkit.org/show_bug.cgi?id=130454
1627
1628         Reviewed by Zoltan Herczeg.
1629
1630         Change the NEON intstructions to the proper style.
1631
1632         * platform/graphics/transforms/TransformationMatrix.cpp:
1633         (WebCore::TransformationMatrix::multiply):
1634
1635 2014-03-20  Sergio Villar Senin  <svillar@igalia.com>
1636
1637         [CSS Grid Layout] Vertical rectangles not considered as valid grid areas
1638         https://bugs.webkit.org/show_bug.cgi?id=130513
1639
1640         Reviewed by Andreas Kling.
1641
1642         Grid areas sized as vertical rectangles were incorrectly
1643         considered as invalid by the parser. That's because the condition
1644         checking that each new row was adjacent to the previous one was
1645         using the first row of the currently parsed grid area instead of
1646         the last one.
1647
1648         Test: fast/css-grid-layout/grid-template-areas-get-set.html
1649
1650         * css/CSSParser.cpp:
1651         (WebCore::CSSParser::parseGridTemplateAreas):
1652
1653 2014-03-25  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1654
1655         [GTK] Volume slider shows below the panel with videos in certain cases
1656         https://bugs.webkit.org/show_bug.cgi?id=130608
1657
1658         Reviewed by Jer Noble.
1659
1660         We need to delay the moment we check if the volume slider shows up
1661         or down. If the video was not visible, the offsets were 0 and it
1662         was forced to be shown below the panel.
1663
1664         Test: media/video-initially-hidden-volume-slider-up.html
1665
1666         * Modules/mediacontrols/mediaControlsApple.js:
1667         (Controller.prototype.createControls): Moved volumebox pseudo from
1668         the subclass. The test checks for it and it would fail in Mac.
1669         * Modules/mediacontrols/mediaControlsGtk.js:
1670         (ControllerGtk.prototype.createControls): Moved volumebox pseudo
1671         to the superclass.
1672         (ControllerGtk.prototype.handleMuteButtonMouseOver): Check if
1673         volume slider should show up or down.
1674         (ControllerGtk.prototype.updateReadyState): Removed check for
1675         volume slider direction.
1676
1677 2014-03-24  Brent Fulgham  <bfulgham@apple.com>
1678
1679         [Win] Enable WebVTT Regions on Windows.
1680         https://bugs.webkit.org/show_bug.cgi?id=130680
1681
1682         Reviewed by Eric Carlson.
1683
1684         * DerivedSources.cpp: Add new build components.
1685         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
1686         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1687
1688 2014-03-24  Simon Fraser  <simon.fraser@apple.com>
1689
1690         Remove some unnecessary includes from PlatformCALayerClient.h
1691         https://bugs.webkit.org/show_bug.cgi?id=130703
1692
1693         Reviewed by Andreas Kling.
1694         
1695         No need for all these #includes.
1696
1697         * platform/graphics/ca/PlatformCALayerClient.h:
1698
1699 2014-03-24  Adenilson Cavalcanti  <cavalcantii@gmail.com>
1700
1701         [core] FEGaussianBlur: use IntSize to simplify member function interface
1702         https://bugs.webkit.org/show_bug.cgi?id=130695
1703
1704         Reviewed by Dean Jackson.
1705
1706         By returning an IntSize to store the calculated kernel size values
1707         it is possible to have less function parameters. This patch also
1708         streamlines a bit the code in calculateUnscaledKernelSize.
1709
1710         No new tests, no change in behavior.
1711
1712         * platform/graphics/filters/FEDropShadow.cpp:
1713         (WebCore::FEDropShadow::determineAbsolutePaintRect):
1714         * platform/graphics/filters/FEGaussianBlur.cpp:
1715         (WebCore::FEGaussianBlur::calculateUnscaledKernelSize):
1716         (WebCore::FEGaussianBlur::calculateKernelSize):
1717         (WebCore::FEGaussianBlur::determineAbsolutePaintRect):
1718         (WebCore::FEGaussianBlur::platformApplySoftware):
1719         * platform/graphics/filters/FEGaussianBlur.h:
1720         (if): Deleted.
1721         * platform/graphics/filters/FilterOperations.cpp:
1722         (WebCore::outsetSizeForBlur):
1723
1724 2014-03-24  Brian Burg  <bburg@apple.com>
1725
1726         Web Replay: capture and replay keyboard events
1727         https://bugs.webkit.org/show_bug.cgi?id=130314
1728
1729         Reviewed by Joseph Pecoraro.
1730
1731         Upstream support for capturing and replaying non-IME keyboard input.
1732         This works similarly to mouse events. It introduces optional fields and
1733         macros to encode/decode them.
1734
1735         Test: ManualTests/inspector/replay-keyboard-events.html
1736
1737         * replay/ReplayInputDispatchMethods.cpp:
1738         (WebCore::HandleKeyPress::dispatch):
1739         * replay/SerializationMethods.cpp:
1740         (JSC::EncodingTraits<NondeterministicInputBase>::encodeValue):
1741         (JSC::EncodingTraits<NondeterministicInputBase>::decodeValue): Switch existing
1742         encode/decode calls to use the shortening macros.
1743         (JSC::EncodingTraits<KeypressCommand>::encodeValue): Added.
1744         (JSC::EncodingTraits<KeypressCommand>::decodeValue): Added.
1745         (JSC::PlatformKeyboardEventAppKit::PlatformKeyboardEventAppKit): Subclass
1746         PlatformKeyboardEvent so that we can set AppKit-specific members not
1747         initialized through the main constructors.
1748         (JSC::EncodingTraits<PlatformKeyboardEvent>::encodeValue): Added.
1749         (JSC::EncodingTraits<PlatformKeyboardEvent>::decodeValue): Added.
1750         * replay/SerializationMethods.h:
1751         * replay/UserInputBridge.cpp:
1752         (WebCore::UserInputBridge::UserInputBridge): initialize m_state inside a guard.
1753         (WebCore::UserInputBridge::handleKeyEvent): fill in the implementation.
1754         * replay/WebInputs.json:
1755
1756 2014-03-24  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1757
1758         Optimizing string construction for type error in JSNavigatorCustom.cpp
1759         https://bugs.webkit.org/show_bug.cgi?id=130683
1760
1761         Reviewed by Eric Carlson.
1762
1763         * bindings/js/JSNavigatorCustom.cpp:
1764         (WebCore::JSNavigator::webkitGetUserMedia):
1765
1766 2014-03-24  Beth Dakin  <bdakin@apple.com>
1767
1768         Legacy-style scrollbars constantly redraw after scrolling
1769         https://bugs.webkit.org/show_bug.cgi?id=130699
1770
1771         Reviewed by Simon Fraser.
1772
1773         The constant re-draw was happening because we were never calling [ScrollbarPainter 
1774         setUsePresentationValue:NO]. This is a silly bug where were should have been 
1775         looking at PlatformWheelEvent::momentumPhase() instead of 
1776         PlatformWheelEvent::phase()
1777
1778         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
1779         (WebCore::ScrollingTreeScrollingNodeMac::handleWheelEvent):
1780
1781 2014-03-24  Daniel Bates  <dabates@apple.com>
1782
1783         XSS Auditor doesn't block <script> injected before an existing <script>
1784         https://bugs.webkit.org/show_bug.cgi?id=130475
1785
1786         Merged from Blink (patch by Tom Sepez):
1787         https://src.chromium.org/viewvc/blink?view=rev&revision=169697
1788
1789         Tests: http/tests/security/xssAuditor/script-tag-expression-follows.html
1790                http/tests/security/xssAuditor/script-tag-near-start.html
1791
1792         * html/parser/XSSAuditor.cpp:
1793         (WebCore::startsHTMLCommentAt):
1794         (WebCore::startsSingleLineCommentAt):
1795         (WebCore::startsMultiLineCommentAt):
1796         (WebCore::startsOpeningScriptTagAt):
1797         (WebCore::XSSAuditor::decodedSnippetForJavaScript):
1798
1799 2014-03-24  Brent Fulgham  <bfulgham@apple.com>
1800
1801         Activate WebVTT Tests Once Merging is Complete
1802         https://bugs.webkit.org/show_bug.cgi?id=130420
1803
1804         Reviewed by Eric Carlson.
1805
1806         * Configurations/FeatureDefines.xcconfig: Turn on ENABLE(WEBVTT_REGIONS)
1807
1808 2014-03-24  Anders Carlsson  <andersca@apple.com>
1809
1810         Re-fix the build.
1811
1812         * WebCore.exp.in:
1813
1814 2014-03-24  Anders Carlsson  <andersca@apple.com>
1815
1816         Fix build.
1817
1818         * WebCore.exp.in:
1819         Move a CFNetwork only symbol inside the USE(CFNETWORK) section.
1820
1821 2014-03-24  Chris Fleizach  <cfleizach@apple.com>
1822
1823         Regression: AX: Don't expose role or notifications for invalid menus
1824         https://bugs.webkit.org/show_bug.cgi?id=129814
1825
1826         Reviewed by Mario Sanchez Prada.
1827
1828         If a role=menu has no menuitem children, it should not be a menu.
1829         This was a bit tricky to implement since we need to update the role after the children are created,
1830         but it means we have to be a bit more aggressive about when to updateChildren, so that the role
1831         is known to be valid.
1832
1833         Test: platform/mac/accessibility/invalid-menu-role-does-not-send-notification.html
1834
1835         * accessibility/AXObjectCache.cpp:
1836         (WebCore::AXObjectCache::notificationPostTimerFired):
1837         * accessibility/AccessibilityRenderObject.cpp:
1838         (WebCore::AccessibilityRenderObject::updateRoleAfterChildrenCreation):
1839         (WebCore::AccessibilityRenderObject::addChildren):
1840         * accessibility/AccessibilityRenderObject.h:
1841         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
1842         (-[WebAccessibilityObjectWrapperBase updateObjectBackingStore]):
1843
1844 2014-03-24  Andy Estes  <aestes@apple.com>
1845
1846         [iOS] Download support by CFURLDownloadRef under USE(CFNETWORK).
1847         https://bugs.webkit.org/show_bug.cgi?id=129322
1848
1849         Reviewed by Anders Carlsson.
1850
1851         * platform/network/ResourceHandle.h:
1852         * platform/network/cf/ResourceHandleCFNet.cpp:
1853         (WebCore::ResourceHandle::releaseConnectionForDownload): Changed to
1854         return a RetainPtr that adopts the connection's retain count.
1855
1856 2014-03-24  Enrica Casucci  <enrica@apple.com>
1857
1858         Update Hindi fallback font.
1859         https://bugs.webkit.org/show_bug.cgi?id=130690
1860         <rdar://problem/16391601>
1861
1862         Reviewed by Sam Weinig.
1863
1864         Using the new available font for Hindi in the fallback list.
1865
1866         * platform/graphics/ios/FontCacheIOS.mm:
1867         (WebCore::FontCache::systemFallbackForCharacters):
1868
1869 2014-03-24  Brent Fulgham  <bfulgham@apple.com>
1870
1871         Merge Minor WebVTT Cleanups from Blink
1872         https://bugs.webkit.org/show_bug.cgi?id=130681
1873
1874         Reviewed by Eric Carlson.
1875
1876         Merged from Blink (patch by philipj@opera.com):
1877         https://chromium.googlesource.com/chromium/blink/+/693eb5e2933dca0eab5bbd604e9f3406fe9fd1ab
1878         http://crbug.com/52593009
1879         https://chromium.googlesource.com/chromium/blink/+/40b3602feab34e9be829fd742b6ad6ded322a09f
1880         http://crbug.com/104243003
1881
1882         * html/track/TextTrack.cpp:
1883         (WebCore::TextTrack::setMode):
1884         * html/track/TextTrack.idl:
1885         * html/track/TextTrackCue.h:
1886         * html/track/VTTCue.cpp:
1887         (WebCore::VTTCue::VTTCue):
1888         * html/track/VTTCue.h:
1889
1890 2014-03-24  Commit Queue  <commit-queue@webkit.org>
1891
1892         Unreviewed, rolling out r166169.
1893         https://bugs.webkit.org/show_bug.cgi?id=130682
1894
1895         This patch broke tests on Apple Mavericks (Requested by fredw
1896         on #webkit).
1897
1898         Reverted changeset:
1899
1900         "Operator stretching: expose a math data API"
1901         https://bugs.webkit.org/show_bug.cgi?id=130572
1902         http://trac.webkit.org/changeset/166169
1903
1904 2014-03-24  Martin Hodovan  <mhodovan@inf.u-szeged.hu>
1905
1906         ENABLE(CSS_GRID_LAYOUT) guard for CSSGridLineNamesValue
1907         https://bugs.webkit.org/show_bug.cgi?id=130669
1908
1909         Reviewed by Sergio Villar Senin.
1910
1911         No new tests. No new functionality.
1912
1913         * css/CSSGridLineNamesValue.cpp:
1914         * css/CSSGridLineNamesValue.h:
1915
1916 2014-03-24  Chris Fleizach  <cfleizach@apple.com>
1917
1918         <hr> should expose AXRole/AXSubrole, etc
1919         https://bugs.webkit.org/show_bug.cgi?id=109015
1920
1921         Reviewed by Mario Sanchez Prada.
1922
1923         Expose the <hr> element to Mac and iOS through the accessibility interface.
1924
1925         Test: platform/mac/accessibility/hr-element.html
1926
1927         * English.lproj/Localizable.strings:
1928         * accessibility/AccessibilityNodeObject.cpp:
1929         (WebCore::AccessibilityNodeObject::isEnabled):
1930         * accessibility/AccessibilityObject.cpp:
1931         (WebCore::AccessibilityObject::computedRoleString):
1932         * accessibility/AccessibilityRenderObject.cpp:
1933         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
1934         * accessibility/atk/AccessibilityObjectAtk.cpp:
1935         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
1936         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1937         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
1938         (-[WebAccessibilityObjectWrapper accessibilityLabel]):
1939         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1940         (createAccessibilityRoleMap):
1941         (-[WebAccessibilityObjectWrapper subrole]):
1942         (-[WebAccessibilityObjectWrapper roleDescription]):
1943         * platform/LocalizedStrings.cpp:
1944         (WebCore::AXHorizontalRuleDescriptionText):
1945         * platform/LocalizedStrings.h:
1946
1947 2014-03-24  Antti Koivisto  <antti@apple.com>
1948
1949         Invalidate sibling text node style when needed instead of attaching synchronously
1950         https://bugs.webkit.org/show_bug.cgi?id=130590
1951
1952         Reviewed by Andreas Kling.
1953         
1954         Make things simpler.
1955
1956         * style/StyleResolveTree.cpp:
1957         (WebCore::Style::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):
1958         
1959             Just invalidate instead of calling attach directly.
1960             Rename to match.
1961
1962         (WebCore::Style::textRendererIsNeeded):
1963         (WebCore::Style::createTextRendererIfNeeded):
1964         
1965             Move all testing to textRendererIsNeeded.
1966
1967         (WebCore::Style::updateTextRendererAfterContentChange):
1968         
1969             Call resolveTextNode instead of re-implementing the same thing.
1970
1971         (WebCore::Style::resolveLocal):
1972         (WebCore::Style::resolveTextNode):
1973         
1974             Avoid unnecessary reattaching.
1975             Rename for consistency.
1976
1977         (WebCore::Style::resolveShadowTree):
1978         (WebCore::Style::resolveTree):
1979         
1980 2014-03-24  Zsolt Borbely  <zsborbely.u-szeged@partner.samsung.com>
1981
1982         Fix !ENABLE(VIDEO) build
1983         https://bugs.webkit.org/show_bug.cgi?id=130671
1984
1985         Reviewed by Eric Carlson.
1986
1987         Add missing ENABLE(VIDEO) guards because many functions use
1988         the newly guarded functions.
1989
1990         * testing/Internals.cpp:
1991         * testing/Internals.h:
1992         * testing/Internals.idl:
1993
1994 2014-03-24  Antti Koivisto  <antti@apple.com>
1995
1996         Text autosizing does not determine line count correctly for simple line layout
1997         https://bugs.webkit.org/show_bug.cgi?id=130673
1998
1999         Reviewed by Daniel Bates.
2000         
2001         We don't count lines correctly in simple line layout case.
2002
2003         * page/Frame.cpp:
2004         (WebCore::Frame::textAutosizingWidth):
2005         (WebCore::Frame::setTextAutosizingWidth):
2006         * page/ios/FrameIOS.mm:
2007         (WebCore::Frame::textAutosizingWidth): Deleted.
2008         (WebCore::Frame::setTextAutosizingWidth): Deleted.
2009         
2010             Move to Frame.cpp to make enabling on non-iOS build easier.
2011
2012         * rendering/RenderBlockFlow.cpp:
2013         (WebCore::RenderBlockFlow::lineCount):
2014         
2015             Handle simple line layout case.
2016
2017         (WebCore::RenderBlockFlow::lineCountForTextAutosizing):
2018             
2019             Call lineCount() if children are inline.
2020             Rename for clarity.
2021
2022         (WebCore::RenderBlockFlow::adjustComputedFontSizes):
2023         (WebCore::RenderBlockFlow::immediateLineCount): Deleted.
2024         * rendering/RenderBlockFlow.h:
2025
2026 2014-03-24  Frédéric Wang  <fred.wang@free.fr>
2027
2028         [regression] background colors do not apply to <mo> elements.
2029         https://bugs.webkit.org/show_bug.cgi?id=130470.
2030
2031         Test: mathml/presentation/tokenElements-background-color.html
2032
2033         * rendering/mathml/RenderMathMLOperator.cpp:
2034         (WebCore::RenderMathMLOperator::paint): always call the parent painting to draw the background.
2035         (WebCore::RenderMathMLOperator::paintChildren): move the special case for invisible operator here.
2036
2037 2014-03-24  Frédéric Wang  <fred.wang@free.fr>
2038
2039         Operator stretching: expose a math data API
2040         https://bugs.webkit.org/show_bug.cgi?id=130572
2041
2042         Reviewed by Chris Fleizach.
2043
2044         We expose a new SimpleFontData API to give access to the data from the
2045         OpenType MATH table using a font cache. The class OpenTypeMathData will
2046         be implemented in bug 130324. On Darwin platform, we also implement the
2047         missing FontPlatformData::openTypeTable function which will be necessary
2048         to load the OpenType MATH table. The changes are intended to be used
2049         for MathML operator stretching (bug 130322) so tests are not added yet.
2050
2051         * CMakeLists.txt: add new OpenTypeMathData files.
2052         * GNUmakefile.list.am: ditto.
2053         * WebCore.vcxproj/WebCore.vcxproj: ditto.
2054         * WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
2055         * WebCore.xcodeproj/project.pbxproj: ditto.
2056         * platform/graphics/FontCache.cpp: We add a FontCache::getMathData function to implement a cache for the math data.
2057         We make the math and vertical data share the same key for the cache.
2058         (WebCore::fontMathDataCacheInstance):
2059         (WebCore::FontCache::getMathData):
2060         (WebCore::fontVerticalDataCacheInstance):
2061         * platform/graphics/FontCache.h: We declare FontCache::getMathData and FontFileKey on all platforms.
2062         * platform/graphics/FontPlatformData.cpp:
2063         (WebCore::FontPlatformData::openTypeTable): We implement openTypeTable() on Darwin platform.
2064         * platform/graphics/FontPlatformData.h: We expose openTypeTable() on Darwin platform.
2065         * platform/graphics/SimpleFontData.cpp: We initialize m_mathData from the font cache.
2066         (WebCore::SimpleFontData::SimpleFontData):
2067         * platform/graphics/SimpleFontData.h: We expose a mathData() function to access the MATH data.
2068         * platform/graphics/opentype/OpenTypeMathData.cpp: Added. This is a new class that will be used to parse the data from the OpenType MATH table.
2069         (WebCore::OpenTypeMathData::OpenTypeMathData):
2070         * platform/graphics/opentype/OpenTypeMathData.h: Added.
2071         (WebCore::OpenTypeMathData::create):
2072         (WebCore::OpenTypeMathData::hasMathData):
2073
2074 2014-03-24  Jon Lee  <jonlee@apple.com>
2075
2076         Build fixes.
2077
2078         Unreviewed.
2079
2080         * editing/ios/EditorIOS.mm:
2081         (WebCore::Editor::writeSelectionToPasteboard): Convert to reference.
2082
2083 2014-03-24  Martin Hodovan  <mhodovan@inf.u-szeged.hu>
2084
2085         ENABLE(VIDEO_TRACK) guard for CSSParserSelector::parsePseudoCueFunctionSelector
2086         https://bugs.webkit.org/show_bug.cgi?id=130666
2087
2088         Reviewed by Andreas Kling.
2089
2090         No new tests. No new functionality.
2091
2092         * css/CSSParserValues.cpp:
2093         (WebCore::CSSParserSelector::parsePseudoCueFunctionSelector): Deleted.
2094
2095 2014-03-24  Javier Fernandez  <jfernandez@igalia.com>
2096
2097         [CSS Grid Layout] Update named <grid-line> syntax to the last version of the specs
2098         https://bugs.webkit.org/show_bug.cgi?id=129041
2099
2100         Reviewed by Sergio Villar Senin.
2101
2102         From Blink r162555 by <svillar@igalia.com>
2103
2104         Names for grid lines are now specified as a list of whitespace separated
2105         idents enclosed in parentheses instead of as a list of strings.
2106
2107         Updated tests to match the new <grid-line> syntax.
2108
2109         * CMakeLists.txt:
2110         * GNUmakefile.list.am:
2111         * WebCore.xcodeproj/project.pbxproj: Added info of the new file for the CSSGridLineNamesValue class.
2112         * css/CSSComputedStyleDeclaration.cpp:
2113         (WebCore::addValuesForNamedGridLinesAtIndex): The named <grid-line> value is now a list.
2114         * css/CSSGrammar.y.in: New syntax for named <grid-line>.
2115         * css/CSSGridLineNamesValue.cpp: Added.
2116         (WebCore::CSSGridLineNamesValue::customCSSText): String representation of the named <grid-line> as a list of Strings.
2117         (WebCore::CSSGridLineNamesValue::CSSGridLineNamesValue): Constructor.
2118         (WebCore::CSSGridLineNamesValue::cloneForCSSOM): Ref counted cloning function.
2119         * css/CSSGridLineNamesValue.h: Added.
2120         (WebCore::CSSGridLineNamesValue::create): Ref counted constructor.
2121         * css/CSSParser.cpp:
2122         (WebCore::CSSParser::parseGridLineNames): It replaces the old parseGrdTrackNames.
2123         (WebCore::CSSParser::parseGridTrackList): Using the new named <grid-line> syntax.
2124         (WebCore::CSSParser::parseGridTrackRepeatFunction): Using the new named <grid-line> syntax.
2125         * css/CSSParser.h:
2126         * css/CSSParserValues.cpp:
2127         (WebCore::destroy): Handling the case of CSSValue being CSSValueList intances.
2128         (WebCore::CSSParserValue::createCSSValue): Handling the case of CSSValue being CSSValueList intances.
2129         * css/CSSParserValues.h:
2130         (WebCore::CSSParserValue::setFromValueList): Adds the named <grid-line> list to the CSSParserValueList instance.
2131         * css/CSSValue.cpp:
2132         (WebCore::CSSValue::equals): Handling the case of the new CSSGridLineNamesValue class.
2133         (WebCore::CSSValue::cssText): Handling the case of the new CSSGridLineNamesValue class.
2134         (WebCore::CSSValue::destroy): Handling the case of the new CSSGridLineNamesValue class.
2135         * css/CSSValue.h:
2136         (WebCore::CSSValue::isGridLineNamesValue): Type cast check for the new CSSGridLineNamesValue class.
2137         * css/StyleResolver.cpp:
2138         (WebCore::createGridTrackList): Using the new named <grid-line> syntax.
2139
2140 2014-03-23  Sam Weinig  <sam@webkit.org>
2141
2142         Convert WebHTMLConverter to C++
2143         https://bugs.webkit.org/show_bug.cgi?id=130655
2144
2145         Reviewed by Andreas Kling.
2146
2147         - Mechanically converts the Objective-C class WebHTMLConverter, to the C++ HTMLConverter (lots of cleanup to follow).
2148         - Removes unused members
2149             - _standardFontFamily (never assigned to)
2150             - _textSizeMultiplier (always exactly 1)
2151             - _webViewTextSizeMultiplier (always exactly 0)
2152             - _defaultFontSize (always exactly 12, changed to be constant)
2153             - _minimumFontSize (always exactly 1, changed to be constant)
2154             - _colorsForNodes (never assigned to)
2155             - _indexingLimit (always exactly 0)
2156             - _thumbnailLimit (always exactly 0)
2157             - _flags.isIndexing (always false)
2158             - _flags.isTesting (always false)
2159
2160         * editing/cocoa/HTMLConverter.mm:
2161         (HTMLConverter::convert):
2162         (HTMLConverter::HTMLConverter):
2163         (HTMLConverter::~HTMLConverter):
2164         (defaultParagraphStyle):
2165         (_childrenForNode):
2166         (HTMLConverter::_stringForNode):
2167         (HTMLConverter::_getFloat):
2168         (_webKitBundle):
2169         (HTMLConverter::_elementIsBlockLevel):
2170         (HTMLConverter::_elementHasOwnBackgroundColor):
2171         (HTMLConverter::_blockLevelElementForNode):
2172         (HTMLConverter::_colorForNode):
2173         (HTMLConverter::_computedAttributesForElement):
2174         (HTMLConverter::_attributesForElement):
2175         (HTMLConverter::_newParagraphForElement):
2176         (HTMLConverter::_newLineForElement):
2177         (HTMLConverter::_newTabForElement):
2178         (_WebMessageDocumentClass):
2179         (HTMLConverter::_addAttachmentForElement):
2180         (HTMLConverter::_addQuoteForElement):
2181         (HTMLConverter::_addValue):
2182         (HTMLConverter::_fillInBlock):
2183         (HTMLConverter::_processMetaElementWithName):
2184         (HTMLConverter::_processHeadElement):
2185         (HTMLConverter::_enterElement):
2186         (HTMLConverter::_addTableForElement):
2187         (HTMLConverter::_addTableCellForElement):
2188         (HTMLConverter::_processElement):
2189         (HTMLConverter::_addMarkersToList):
2190         (HTMLConverter::_exitElement):
2191         (HTMLConverter::_processText):
2192         (HTMLConverter::_traverseNode):
2193         (HTMLConverter::_traverseFooterNode):
2194         (HTMLConverter::_adjustTrailingNewline):
2195         (HTMLConverter::_loadFromDOMRange):
2196         (fileWrapperForURL):
2197         (fileWrapperForElement):
2198         (WebCore::attributedStringFromRange):
2199         (WebCore::editingAttributedStringFromRange):
2200
2201 2014-03-23  Jinwoo Song  <jinwoo7.song@samsung.com>
2202
2203         Remove Dead Stores from editing directory
2204         https://bugs.webkit.org/show_bug.cgi?id=130634
2205
2206         Reviewed by Darin Adler.
2207
2208         Remove Dead Stores from editing directory which assigning a value to a variable
2209         and never reading that value.
2210
2211         * editing/ApplyStyleCommand.cpp:
2212         (WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
2213         * editing/markup.cpp:
2214         (WebCore::createMarkupInternal):
2215
2216 2014-03-23  Hyowon Kim  <hw1008.kim@samsung.com>
2217
2218         Move all EFL typedefs into EflTypedefs.h.
2219         https://bugs.webkit.org/show_bug.cgi?id=130511
2220
2221         Reviewed by Gyuyoung Kim.
2222
2223         * platform/FileSystem.h: Remove EFL typedefs.
2224         * platform/Widget.h: Ditto.
2225         * platform/efl/EflScreenUtilities.h: Ditto.
2226         * platform/graphics/Icon.h: Ditto.
2227         * platform/graphics/Image.h: Ditto.
2228         * platform/graphics/IntPoint.h: Ditto.
2229         * platform/graphics/IntRect.h: Ditto.
2230         * platform/network/NetworkStateNotifier.h: Ditto.
2231
2232 2014-03-23  Sam Weinig  <sam@webkit.org>
2233
2234         Move HTMLConverter from platform/mac to editing/cocoa.
2235
2236         Rubber-stamped by Darin Adler.
2237
2238         * WebCore.xcodeproj/project.pbxproj:
2239         * editing/cocoa: Added.
2240         * editing/cocoa/HTMLConverter.h: Copied from platform/mac/HTMLConverter.h.
2241         * editing/cocoa/HTMLConverter.mm: Copied from platform/mac/HTMLConverter.mm.
2242         * platform/mac/HTMLConverter.h: Removed.
2243         * platform/mac/HTMLConverter.mm: Removed.
2244
2245 2014-03-23  Sam Weinig  <sam@webkit.org>
2246
2247         Simplify the HTMLConverter interface (Part 2)
2248         https://bugs.webkit.org/show_bug.cgi?id=130654
2249
2250         Reviewed by Darin Adler.
2251
2252         Switch HTMLConverter from using an Objective-C interface to C functions.
2253
2254         * WebCore.exp.in:
2255         * editing/ios/EditorIOS.mm:
2256         (WebCore::Editor::writeSelectionToPasteboard):
2257         * editing/mac/EditorMac.mm:
2258         (WebCore::Editor::dataSelectionForPasteboard):
2259         (WebCore::Editor::writeSelectionToPasteboard):
2260         * platform/ios/PasteboardIOS.mm:
2261         * platform/mac/HTMLConverter.h:
2262         * platform/mac/HTMLConverter.mm:
2263         (WebCore::attributedStringFromRange):
2264         (WebCore::editingAttributedStringFromRange):
2265         * platform/mac/PasteboardMac.mm:
2266
2267 2014-03-23  Darin Adler  <darin@apple.com>
2268
2269         Remove code in HTMLObjectElement attribute parsing that forces style resolution and layout
2270         https://bugs.webkit.org/show_bug.cgi?id=130653
2271
2272         Reviewed by Antti Koivisto.
2273
2274         * dom/ContainerNode.cpp: Moved the post-attach callback code from here to
2275         StyleResolveTree.h/cpp.
2276         * dom/ContainerNode.h: Ditto.
2277
2278         * dom/Document.cpp:
2279         (WebCore::Document::recalcStyle): Use Style::PostResolutionCallbackDisabler instead of
2280         PostAttachCallbackDisabler.
2281
2282         * dom/Element.h: Moved the post-attach callback code from here to StyleResolveTree.h/cpp.
2283
2284         * html/HTMLEmbedElement.cpp:
2285         (WebCore::HTMLEmbedElement::parseAttribute): Simplified the code for typeAttr, turning
2286         it into a 1-liner. Added a FIXME in codeAttr about the fact that it does not have the
2287         code to trigger image loads. Changed srcAttr to call updateImageLoaderWithNewURLSoon to
2288         do the image loading logic.
2289
2290         * html/HTMLFormControlElement.cpp:
2291         (WebCore::HTMLFormControlElement::didAttachRenderers): Updated to use
2292         Style::queuePostResolutionCallback and use a lambda instead of a function.
2293         (WebCore::HTMLFormControlElement::didRecalcStyle): Ditto. Also added RefPtr instead
2294         of just using wishful thinking to keep the object alive.
2295         * html/HTMLFrameOwnerElement.cpp:
2296         (WebCore::HTMLFrameOwnerElement::scheduleSetNeedsStyleRecalc): Ditto.
2297
2298         * html/HTMLObjectElement.cpp:
2299         (WebCore::HTMLObjectElement::parseAttribute):: Simplified the code for typeAttr, turning
2300         it into a 1-liner. Changed dataAttr to use updateImageLoaderWithNewURLSoon(). Also made
2301         it call setNeedsWidgetUpdate(true) unconditionally after checking carefully to see that's
2302         harmless if there is no renderer. Changed classidAttr to call setNeedsWidgetUpdate(true)
2303         unconditionally and not set m_classId.
2304         (WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk): Use fastGetAttribute
2305         instead of classId and descendantsOfType instead of getElementsByTagName.
2306         (WebCore::HTMLObjectElement::hasValidClassId): Use fastGetAttribute instead of classId.
2307         (WebCore::HTMLObjectElement::renderFallbackContent): Use imageLoader instead of m_imageLoader.
2308
2309         * html/HTMLObjectElement.h: Removed classId, since there is no reason to cache that
2310         attribute in a data member. Rearranged header, making more private, and fixing some typos,
2311         and doing a "using" instead of a function to disambiguate the inherited form functions.
2312
2313         * html/HTMLPlugInImageElement.cpp:
2314         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Initialize m_needsImageReload.
2315         (WebCore::HTMLPlugInImageElement::createElementRenderer): Fixed some code that assumed the
2316         first child of the shadow root is guaranteed to be an element.
2317         (WebCore::HTMLPlugInImageElement::didRecalcStyle): Added. Calls the new
2318         scheduleUpdateForAfterStyleResolution function.
2319         (WebCore::HTMLPlugInImageElement::didAttachRenderers): Moved all the logic from this
2320         function into scheduleUpdateForAfterStyleResolution. Also added a call through to the base
2321         class; cleaner even though it's just an assertion.
2322         (WebCore::HTMLPlugInImageElement::scheduleUpdateForAfterStyleResolution): Added.
2323         Schedules a call to updateAfterStyleResolution when needed.
2324         (WebCore::HTMLPlugInImageElement::updateAfterStyleResolution): Added.
2325         Combines updateWidgetIfNecessary and startLoadingImage, and also deals with the new
2326         m_needsImageReload boolean in cases where no actual loading is done.
2327         (WebCore::HTMLPlugInImageElement::removedFrom): Added. Do not delay the load event of
2328         document once this element is removed, clears m_needsImageReload.
2329         (WebCore::HTMLPlugInImageElement::didMoveToNewDocument): Removed null check on oldDocument,
2330         since m_needsDocumentActivationCallbacks can't be true if the old document was null.
2331         (WebCore::is100Percent): Added helper to make function below more readable.
2332         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Restructured the code a
2333         bit. The part that attracted my attention was the local variable of type RenderBox, which
2334         was named renderEmbeddedObject. Turns out the caller guarantees to only call this if there
2335         is a renderer of type RenderEmbeddedObject, so depend on that.
2336         (WebCore::HTMLPlugInImageElement::setNeedsImageReload): Added. When called with true, sets
2337         the flag and triggers a style recalculation, and lets updateAfterStyleResolution do the rest.
2338         When called with false, reverses the effects and stops delaying the load event.
2339
2340         * html/HTMLPlugInImageElement.h: Trimmed includes a bit. Made more members private.
2341         Marked more function members final. Made a protected imageLoader function so that
2342         m_imageLoader can be private. Added new protected function updateImageLoaderWithNewURLSoon,
2343         as well as other new private functions. Made m_imageLoader be std::unique_ptr instead of
2344         OwnPtr, and added m_needsImageReload.
2345
2346         * style/StyleResolveTree.cpp:
2347         (WebCore::Style::needsPseudoElement): Fixed spelling error in the name of this function.
2348         (WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded): Updated for name change.
2349         (WebCore::Style::attachRenderTree): Update for new name of PostResolutionCallbackDisabler.
2350         (WebCore::Style::updateBeforeOrAfterPseudoElement): Updated for name change.
2351         (WebCore::Style::postResolutionCallbackQueue): Added.
2352         (WebCore::Style::queuePostResolutionCallback): Added.
2353         (WebCore::Style::suspendMemoryCacheClientCalls): Added. This is a side effect of the original
2354         PostAttachCallbackDisabler that is now done in a cleaner way, using the callback queue, instead
2355         of as a special case. It should not work for multiple documents across multiple pages instead of
2356         only the outermost one.
2357         (WebCore::Style::PostResolutionCallbackDisabler::PostResolutionCallbackDisabler): Added.
2358         Calls suspendMemoryCacheClientCalls, but a FIXME tries to point out why that isn't so great.
2359         (WebCore::Style::PostResolutionCallbackDisabler::~PostResolutionCallbackDisabler): Added.
2360         (WebCore::Style::postResolutionCallbacksAreSuspended): Added.
2361
2362         * style/StyleResolveTree.h: Added queuePostResolutionCallback and
2363         postResolutionCallbacksAreSuspended. Also added PostResolutionCallbackDisabler, which should
2364         eventually become a private implementation detail.
2365
2366 2014-03-23  Sam Weinig  <sam@webkit.org>
2367
2368         Simplify the HTMLConverter interface (Part 1)
2369         https://bugs.webkit.org/show_bug.cgi?id=130654
2370
2371         Reviewed by Dan Bernstein.
2372
2373         Convert WebHTMLConverter's interface to only use class methods as the first
2374         step of simplifying the interface. 
2375
2376         * editing/ios/EditorIOS.mm:
2377         (WebCore::attributedStringForRange):
2378         * editing/mac/EditorMac.mm:
2379         (WebCore::attributedStringForRange):
2380         * platform/mac/HTMLConverter.h:
2381         * platform/mac/HTMLConverter.mm:
2382         (+[WebHTMLConverter attributedStringFromRange:]):
2383
2384 2014-03-23  James Craig  <jcraig@apple.com>
2385
2386         Web Inspector: AXI: add other ARIA one-to-many relationships: owns, flowto, controls.
2387         https://bugs.webkit.org/show_bug.cgi?id=130635
2388
2389         Reviewed by Timothy Hatcher.
2390
2391         Support for @aria-owns, @aria-controls, and @aria-flowto.
2392
2393         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
2394
2395         * inspector/InspectorDOMAgent.cpp:
2396         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
2397         * inspector/protocol/DOM.json:
2398
2399 2014-03-23  Simon Fraser  <simon.fraser@apple.com>
2400
2401         Clean up #includes by geometry classes
2402         https://bugs.webkit.org/show_bug.cgi?id=130645
2403
2404         Reviewed by Andreas Kling.
2405
2406         Pulling in <wtf/Vector.h> and <wtf/PrintStream.h> in the simple geometry
2407         classes brings in a lot of additional headers. Fix by adding a new
2408         GeometryUtilities file so that the basic files don't need Vector,
2409         and including GeometryUtilities.h where necessary.
2410         
2411         Also forward declare PrintStream.h and only bring in the header
2412         in implementation files.
2413
2414         * CMakeLists.txt:
2415         * GNUmakefile.list.am:
2416         * WebCore.vcxproj/WebCore.vcxproj:
2417         * WebCore.vcxproj/WebCore.vcxproj.filters:
2418         * WebCore.xcodeproj/project.pbxproj:
2419         * css/CSSToStyleMap.h:
2420         * html/HTMLCanvasElement.cpp:
2421         * platform/cairo/WidgetBackingStoreCairo.h:
2422         * platform/graphics/FloatPoint.cpp:
2423         * platform/graphics/FloatPoint.h:
2424         * platform/graphics/FloatRect.cpp:
2425         * platform/graphics/FloatRect.h:
2426         * platform/graphics/FloatSize.cpp:
2427         * platform/graphics/FloatSize.h:
2428         * platform/graphics/GeometryUtilities.cpp: Added.
2429         (WebCore::findSlope):
2430         (WebCore::findIntersection):
2431         (WebCore::unionRect):
2432         (WebCore::mapRect):
2433         * platform/graphics/GeometryUtilities.h: Copied from Source/WebCore/platform/graphics/TextTrackRepresentation.h.
2434         * platform/graphics/IntPoint.h:
2435         * platform/graphics/IntRect.cpp:
2436         * platform/graphics/IntRect.h:
2437         * platform/graphics/IntSize.h:
2438         * platform/graphics/TextTrackRepresentation.h:
2439         * platform/graphics/Tile.h:
2440         * platform/graphics/texmap/coordinated/UpdateAtlas.h:
2441         * platform/gtk/WidgetBackingStoreGtkX11.h:
2442         * rendering/RenderBoxModelObject.cpp:
2443         * rendering/RenderImage.cpp:
2444         * rendering/RenderObject.cpp:
2445
2446 2014-03-23  Simon Fraser  <simon.fraser@apple.com>
2447
2448         Clean up #includes by geometry classes
2449         https://bugs.webkit.org/show_bug.cgi?id=130645
2450
2451         Reviewed by Andreas Kling.
2452
2453         Pulling in <wtf/Vector.h> and <wtf/PrintStream.h> in the simple geometry
2454         classes brings in a lot of additional headers. Fix by adding a new
2455         GeometryUtilities file so that the basic files don't need Vector,
2456         and including GeometryUtilities.h where necessary.
2457         
2458         Also forward declare PrintStream.h and only bring in the header
2459         in implementation files.
2460
2461         * CMakeLists.txt:
2462         * GNUmakefile.list.am:
2463         * WebCore.vcxproj/WebCore.vcxproj:
2464         * WebCore.vcxproj/WebCore.vcxproj.filters:
2465         * WebCore.xcodeproj/project.pbxproj:
2466         * css/CSSToStyleMap.h:
2467         * html/HTMLCanvasElement.cpp:
2468         * platform/cairo/WidgetBackingStoreCairo.h:
2469         * platform/graphics/FloatPoint.cpp:
2470         * platform/graphics/FloatPoint.h:
2471         * platform/graphics/FloatRect.cpp:
2472         * platform/graphics/FloatRect.h:
2473         * platform/graphics/FloatSize.cpp:
2474         * platform/graphics/FloatSize.h:
2475         * platform/graphics/GeometryUtilities.cpp: Added.
2476         (WebCore::findSlope):
2477         (WebCore::findIntersection):
2478         (WebCore::unionRect):
2479         (WebCore::mapRect):
2480         * platform/graphics/GeometryUtilities.h: Copied from Source/WebCore/platform/graphics/TextTrackRepresentation.h.
2481         * platform/graphics/IntPoint.h:
2482         * platform/graphics/IntRect.cpp:
2483         * platform/graphics/IntRect.h:
2484         * platform/graphics/IntSize.h:
2485         * platform/graphics/TextTrackRepresentation.h:
2486         * platform/graphics/Tile.h:
2487         * platform/gtk/WidgetBackingStoreGtkX11.h:
2488         * rendering/RenderBoxModelObject.cpp:
2489         * rendering/RenderImage.cpp:
2490         * rendering/RenderObject.cpp:
2491
2492 2014-03-22  Chang Shu  <cshu@webkit.org>
2493
2494         Replace deprecatedIsCollapsibleWhitespace with RenderStyle::isCollapsibleWhiteSpace in TextIterator.
2495         https://bugs.webkit.org/show_bug.cgi?id=130612.
2496
2497         Reviewed by Darin Adler.
2498
2499         Some layout tests are affected by this change but the new behavior should be correct.
2500
2501         * editing/TextIterator.cpp:
2502         (WebCore::TextIterator::handleTextNode):
2503         (WebCore::TextIterator::handleTextBox):
2504
2505 2014-03-22  Sam Weinig  <sam@webkit.org>
2506
2507         Switch HTMLConverter to use CSSPropertyIDs to refer to CSS properties
2508         https://bugs.webkit.org/show_bug.cgi?id=130639
2509
2510         Reviewed by Darin Adler.
2511
2512         This is a ~15% speedup on PerformanceTests/Interactive/CopyAll.html.
2513
2514         - Removes gratuitous lookup of CSS properties that are known at compile time.
2515         - Removes attempted use of non-supported CSS properties (font-effect and horizontal-align) 
2516           that will alway yield the same results.
2517         - Fix some obvious typos where the author thought they were testing for fontKerning or fontLigatures
2518           but instead used the non-existent font-effect.
2519
2520         * platform/mac/HTMLConverter.mm:
2521         (HTMLConverterCaches::computedStylePropertyForElement):
2522         (HTMLConverterCaches::inlineStylePropertyForElement):
2523         (HTMLConverterCaches::propertyValueForNode):
2524         (-[WebHTMLConverter _stringForNode:property:]):
2525         (HTMLConverterCaches::floatPropertyValueForNode):
2526         (-[WebHTMLConverter _getFloat:forNode:property:]):
2527         (HTMLConverterCaches::isBlockElement):
2528         (HTMLConverterCaches::elementHasOwnBackgroundColor):
2529         (HTMLConverterCaches::colorPropertyValueForNode):
2530         (-[WebHTMLConverter _colorForNode:property:]):
2531         (-[WebHTMLConverter _computedAttributesForElement:]):
2532         (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
2533         (-[WebHTMLConverter _fillInBlock:forElement:backgroundColor:extraMargin:extraPadding:isTable:]):
2534         (-[WebHTMLConverter _addTableForElement:]):
2535         (-[WebHTMLConverter _addTableCellForElement:]):
2536         (-[WebHTMLConverter _processElement:tag:display:depth:]):
2537         (-[WebHTMLConverter _exitElement:tag:display:depth:startIndex:]):
2538         (-[WebHTMLConverter _processText:]):
2539         (-[WebHTMLConverter _traverseNode:depth:embedded:]):
2540
2541 2014-03-22  Andreas Kling  <akling@apple.com>
2542
2543         Fix debug build.
2544
2545         * bindings/js/JSDOMBinding.h:
2546         (WebCore::createWrapper):
2547
2548 2014-03-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2549
2550         Add *final* keyword to NavigatorContentUtils class
2551         https://bugs.webkit.org/show_bug.cgi?id=130636
2552
2553         Reviewed by Darin Adler.
2554
2555         NavigatorContentUtils won't be used as a base class. So, added final keyword.
2556
2557         No new tests, no behavior changes.
2558
2559         * Modules/navigatorcontentutils/NavigatorContentUtils.h:
2560
2561 2014-03-22  Andreas Kling  <akling@apple.com>
2562
2563         CREATE_DOM_WRAPPER doesn't need the ExecState.
2564         <https://webkit.org/b/130648>
2565
2566         Remove the ExecState parameter from CREATE_DOM_WRAPPER and get all
2567         that we need from the global object instead.
2568
2569         toJS() and toJSNewlyCreated() still take an ExecState, that needs
2570         to be dealt with separately since some of them have scary looking
2571         currentWorld() checks.
2572
2573         Reviewed by Darin Adler.
2574
2575         * bindings/js/JSAudioContextCustom.cpp:
2576         (WebCore::JSAudioContextConstructor::constructJSAudioContext):
2577         * bindings/js/JSBlobCustom.cpp:
2578         (WebCore::toJS):
2579         (WebCore::JSBlobConstructor::constructJSBlob):
2580         * bindings/js/JSCDATASectionCustom.cpp:
2581         (WebCore::toJSNewlyCreated):
2582         * bindings/js/JSCSSRuleCustom.cpp:
2583         (WebCore::toJS):
2584         * bindings/js/JSCSSValueCustom.cpp:
2585         (WebCore::toJS):
2586         * bindings/js/JSCanvasRenderingContextCustom.cpp:
2587         (WebCore::toJS):
2588         * bindings/js/JSDOMBinding.h:
2589         (WebCore::createWrapper):
2590         (WebCore::wrap):
2591         (WebCore::createNewWrapper):
2592         * bindings/js/JSDocumentCustom.cpp:
2593         (WebCore::toJS):
2594         * bindings/js/JSElementCustom.cpp:
2595         (WebCore::toJSNewlyCreated):
2596         * bindings/js/JSEventCustom.cpp:
2597         (WebCore::toJS):
2598         * bindings/js/JSHTMLCollectionCustom.cpp:
2599         (WebCore::toJS):
2600         * bindings/js/JSHTMLTemplateElementCustom.cpp:
2601         (WebCore::JSHTMLTemplateElement::content):
2602         * bindings/js/JSIDBAnyCustom.cpp:
2603         (WebCore::toJS):
2604         * bindings/js/JSImageDataCustom.cpp:
2605         (WebCore::toJS):
2606         * bindings/js/JSMediaStreamCapabilitiesCustom.cpp:
2607         (WebCore::toJS):
2608         * bindings/js/JSNodeCustom.cpp:
2609         (WebCore::createWrapperInline):
2610         * bindings/js/JSPerformanceEntryCustom.cpp:
2611         (WebCore::toJS):
2612         * bindings/js/JSRTCIceCandidateCustom.cpp:
2613         (WebCore::JSRTCIceCandidateConstructor::constructJSRTCIceCandidate):
2614         * bindings/js/JSRTCPeerConnectionCustom.cpp:
2615         (WebCore::JSRTCPeerConnectionConstructor::constructJSRTCPeerConnection):
2616         * bindings/js/JSRTCSessionDescriptionCustom.cpp:
2617         (WebCore::JSRTCSessionDescriptionConstructor::constructJSRTCSessionDescription):
2618         * bindings/js/JSSVGPathSegCustom.cpp:
2619         (WebCore::toJS):
2620         * bindings/js/JSStyleSheetCustom.cpp:
2621         (WebCore::toJS):
2622         * bindings/js/JSTextCustom.cpp:
2623         (WebCore::toJSNewlyCreated):
2624         * bindings/js/JSTextTrackCueCustom.cpp:
2625         (WebCore::toJS):
2626         * bindings/js/JSTouchCustom.cpp:
2627         (WebCore::toJSNewlyCreated):
2628         * bindings/js/JSTouchListCustom.cpp:
2629         (WebCore::toJSNewlyCreated):
2630         * bindings/js/JSTrackCustom.cpp:
2631         (WebCore::toJS):
2632         * bindings/scripts/CodeGeneratorJS.pm:
2633         (GenerateImplementation):
2634         * dom/make_names.pl:
2635         (printWrapperFunctions):
2636         (printWrapperFactoryCppFile):
2637         (printWrapperFactoryHeaderFile):
2638
2639 2014-03-22  Michael Saboff  <msaboff@apple.com>
2640
2641         toThis() on a JSWorkerGlobalScope should return a JSProxy and not undefined
2642         https://bugs.webkit.org/show_bug.cgi?id=130554
2643
2644         Reviewed by Geoffrey Garen.
2645
2646         Fixed toThis() on WorkerGlobalScope to return a JSProxy instead of the JSGlobalObject.
2647         Added cast from JSProxy->target() if the jsCast<>() to the native object fails
2648         in toJSDedicatedWorkerGlobalScope() and toJSSharedWorkerGlobalScope().
2649         The original cast is needed for access to the local side of the worker, while the JSProxy
2650         cast is used on the remote side of a worker.
2651
2652         Test: fast/workers/worker-strict.html
2653
2654         * bindings/js/JSWorkerGlobalScopeBase.cpp:
2655         (WebCore::toJSDedicatedWorkerGlobalScope):
2656         (WebCore::toJSSharedWorkerGlobalScope):
2657
2658         * bindings/js/WorkerScriptController.cpp:
2659         (WebCore::WorkerScriptController::evaluate): Changed to pass in the JSProxy and not
2660         the WorkerGlobalScope object as the this object to script evaluation.
2661
2662         * workers/DedicatedWorkerGlobalScope.idl:
2663         * workers/SharedWorkerGlobalScope.idl:
2664         * workers/WorkerGlobalScope.idl:
2665         Added the new CustomProxyToJSObject attribute so we'll call to<{nativeClass}>() for
2666         getting the object to use for global evaluation.
2667
2668 2014-03-22  Simon Fraser  <simon.fraser@apple.com>
2669
2670         Some #include hygiene in Node/Element etc
2671         https://bugs.webkit.org/show_bug.cgi?id=130642
2672
2673         Reviewed by Geoffrey Garen.
2674
2675         Clean up various #includes.
2676
2677         * accessibility/AccessibilityObject.h:
2678         * bindings/js/WebCoreTypedArrayController.h:
2679         * dom/Element.h:
2680         * dom/EventListenerMap.h:
2681         * dom/EventTarget.h:
2682         * dom/Node.h:
2683         * rendering/RenderObject.h:
2684         * rendering/svg/RenderSVGRoot.h:
2685
2686 2014-03-22  Simon Fraser  <simon.fraser@apple.com>
2687
2688         FloatRect.h on iOS should not suck in a system header
2689         https://bugs.webkit.org/show_bug.cgi?id=130641
2690
2691         Reviewed by Geoff Garen.
2692
2693         Don't pull in <CoreGraphics/CGGeometry.h> from FloatRect.h.
2694
2695         * platform/graphics/FloatRect.h:
2696
2697 2014-03-22  Dan Bernstein  <mitz@apple.com>
2698
2699         Fixed the iOS build.
2700
2701         Reviewed by Darin Adler.
2702
2703         * page/ios/FrameIOS.mm:
2704         (WebCore::Frame::interpretationsForCurrentRoot):
2705
2706 2014-03-22  Darin Adler  <darin@apple.com>
2707
2708         Remove String::deprecatedCharacters
2709         https://bugs.webkit.org/show_bug.cgi?id=126854
2710
2711         Reviewed by Sam Weinig.
2712
2713         * bindings/scripts/StaticString.pm:
2714         (GenerateStrings): Remove the code to generate the null m_copyData16 pointer.
2715
2716         * editing/TextIterator.cpp:
2717         (WebCore::SearchBuffer::prependContext): Changed to use the new append function in
2718         StringView.h and removed the one defined locally here.
2719
2720         * editing/VisibleUnits.cpp:
2721         (WebCore::wordBreakIteratorForMinOffsetBoundary): Use the new append function
2722         in StringView.h instead of using deprecatedCharacters.
2723         (WebCore::wordBreakIteratorForMaxOffsetBoundary): Ditto.
2724         Removed an append function defined locally here and use the one in StringView.h.
2725
2726         * editing/htmlediting.cpp:
2727         (WebCore::stringWithRebalancedWhitespace): Use StringView::getCharactersWithUpconvert.
2728
2729         * html/parser/HTMLToken.h:
2730         (WebCore::HTMLToken::appendToAttributeValue): Changed to take a StringView instead
2731         of a const String&.
2732
2733         * loader/appcache/ManifestParser.cpp:
2734         (WebCore::parseManifest): Use StringView and StringView::upconvertedCharacters.
2735
2736         * page/EventSource.cpp:
2737         (WebCore::EventSource::didReceiveData): Use the new append overload from StringView.h.
2738         Also added a comment about incorrect use of the decode function.
2739
2740         * page/ios/FrameIOS.mm:
2741         (WebCore::Frame::interpretationsForCurrentRoot): Use the new StringView append function.
2742         Also use simpler new-style for loops.
2743
2744         * platform/LinkHash.cpp:
2745         (WebCore::visitedURLInline): Use the new append function and StringView::substring.
2746         (WebCore::visitedLinkHash): Use upconvertedCharacters for the non-8-bit case.
2747
2748         * platform/URL.cpp:
2749         (WebCore::findFirstOf): Chagned to take a StringView.
2750         (WebCore::containsOnlyASCII): Added. Works on StringView. Could move to a WTF header in
2751         the future if it's needed elsewhere.
2752         (WebCore::protocolIs): Added. Works on StringView. Could put in URL.h if needed elsewhere,
2753         or consider replacing the one that takes const String& with just this one.
2754         (WebCore::appendEncodedHostname): Changed to take a StringView and use
2755         StringView::upconvertedCharacters.
2756         (WebCore::findHostnamesInMailToURL): Changed to take a StringView.
2757         (WebCore::findHostnameInHierarchicalURL): Ditto.
2758         (WebCore::encodeHostnames): Ditto.
2759         (WebCore::encodeRelativeString): Ditto.
2760
2761         * platform/graphics/StringTruncator.cpp:
2762         (WebCore::StringTruncator::width): Use StringView::upconvertedCharacters.
2763
2764         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
2765         (WebCore::HarfBuzzShaper::setFontFeatures): Use indexing directly on the string instead
2766         of on a UChar*.
2767         (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Use StringView::upconvertedCharacters.
2768
2769         * platform/text/TextCodecICU.cpp:
2770         (WebCore::TextCodecICU::encode): Use a Vector<UChar> rather than a String to copy and
2771         replace the backslashes with yen signs. Also optimize case where there are no backslashes.
2772
2773         * rendering/RenderListMarker.cpp:
2774         (WebCore::RenderListMarker::paint): Use TextRun::setText(StringView).
2775
2776         * rendering/RenderText.cpp:
2777         (WebCore::maxWordFragmentWidth): Pass a String to RenderBlock::constructTextRun instead of
2778         calling StringBuilder::deprecatedCharacters.
2779
2780         * rendering/RenderText.h: Removed deprecatedCharacters function.
2781
2782         * rendering/line/BreakingContextInlineHeaders.h: Added now-needed header include.
2783
2784         * rendering/svg/SVGInlineTextBox.cpp:
2785         (WebCore::SVGInlineTextBox::constructTextRun): Use StringView version of TextRun constructor.
2786
2787         * rendering/svg/SVGTextMetrics.cpp:
2788         (WebCore::SVGTextMetrics::SVGTextMetrics): Take references instead of pointers.
2789         (WebCore::SVGTextMetrics::constructTextRun): Take references instead of pointers, and don't
2790         take a character pointer any more. Instead, extract the text and use the StringView version of
2791         the TextRun constructor.
2792         (WebCore::SVGTextMetrics::measureCharacterRange): Take references instead of pointers and
2793         update for above changes.
2794         * rendering/svg/SVGTextMetrics.h: Updated for changes above. Also tweaked style a bit.
2795
2796         * rendering/svg/SVGTextMetricsBuilder.cpp:
2797         (WebCore::SVGTextMetricsBuilder::advanceSimpleText): Updated for SVGTextMetrics changes.
2798         (WebCore::SVGTextMetricsBuilder::advanceComplexText): Ditto.
2799         (WebCore::SVGTextMetricsBuilder::initializeMeasurementWithTextRenderer): Ditto.
2800         (WebCore::SVGTextMetricsBuilder::measureTextRenderer): Change code to store a character
2801         for lastCharacter rather than storing a pointer to a character. Stop using TextRun::data16.
2802
2803         * rendering/svg/SVGTextQuery.cpp:
2804         (WebCore::SVGTextQuery::subStringLengthCallback): Updated for SVGTextMetrics changes.
2805         (WebCore::SVGTextQuery::startPositionOfCharacterCallback): Ditto.
2806         (WebCore::SVGTextQuery::endPositionOfCharacterCallback): Ditto.
2807         (WebCore::calculateGlyphBoundaries): Ditto.
2808
2809         * xml/XPathFunctions.cpp:
2810         (WebCore::XPath::atomicSubstring): Added.
2811         (WebCore::XPath::FunId::evaluate): Tweaked a bit to use a new style for loop.
2812         Use the atomicSubstring function to avoid making a temporary String just to make an AtomicString.
2813         That function also uses characters8/16 rather than depreccatedCharacters.
2814
2815         * xml/XPathNodeSet.h: Added begin and end so this collection can be iterated with new style for loop.
2816
2817         * xml/parser/XMLDocumentParserLibxml2.cpp:
2818         (WebCore::XMLDocumentParser::doWrite): Use StringView::upconvertedCharacters.
2819         (WebCore::parseAttributes): Ditto.
2820
2821 2014-03-22  Commit Queue  <commit-queue@webkit.org>
2822
2823         Unreviewed, rolling out r166118.
2824         https://bugs.webkit.org/show_bug.cgi?id=130640
2825
2826         Crashing things (Requested by weinig on #webkit).
2827
2828         Reverted changeset:
2829
2830         "Switch HTMLConverter to use CSSPropertyIDs to refer to CSS
2831         properties"
2832         https://bugs.webkit.org/show_bug.cgi?id=130639
2833         http://trac.webkit.org/changeset/166118
2834
2835 2014-03-22  Sam Weinig  <sam@webkit.org>
2836
2837         Switch HTMLConverter to use CSSPropertyIDs to refer to CSS properties
2838         https://bugs.webkit.org/show_bug.cgi?id=130639
2839
2840         Reviewed by Simon Fraser.
2841
2842         This is a ~15% speedup on PerformanceTests/Interactive/CopyAll.html.
2843
2844         - Removes gratuitous lookup of CSS properties that are known at compile time.
2845         - Removes attempted use of non-supported CSS properties (font-effect and horizontal-align) 
2846           that will alway yield the same results.
2847         - Fix some obvious typos where the author thought they were testing for fontKerning or fontLigatures
2848           but instead used the non-existent font-effect.
2849
2850         * platform/mac/HTMLConverter.mm:
2851         (HTMLConverterCaches::computedStylePropertyForElement):
2852         (HTMLConverterCaches::inlineStylePropertyForElement):
2853         (HTMLConverterCaches::propertyValueForNode):
2854         (-[WebHTMLConverter _stringForNode:property:]):
2855         (HTMLConverterCaches::floatPropertyValueForNode):
2856         (-[WebHTMLConverter _getFloat:forNode:property:]):
2857         (HTMLConverterCaches::isBlockElement):
2858         (HTMLConverterCaches::elementHasOwnBackgroundColor):
2859         (HTMLConverterCaches::colorPropertyValueForNode):
2860         (-[WebHTMLConverter _colorForNode:property:]):
2861         (-[WebHTMLConverter _computedAttributesForElement:]):
2862         (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
2863         (-[WebHTMLConverter _fillInBlock:forElement:backgroundColor:extraMargin:extraPadding:isTable:]):
2864         (-[WebHTMLConverter _addTableForElement:]):
2865         (-[WebHTMLConverter _addTableCellForElement:]):
2866         (-[WebHTMLConverter _processElement:tag:display:depth:]):
2867         (-[WebHTMLConverter _exitElement:tag:display:depth:startIndex:]):
2868         (-[WebHTMLConverter _processText:]):
2869         (-[WebHTMLConverter _traverseNode:depth:embedded:]):
2870
2871 2014-03-21  Simon Fraser  <simon.fraser@apple.com>
2872
2873         Don't flush compositing layers within FrameView::willPaintContents()
2874         https://bugs.webkit.org/show_bug.cgi?id=130627
2875         <rdar://problem/16368869>
2876
2877         Reviewed by Sam Weinig.
2878
2879         Remove the call to flushCompositingStateForThisFrame() here. We should
2880         have always flushed before painting via other mechanisms in WebKit2 and WebKit2.
2881         Flushing during painting is actually harmful, since we could be inside
2882         a CA commit already, and creating or destroying layers via flushing is bad.
2883
2884         * page/FrameView.cpp:
2885         (WebCore::FrameView::willPaintContents):
2886
2887 2014-03-22  Martin Hodovan  <mhodovan@inf.u-szeged.hu>
2888
2889         ASSERTION FAILED: std::isfinite(num) in WebCore::CSSPrimitiveValue::CSSPrimitiveValue
2890         https://bugs.webkit.org/show_bug.cgi?id=127361
2891
2892         Huge numbers represented by the 'INF' value can not be used
2893         in CSS rules, so they make the assert fail. We have to make
2894         sure that the parsed property value is finite, otherwise
2895         the property will be dropped.
2896
2897         Test: fast/css/infinite-floating-value.html
2898
2899         * css/CSSValuePool.cpp:
2900         (WebCore::CSSValuePool::createValue):
2901
2902 2014-03-21  Zalan Bujtas  <zalan@apple.com>
2903
2904         Remove redundant friending from class Image.
2905         https://bugs.webkit.org/show_bug.cgi?id=130628
2906
2907         Reviewed by Simon Fraser.
2908
2909         Those friend classes are subclasses. No need to make them friend of their parent class.
2910
2911         No change in functionality.
2912
2913         * platform/graphics/Image.h:
2914
2915 2014-03-21  Benjamin Poulain  <bpoulain@apple.com>
2916
2917         [iOS][WK2] Reduce the tiling coverage to the current rect and 1 tile size ahead
2918         https://bugs.webkit.org/show_bug.cgi?id=130555
2919
2920         Reviewed by Simon Fraser.
2921
2922         * WebCore.exp.in:
2923         * platform/ScrollView.h:
2924         * platform/graphics/ca/mac/TileController.mm:
2925         (WebCore::TileController::computeTileCoverageRect):
2926         * platform/ios/ScrollViewIOS.mm:
2927         (WebCore::ScrollView::setScrollVelocityInformation):
2928         (WebCore::ScrollView::computeCoverageRect):
2929         * rendering/RenderLayerCompositor.cpp:
2930         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
2931
2932 2014-03-21  Eric Carlson  <eric.carlson@apple.com>
2933
2934         [iOS] clean up fullscreen player controller when exiting fullscreen
2935         https://bugs.webkit.org/show_bug.cgi?id=130621
2936
2937         Reviewed by Jer Noble.
2938
2939         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2940         (-[WebAVVideoLayer setBounds:]): Do nothing if _avPlayerController is nil.
2941         (-[WebAVVideoLayer setVideoLayerGravity:]): Ditto.
2942         (WebVideoFullscreenInterfaceAVKit::exitFullscreen): Set m_playerViewController delegate
2943             and player controller to nil.
2944
2945 2014-03-21  Eric Carlson  <eric.carlson@apple.com>
2946
2947         [iOS] remote command callbacks must happen on the WebThread
2948         https://bugs.webkit.org/show_bug.cgi?id=130618
2949
2950         Reviewed by Jer Noble.
2951
2952         * platform/ios/RemoteCommandListenerIOS.h:
2953         (WebCore::RemoteCommandListenerIOS::createWeakPtr):
2954         * platform/ios/RemoteCommandListenerIOS.mm:
2955         (WebCore::RemoteCommandListenerIOS::RemoteCommandListenerIOS): Dispatch commands to the
2956             main thread before making listener callbacks.
2957
2958 2014-03-21  Zalan Bujtas  <zalan@apple.com>
2959
2960         Subpixel rendering: Make <img> positioning subpixel aware.
2961         https://bugs.webkit.org/show_bug.cgi?id=130596
2962
2963         Reviewed by Simon Fraser.
2964
2965         Change <img> positioning from integral to device pixel. It enables us
2966         to paint hairline borders around <img> properly.
2967         This patch changes the behavior of broken image representation from constant 1 CSS px border
2968         to a dynamic 1 device px.
2969
2970         Test: fast/images/hidpi-image-position-on-device-pixels.html
2971
2972         * WebCore.exp.in:
2973         * platform/graphics/GraphicsContext.cpp:
2974         (WebCore::GraphicsContext::drawImage):
2975         * platform/graphics/GraphicsContext.h:
2976         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2977         (WebCore::GraphicsContext::drawRect):
2978         * platform/graphics/cg/GraphicsContextCG.cpp:
2979         (WebCore::GraphicsContext::drawRect):
2980         * platform/graphics/wince/GraphicsContextWinCE.cpp:
2981         (WebCore::GraphicsContext::drawRect):
2982         * rendering/RenderImage.cpp:
2983         (WebCore::RenderImage::paintReplaced):
2984         (WebCore::RenderImage::paintIntoRect):
2985         * rendering/RenderImage.h:
2986         * rendering/RenderLayer.cpp:
2987         (WebCore::RenderLayer::drawPlatformResizerImage):
2988
2989 2014-03-21  Brent Fulgham  <bfulgham@apple.com>
2990
2991         Merge VTTScanner Code from Blink
2992         https://bugs.webkit.org/show_bug.cgi?id=130616
2993
2994         Reviewed by Eric Carlson.
2995
2996         Merged from Blink (patch by fs@opera.com):
2997         https://chromium.googlesource.com/chromium/blink/+/f1ceb058d574a1174b524c57f67350510a942071
2998         http://crbug.com/75273002
2999         https://chromium.googlesource.com/chromium/blink/+/3e2c67969486e86347b328c72c67cacabfe6f4a1
3000         http://crbug.com/134173002
3001         https://chromium.googlesource.com/chromium/blink/+/5962b7bbb001838f3fc7f24817637528b86bfd9b
3002         http://crbug.com/134153002
3003         https://chromium.googlesource.com/chromium/blink/+/6c81f51438013edca920a19fc6a31026fc562af2
3004         http://crbug.com/137033002
3005         https://chromium.googlesource.com/chromium/blink/+/fa286dca17a291da3ae8be80111e2264de6d5cfd
3006         http://crbug.com/140503004
3007         https://chromium.googlesource.com/chromium/blink/+/8f33b63aabcce7dd21dd15288d45c4eb37c02001
3008         http://crbug.com/139343006
3009         https://chromium.googlesource.com/chromium/blink/+/1872b54b908fac525f1ad9d6f15174b11e27c8af
3010         http://crbug.com/143983002
3011         https://chromium.googlesource.com/chromium/blink/+/e6494b3359e2077bd8772d86ab1fb709acf4c398
3012         http://crbug.com/144893002
3013  
3014         * CMakeLists.txt:
3015         * GNUmakefile.list.am:
3016         * WebCore.vcxproj/WebCore.vcxproj:
3017         * WebCore.vcxproj/WebCore.vcxproj.filters:
3018         * WebCore.xcodeproj/project.pbxproj:
3019         * html/track/ParsingUtilities.h: Added.
3020         (skipExactly):
3021         (skipUntil):
3022         (skipWhile):
3023         * html/track/VTTCue.cpp:
3024         (WebCore::VTTCue::markFutureAndPastNodes):
3025         (WebCore::VTTCue::settingName):
3026         (WebCore::scanPercentage):
3027         (WebCore::VTTCue::setCueSettings):
3028         * html/track/VTTCue.h:
3029         * html/track/VTTRegion.cpp:
3030         (WebCore::VTTRegion::setRegionSettings):
3031         (WebCore::VTTRegion::scanSettingName):
3032         (WebCore::parsedEntireRun):
3033         (WebCore::VTTRegion::parseSettingValue):
3034         * html/track/VTTRegion.h:
3035         * html/track/VTTScanner.cpp: Added.
3036         (WebCore::VTTScanner::VTTScanner):
3037         (WebCore::VTTScanner::scan):
3038         (WebCore::VTTScanner::scanRun):
3039         (WebCore::VTTScanner::skipRun):
3040         (WebCore::VTTScanner::extractString):
3041         (WebCore::VTTScanner::restOfInputAsString):
3042         (WebCore::VTTScanner::scanDigits):
3043         (WebCore::VTTScanner::scanFloat):
3044         * html/track/VTTScanner.h: Added.
3045         (WebCore::VTTScanner::Run::Run):
3046         (WebCore::VTTScanner::Run::start):
3047         (WebCore::VTTScanner::Run::end):
3048         (WebCore::VTTScanner::Run::isEmpty):
3049         (WebCore::VTTScanner::isAt):
3050         (WebCore::VTTScanner::isAtEnd):
3051         (WebCore::VTTScanner::match):
3052         (WebCore::VTTScanner::position):
3053         (WebCore::VTTScanner::end):
3054         (WebCore::VTTScanner::LCharPredicateAdapter):
3055         (WebCore::VTTScanner::Run::length):
3056         (WebCore::VTTScanner::scan):
3057         (WebCore::VTTScanner::skipWhile):
3058         (WebCore::VTTScanner::skipUntil):
3059         (WebCore::VTTScanner::collectWhile):
3060         (WebCore::VTTScanner::collectUntil):
3061         (WebCore::VTTScanner::seekTo):
3062         (WebCore::VTTScanner::currentChar):
3063         (WebCore::VTTScanner::advance):
3064         * html/track/WebVTTParser.cpp:
3065         (WebCore::WebVTTParser::parseFloatPercentageValue):
3066         (WebCore::WebVTTParser::parseFloatPercentageValuePair):
3067         (WebCore::WebVTTParser::collectTimingsAndSettings):
3068         (WebCore::WebVTTParser::collectTimeStamp):
3069         (WebCore::WebVTTTreeBuilder::constructTreeFromToken):
3070         * html/track/WebVTTParser.h:
3071
3072 2014-03-21  Benjamin Poulain  <bpoulain@apple.com>
3073
3074         Pseudo type cleanup part 2: split pseudo elements parsing
3075         https://bugs.webkit.org/show_bug.cgi?id=130370
3076
3077         Reviewed by Andreas Kling.
3078
3079         With this patch, pseudo elements are handled separately. The only thing left in
3080         the old path is compatibility pseudo elements and pseudo classes.
3081
3082         The list of special pseudo elements is now separated and is stored in SelectorPseudoElementTypeMap.in.
3083         The script makeSelectorPseudoElementsMap.py takes that list to make the pseudo elements hash table.
3084
3085         The other pseudo elements are the prefixed ones, they are filtered in CSSSelector::parsePseudoElementType().
3086
3087         All the non-compatibility selectors are removed from SelectorPseudoTypeMap.in. CSSParserSelector::setPseudoTypeValue()
3088         is updated accordingly. The next step will be to clean that part.
3089
3090         * CMakeLists.txt:
3091         * DerivedSources.make:
3092         * GNUmakefile.list.am:
3093         * WebCore.vcxproj/WebCore.vcxproj:
3094         * WebCore.vcxproj/WebCore.vcxproj.filters:
3095         * WebCore.xcodeproj/project.pbxproj:
3096         * css/CSSComputedStyleDeclaration.cpp:
3097         (WebCore::CSSComputedStyleDeclaration::CSSComputedStyleDeclaration):
3098         * css/CSSGrammar.y.in:
3099         * css/CSSParserValues.cpp:
3100         (WebCore::CSSParserSelector::parsePseudoElementSelector):
3101         (WebCore::CSSParserSelector::parsePseudoCueFunctionSelector):
3102         (WebCore::CSSParserSelector::setPseudoTypeValue):
3103         * css/CSSParserValues.h:
3104         * css/CSSSelector.cpp:
3105         (WebCore::CSSSelector::parsePseudoElementType):
3106         * css/CSSSelector.h:
3107         * css/SelectorPseudoElementTypeMap.in: Added.
3108         * css/SelectorPseudoTypeMap.h:
3109         * css/SelectorPseudoTypeMap.in:
3110         * css/html.css:
3111         (q::before):
3112         (q::after):
3113         * css/makeSelectorPseudoElementsMap.py: Added.
3114         (enumerablePseudoType):
3115         (expand_ifdef_condition):
3116         * page/DOMWindow.cpp:
3117         (WebCore::DOMWindow::getMatchedCSSRules):
3118
3119 2014-03-20  Andreas Kling  <akling@apple.com>
3120
3121         Less inclusion of JSCInlines.h.
3122         <https://webkit.org/b/130545>
3123
3124         Stop including JSCInlines.h from JSDOMGlobalObject.h!
3125
3126         Reviewed by Simon Fraser.
3127
3128         * ForwardingHeaders/runtime/IdentifierInlines.h: Added.
3129         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3130         * bindings/js/JSCommandLineAPIHostCustom.cpp:
3131         * bindings/js/JSDOMGlobalObject.h:
3132         * bindings/js/JSDOMStringMapCustom.cpp:
3133         * bindings/js/JSHTMLAllCollectionCustom.cpp:
3134         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
3135         * bindings/js/JSLazyEventListener.cpp:
3136         * bindings/js/JSSQLResultSetRowListCustom.cpp:
3137         * bindings/js/JSStorageCustom.cpp:
3138         * bindings/js/ScriptGlobalObject.cpp:
3139         * dom/NodeIterator.cpp:
3140         * dom/TreeWalker.cpp:
3141         * testing/Internals.cpp:
3142         * testing/js/WebCoreTestSupport.cpp:
3143
3144 2014-03-21  Oliver Hunt  <oliver@apple.com>
3145
3146         Fix a crash when assigning an object to document.location
3147         https://bugs.webkit.org/show_bug.cgi?id=130213
3148
3149         Reviewed by Geoffrey Garen.
3150
3151         Convert location to string before we make use the document.
3152         This prevents us from attempting to navigate a frame that
3153         has already been removed.
3154
3155         Test: fast/dom/navigation-with-sideeffects-crash.html
3156
3157         * bindings/js/JSDocumentCustom.cpp:
3158         (WebCore::JSDocument::location):
3159         (WebCore::JSDocument::setLocation):
3160
3161 2014-03-21  Brian Burg  <bburg@apple.com>
3162
3163         Web Replay: replay controller is improperly setting user input bridge state
3164         https://bugs.webkit.org/show_bug.cgi?id=130606
3165
3166         Reviewed by Timothy Hatcher.
3167
3168         The user input bridge was being set based on the old session state,
3169         rather than the new session state.
3170
3171         * replay/ReplayController.cpp:
3172         (WebCore::ReplayController::setSessionState):
3173
3174 2014-03-21  James Craig  <jcraig@apple.com>
3175
3176         Web Inspector: AXI: Expose Accessibility Tree children of the selected node
3177         https://bugs.webkit.org/show_bug.cgi?id=130264
3178
3179         Reviewed by Timothy Hatcher.
3180
3181         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
3182
3183         Expose the accessibility tree children (different from DOM children) of the
3184         current node in the accessibility node inspector.
3185
3186         * inspector/InspectorDOMAgent.cpp: 
3187         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
3188         * inspector/InspectorDOMAgent.h:
3189         * inspector/protocol/DOM.json:
3190
3191 2014-03-21  Alex Christensen  <achristensen@webkit.org>
3192
3193         [Win] Compile fixes with video not enabled.
3194         https://bugs.webkit.org/show_bug.cgi?id=130597
3195
3196         Reviewed by Darin Adler.
3197
3198         * DerivedSources.make:
3199         Only generate UserAgentScripts.h if needed.
3200         * platform/audio/MediaSession.cpp:
3201         * platform/audio/MediaSessionManager.cpp:
3202         Only compile if video is enabled.
3203
3204 2014-03-21  Adenilson Cavalcanti  <cavalcantii@gmail.com>
3205
3206         Optimize FEGaussian blur
3207         https://bugs.webkit.org/show_bug.cgi?id=50881
3208
3209         Reviewed by Dirk Schulze.
3210
3211         Currently boxBlur() will calculate the filter for each channel in
3212         a loop and also uses Uint8ClampedArray::set() to write the
3213         resulting pixels into destination array.
3214
3215         Using Uint8ClampedArray::set() requires lots of unnecessary type
3216         conversions, not to mention other function calls. This patch
3217         updates the original written by Simon Fraser to apply cleanly to current
3218         trunk.
3219
3220         It also implements code to handle EdgeModes and finally avoids use
3221         of ::set() in the newly added boxBlurAlphaOnly()
3222         function. Assignment of calculated pixel values rely on pointers.
3223
3224         No new tests, no change on behavior.
3225
3226         * platform/graphics/filters/FEGaussianBlur.cpp:
3227         (WebCore::boxBlurAlphaOnly): Specialized version for alpha only cases.
3228         (WebCore::boxBlur):
3229
3230 2014-03-21  Simon Fraser  <simon.fraser@apple.com>
3231
3232         unobscuredContentRect() should have the same signature on iOS and other platforms,
3233         and should not recurse on iOS.
3234         https://bugs.webkit.org/show_bug.cgi?id=130604
3235         <rdar://problem/16392587>
3236
3237         Reviewed by Tim Horton and Beth Dakin.
3238
3239         Having different signatures on different platforms is a recipe for
3240         build breakage. Give the iOS unobscuredContentRect() an unused 
3241         VisibleContentRectIncludesScrollbars parameter.
3242         
3243         Also avoid recursion via unobscuredContentRect() calling visibleContentRectInternal().
3244
3245         * WebCore.exp.in:
3246         * platform/ScrollView.cpp:
3247         (WebCore::ScrollView::unobscuredContentRect):
3248         (WebCore::ScrollView::unobscuredContentRectInternal):
3249         (WebCore::ScrollView::visibleContentRectInternal):
3250         * platform/ScrollView.h:
3251         (WebCore::ScrollView::unobscuredContentRectIncludingScrollbars):
3252         * platform/ios/ScrollViewIOS.mm:
3253         (WebCore::ScrollView::unobscuredContentRect):
3254
3255 2014-03-21  Brent Fulgham  <bfulgham@apple.com>
3256
3257         Handle recovery on "timestamp-looking" lines in the WebVTT parser
3258         https://bugs.webkit.org/show_bug.cgi?id=130610
3259
3260         Reviewed by Eric Carlson.
3261
3262         Merged from Blink (patch by fs@opera.com):
3263         https://chromium.googlesource.com/chromium/blink/+/b669a380efbffe25f3b154b026b57b9822ce08e2
3264         http://crbug.com/75273002
3265
3266         Tests: media/track/track-webvtt-tc031-cue-recovery.html
3267                media/track/track-webvtt-tc032-degenerate-cues.html
3268
3269         * html/track/WebVTTParser.cpp:
3270         (WebCore::WebVTTParser::parse):
3271         (WebCore::WebVTTParser::collectCueText):
3272         (WebCore::WebVTTParser::recoverCue):
3273         (WebCore::WebVTTParser::ignoreBadCue):
3274         * html/track/WebVTTParser.h:
3275
3276 2014-03-21  Andreas Kling  <akling@apple.com>
3277
3278         Remove unused RenderView::repaintRectangleInViewAndCompositedLayers().
3279         <https://webkit.org/b/130605>
3280
3281         Reviewed by Antti Koivisto.
3282
3283         * rendering/RenderView.cpp:
3284         * rendering/RenderView.h:
3285
3286 2014-03-21  David Hyatt  <hyatt@apple.com>
3287
3288         Crash in RenderBlock::addChildIgnoringAnonymousColumnBlocks.
3289         https://bugs.webkit.org/show_bug.cgi?id=129948
3290         <rdar://problem/16074072>
3291         
3292         Reviewed by Simon Fraser.
3293
3294         When the marker was placed for multi-column list items, it was being inserted
3295         into the list item itself. Even though the add code in RenderBlock did the right
3296         thing and put the marker inside the multi-column flow thread, the list item code
3297         passed in a beforeChild that was computed using the incorrect parent. This resulted
3298         in the flow thread being used both as the parent of the marker and the sibling of
3299         the marker.
3300         
3301         The fix is to add some code to RenderListItem to make sure it uses the multi-column
3302         flow thread if it exists both as the parent of the marker and as the basis for the
3303         computation of the sibling that the marker should be placed in front of.
3304
3305         Added fast/multicol/multicol-li-crash.html
3306
3307         * rendering/RenderListItem.cpp:
3308         (WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded):
3309
3310 2014-03-20  Andreas Kling  <akling@apple.com>
3311
3312         Stop pulling in JSCInlines.h all over the place.
3313         <https://webkit.org/b/130105>
3314
3315         JSDOMBinding.h is included by everyone and their uncle, so try to
3316         cut down on the amount of JSC *Inlines.h it includes.
3317
3318         Reviewed by Geoff Garen.
3319
3320         * ForwardingHeaders/heap/SlotVisitorInlines.h: Added.
3321         * ForwardingHeaders/runtime/JSCJSValueInlines.h: Added.
3322         * ForwardingHeaders/runtime/JSCellInlines.h: Added.
3323         * ForwardingHeaders/runtime/StructureInlines.h: Added.
3324         * bindings/js/JSDOMBinding.h:
3325
3326 2014-03-21  David Kilzer  <ddkilzer@apple.com>
3327
3328         WindowFeatures.{x|y|width|height} are not initialized
3329         <http://webkit.org/b/130547>
3330         <rdar://problem/16383151>
3331
3332         Reviewed by Darin Adler.
3333
3334         Based on a Blink patch in CRBug 342591 by zhaoqin.
3335
3336         * page/WindowFeatures.cpp:
3337         (WebCore::WindowFeatures::WindowFeatures):
3338         - Initialize x, y, width, height in String constructor.
3339         - Move 'resizeable' variable to short-hand initialization since
3340           it is true in both cases.
3341         - Use String::isEmpty() instead of checking its length.
3342         * page/WindowFeatures.h:
3343         (WebCore::WindowFeatures::WindowFeatures): Initialize x, y,
3344         width, height in no-argument constructor.
3345
3346 2014-03-21  Sergio Villar Senin  <svillar@igalia.com>
3347
3348         Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T> in bridge/
3349         https://bugs.webkit.org/show_bug.cgi?id=130601
3350
3351         Reviewed by Darin Adler.
3352
3353         * bridge/IdentifierRep.cpp:
3354         (WebCore::identifierSet):
3355         (WebCore::intIdentifierMap):
3356         (WebCore::stringIdentifierMap):
3357         * bridge/NP_jsobject.cpp:
3358         (objectMap):
3359         * bridge/runtime_root.cpp:
3360         (JSC::Bindings::rootObjectSet): Return a reference instead of
3361         a pointer.
3362         (JSC::Bindings::findProtectingRootObject):
3363         (JSC::Bindings::findRootObject):
3364         (JSC::Bindings::RootObject::RootObject):
3365         (JSC::Bindings::RootObject::invalidate):
3366
3367 2014-03-21  Michael Saboff  <msaboff@apple.com>
3368
3369         Change CodeGeneratorJS.pm special cases for "DOMWindow" to be general purpose
3370         https://bugs.webkit.org/show_bug.cgi?id=130553
3371
3372         Reviewed by Geoffrey Garen.
3373
3374         Eliminated 'if ($interfaceName eq "DOMWindow") {' sections in CodeGeneratorJS where
3375         it was used to do DOMWindow specific casting to a JSObject, either a JSDOMWindow* or
3376         a JSDOMWindowShell*.  Instead the code generator will use the existing 
3377         JSDOMWindow* toJSDOMWindow(JSValue value) function based on a newly added attribute
3378         "CustomProxyToJSObject".  That attribute will emit a call to the function
3379         ${className}* to${className}(JSValue).
3380
3381         This is being done to clean up the code generator and for a subsequent patch that
3382         will use a similar custom to{className} function for workers,
3383         JSDedicatedWorkerGlobalScope* toJSDedicatedWorkerGlobalScope(JSValue).
3384
3385         Changes covered by existing tests.
3386
3387         * bindings/scripts/CodeGeneratorJS.pm:
3388         (GenerateImplementation):
3389         * bindings/scripts/IDLAttributes.txt:
3390         * page/DOMWindow.idl:
3391
3392 2014-03-21  Krzysztof Czech  <k.czech@samsung.com>
3393
3394         AX: Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed
3395         https://bugs.webkit.org/show_bug.cgi?id=130594
3396
3397         Reviewed by Chris Fleizach.
3398
3399         Use static NeverDestroyed<T> in new code.
3400
3401         * accessibility/AccessibilityMediaControls.cpp:
3402         (WebCore::AccessibilityMediaControl::controlTypeName):
3403         (WebCore::AccessibilityMediaControl::title):
3404         (WebCore::AccessibilityMediaControlsContainer::elementTypeName):
3405         (WebCore::AccessibilityMediaTimeline::helpText):
3406         (WebCore::AccessibilityMediaTimeDisplay::accessibilityDescription):
3407         * accessibility/AccessibilityObject.cpp:
3408         (WebCore::AccessibilityObject::actionVerb):
3409         * accessibility/AccessibilityRenderObject.cpp:
3410         (WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
3411         (WebCore::AccessibilityRenderObject::ariaLiveRegionStatus):
3412         (WebCore::AccessibilityRenderObject::ariaLiveRegionRelevant):
3413         (WebCore::AccessibilityRenderObject::actionVerb):
3414         * accessibility/atk/AXObjectCacheAtk.cpp:
3415         (WebCore::notifyChildrenSelectionChange):
3416
3417 2014-03-20  Brent Fulgham  <bfulgham@apple.com>
3418
3419         Merge WebVTT Tokenizer Updates
3420         https://bugs.webkit.org/show_bug.cgi?id=130565
3421
3422         Reviewed by Eric Carlson.
3423
3424         Merged from Blink (patch by fs@opera.com):
3425         https://chromium.googlesource.com/chromium/blink/+/923db263aa65d6efd71c5b55708ad7eea6b23f53
3426         http://crbug.com/73813002
3427         https://chromium.googlesource.com/chromium/blink/+/48375b1d56b2d8850ae93a6c6fb01c69fae82c75
3428         http://crbug.com/77553004
3429         https://chromium.googlesource.com/chromium/blink/+/98d4fc4f5cb716a31d11907120b10538d4ba0f09
3430         http://crbug.com/78833002
3431         https://chromium.googlesource.com/chromium/blink/+/0e53d4f9f140e979b7f32de495551684bc7f4cd2
3432         http://crbug.com/81113003
3433         https://chromium.googlesource.com/chromium/blink/+/730ef1e7f9a1919964f7e74e7ccb2f343e10a148
3434         http://crbug.com/97103002
3435         https://chromium.googlesource.com/chromium/blink/+/c373ee914ffabeaf833939129538251d8f2f4eca
3436         http://crbug.com/98763004
3437         https://chromium.googlesource.com/chromium/blink/+/4ddb4d57948228fa05e49e06bd58a1179c09f212
3438         http://crbug.com/118263002
3439  
3440         * html/track/VTTCue.cpp:
3441         (WebCore::scanPercentage):
3442         (WebCore::VTTCue::setCueSettings):
3443         * html/track/WebVTTParser.cpp:
3444         (WebCore::WebVTTTreeBuilder::buildFromString):
3445         (WebCore::WebVTTTreeBuilder::constructTreeFromToken):
3446         * html/track/WebVTTToken.h:
3447         (WebCore::WebVTTToken::WebVTTToken):
3448         (WebCore::WebVTTToken::StringToken):
3449         (WebCore::WebVTTToken::StartTag):
3450         (WebCore::WebVTTToken::EndTag):
3451         (WebCore::WebVTTToken::TimestampTag):
3452         (WebCore::WebVTTToken::type):
3453         (WebCore::WebVTTToken::name):
3454         (WebCore::WebVTTToken::characters):
3455         (WebCore::WebVTTToken::classes):
3456         (WebCore::WebVTTToken::annotation):
3457         * html/track/WebVTTTokenizer.cpp:
3458         (WebCore::addNewClass):
3459         (WebCore::emitToken):
3460         (WebCore::advanceAndEmitToken):
3461         (WebCore::WebVTTTokenizer::WebVTTTokenizer):
3462         (WebCore::WebVTTTokenizer::nextToken):
3463         * html/track/WebVTTTokenizer.h:
3464         (WebCore::WebVTTTokenizer::shouldSkipNullCharacters):
3465
3466 2014-03-21  Frédéric Wang  <fred.wang@free.fr>
3467
3468         Bug 130345 - Refine childShouldCreateRenderer for MathML elements
3469         https://bugs.webkit.org/show_bug.cgi?id=130345
3470
3471         Reviewed by Chris Fleizach.
3472
3473         This is a follow-up of bug 124128. We add more restrictions on foreign
3474         content of MathML elements.
3475
3476         Tests: mathml/presentation/annotation-children.html
3477                mathml/presentation/foreign-element-in-token.html
3478
3479         * mathml/MathMLElement.cpp:
3480         (WebCore::MathMLElement::isPresentationMathML): fix line wrapping
3481         (WebCore::MathMLElement::isPhrasingContent):
3482         - move the function from MathMLSelectElement.cpp
3483  &n