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