[CSSRegions] Compute region ranges for inline replaced elements
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-02-18  Mihnea Ovidenie  <mihnea@adobe.com>
2
3         [CSSRegions] Compute region ranges for inline replaced elements
4         https://bugs.webkit.org/show_bug.cgi?id=128800
5
6         Reviewed by Andrei Bucur.
7
8         Tests: fast/regions/hover-content-inside-iframe-in-region.html
9                fast/regions/select-multiple-in-region.html
10
11         When asking for the range of regions for an inline replaced box,
12         use the region cached on the root inline box for the inline replaced
13         box as the range of regions is computed only for blocks.
14         A future patch will extend the computation of region ranges
15         for inline blocks too.
16
17         * rendering/RenderBoxModelObject.cpp:
18         (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
19         Remove the restriction set during https://bugs.webkit.org/show_bug.cgi?id=113703
20         and enable the code path for boxes not only for blocks.
21         Method RenderFlowThread::getRegionRangeForBox returns a null region when it is unable
22         to get the region range and we already check for null region case.
23         * rendering/RenderFlowThread.cpp:
24         (WebCore::RenderFlowThread::getRegionRangeForBox):
25
26 2014-02-18  Xabier Rodriguez Calvar  <calvaris@igalia.com>
27
28         Move inheriting method to the superclass in the JavaScript media controls
29         https://bugs.webkit.org/show_bug.cgi?id=128897
30
31         Reviewed by Jer Noble.
32
33         The inheriting method of the JavaScript multimedia controls was
34         moved from the subclasses to the superclass because this way it is
35         only defined once.
36
37         * Modules/mediacontrols/mediaControlsApple.js:
38         (Controller.prototype.extend): Added to replace inheritFrom in the
39         subclasses.
40         * Modules/mediacontrols/mediaControlsGtk.js:
41         * Modules/mediacontrols/mediaControlsiOS.js: Removed inheritFrom
42         and used extend.
43
44 2014-02-18  Xabier Rodriguez Calvar  <calvaris@igalia.com>
45
46         [GTK] Fix hitting hasClass() assertion in debug with the new JS media controls
47         https://bugs.webkit.org/show_bug.cgi?id=128820
48
49         Reviewed by Martin Robinson.
50
51         The code introduced at r164024 caused the hit of hasClass()
52         assertion when getting the classNames() of an element with no
53         class. Now we check for it to avoid the assertion.
54
55         No new tests, current set detects the crash in many tests.
56
57         * platform/gtk/RenderThemeGtk.cpp:
58         (WebCore::nodeHasClass): Check for hasClass() in order not to hit
59         the assertion when getting the classNames() in debug mode.
60
61 2014-02-18  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
62
63         Refactor SVGPreserveAspectRatio::parse()
64         https://bugs.webkit.org/show_bug.cgi?id=128658
65
66         Reviewed by Dirk Schulze.
67
68         To removed "goto" in SVGPreserveAspectRatio::parse(), this patch introduce parseInternal() to handle
69         existing behavior with local variables, and existing/new parse() functions invoke it, then set
70         those to member variables.
71
72         Motivated from Blink: https://src.chromium.org/viewvc/blink?view=rev&revision=166927
73
74         No new tests, no behavior change.
75
76         * svg/SVGPreserveAspectRatio.cpp:
77         (WebCore::SVGPreserveAspectRatio::parse):
78         (WebCore::SVGPreserveAspectRatio::parseInternal):
79         * svg/SVGPreserveAspectRatio.h: Add parse() and parseInternal() functions.
80
81 2014-02-17  Radu Stavila  <stavila@adobe.com>
82
83         [CSS Regions] Move specific named flow methods from RenderRegion to RenderNamedFlowFragment
84         https://bugs.webkit.org/show_bug.cgi?id=128914
85
86         Reviewed by Antti Koivisto.
87
88         Moved named flow specific methods regionContainer() and regionContainerLayer() from 
89         RenderRegion to RenderNamedFlowFragment and renamed them to fragmentContainer and
90         fragmentContainerLayer.
91
92         No new tests required.
93
94         * rendering/RenderLayer.cpp:
95         (WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
96         (WebCore::RenderLayer::calculateClipRects):
97         * rendering/RenderNamedFlowFragment.cpp:
98         (WebCore::RenderNamedFlowFragment::fragmentContainer):
99         (WebCore::RenderNamedFlowFragment::fragmentContainerLayer):
100         * rendering/RenderNamedFlowFragment.h:
101         * rendering/RenderRegion.cpp:
102         * rendering/RenderRegion.h:
103
104 2014-02-17  Sangho Kim  <thomas.kim@lge.com>
105
106         Move PublicURLMansger to std::unique_ptr.
107         https://bugs.webkit.org/show_bug.cgi?id=128891
108
109         Reviewed by Anders Carlsson.
110
111         Use std::unique_ptr and std::make_unique in place of PassOwnPtr and adoptPtr in the PublicURLManager
112
113         * dom/ScriptExecutionContext.h:
114         * html/PublicURLManager.cpp:
115         (WebCore::PublicURLManager::create):
116         * html/PublicURLManager.h:
117
118 2014-02-17  Ricky Mondello  <rmondello@apple.com>
119
120         Expose a way to clear cookies modified after a given date
121         https://bugs.webkit.org/show_bug.cgi?id=128845
122
123         Reviewed by Alexey Proskuryakov.
124
125         * WebCore.exp.in: Add a symbol.
126         * platform/network/PlatformCookieJar.h: Declare deleteAllCookiesModifiedAfterDate.
127         * platform/network/cf/CookieJarCFNet.cpp:
128         (WebCore::deleteAllCookiesModifiedAfterDate): Add a stub.
129         * platform/network/curl/CookieJarCurl.cpp:
130         (WebCore::deleteAllCookiesModifiedAfterDate): Ditto.
131         * platform/network/soup/CookieJarSoup.cpp:
132         (WebCore::deleteAllCookiesModifiedAfterDate): Ditto.
133         * platform/network/mac/CookieJarMac.mm: Add a category NSHTTPCookieStorage category with the method
134             used for time-based clearing so we can build on all platforms. For now, we'll check for support
135             at runtime.
136         (WebCore::deleteAllCookiesModifiedAfterDate): Added. Without foundation API, we'll ignore the passed-in
137             NetworkStorageSession.
138
139 2014-02-17  Benjamin Poulain  <bpoulain@apple.com>
140
141         SelectorCompiler incorrectly saves a backtracking register for a child chain without descendant relation on the right
142         https://bugs.webkit.org/show_bug.cgi?id=128944
143
144         Reviewed by Andreas Kling.
145
146         When resolving the backtracking relations, the value of ancestorPositionSinceDescendantRelation was incorrect for the
147         rightmost child chain.
148         What was happenning is updateChainStates() would increment ancestorPositionSinceDescendantRelation even if there was
149         no descendant relation previously in the chain. As a result, the second SelectorFragment in the fragment chain would
150         save a backtracking register.
151
152         Previously this would just be a wasted register but since r163850, the number of registers available for compilation
153         is defined by SelectorCompiler::minimumRegisterRequirements(). Since we would have one less register available than computed,
154         we could run out of register and RegisterAllocator would invoke WTFCrash to avoid generating incorrect code.
155
156         This patch fixes the issue by not updating ancestorPositionSinceDescendantRelation until the first descendant relation
157         is seen. There was no need to fix the Adjacent relation because adjacentPositionSinceIndirectAdjacentTreeWalk already
158         had the correct guard.
159
160         Test: fast/selectors/querySelector-rightmost-child-chain-attribute-matching.html
161
162         * cssjit/SelectorCompiler.cpp:
163         (WebCore::SelectorCompiler::updateChainStates):
164         (WebCore::SelectorCompiler::isFirstAdjacent): The name was a bad copy-paste, fix it.
165
166 2014-02-17  Dean Jackson  <dino@apple.com>
167
168         Constrain replaced element layout to from-intrinsic aspect ratio if specified
169         https://bugs.webkit.org/show_bug.cgi?id=128629
170
171         Reviewed by Simon Fraser.
172
173         First pass at implementing -webkit-aspect-ratio: from-instrinsics;
174
175         After RenderReplaced has done layout, attempt to update the
176         resulting size to match the desired aspect ratio. This step
177         will only reduce the size of an element, and never below the
178         minimum dimensions.
179
180         Tests: fast/css/aspect-ratio/columns.html
181                fast/css/aspect-ratio/containers.html
182                fast/css/aspect-ratio/simple.html
183
184         * rendering/RenderImage.cpp:
185         (WebCore::RenderImage::imageDimensionsChanged): If we get an update
186         to our intrinsic dimensions, and layout depends on this, trigger
187         another layout pass.
188         * rendering/RenderReplaced.cpp:
189         (WebCore::RenderReplaced::layout): Implement the step described
190         above.
191
192 2014-02-17  Sam Weinig  <sam@webkit.org>
193
194         Fix build.
195
196         * WebCore.exp.in:
197
198 2014-02-17  Anders Carlsson  <andersca@apple.com>
199
200         Remove ENABLE_GLOBAL_FASTMALLOC_NEW
201         https://bugs.webkit.org/show_bug.cgi?id=127067
202
203         Reviewed by Geoffrey Garen.
204
205         * platform/Timer.h:
206
207 2014-02-17  Sam Weinig  <sam@webkit.org>
208
209         Move iOS only Settings into Settings.in and make them not-iOS only
210         https://bugs.webkit.org/show_bug.cgi?id=128942
211
212         Reviewed by Tim Horton.
213
214         * page/Settings.cpp:
215         * page/Settings.h:
216         * page/Settings.in:
217
218 2014-02-17  Anders Carlsson  <andersca@apple.com>
219
220         Remove view source code
221         https://bugs.webkit.org/show_bug.cgi?id=127233
222
223         Reviewed by Antti Koivisto.
224
225         * CMakeLists.txt:
226         * DerivedSources.make:
227         * GNUmakefile.am:
228         * GNUmakefile.list.am:
229         * WebCore.vcxproj/WebCore.vcxproj:
230         * WebCore.vcxproj/WebCore.vcxproj.filters:
231         * WebCore.xcodeproj/project.pbxproj:
232         * bindings/js/ScriptController.cpp:
233         (WebCore::ScriptController::canExecuteScripts):
234         * css/CSSDefaultStyleSheets.cpp:
235         * css/CSSDefaultStyleSheets.h:
236         * css/DocumentRuleSets.cpp:
237         (WebCore::DocumentRuleSets::appendAuthorStyleSheets):
238         (WebCore::DocumentRuleSets::collectFeatures):
239         * css/DocumentRuleSets.h:
240         * css/ElementRuleCollector.cpp:
241         (WebCore::ElementRuleCollector::matchUARules):
242         * css/StyleResolver.cpp:
243         (WebCore::StyleResolver::appendAuthorStyleSheets):
244         (WebCore::StyleResolver::styleForElement):
245         * css/view-source.css: Removed.
246         * dom/DOMImplementation.cpp:
247         (WebCore::DOMImplementation::createDocument):
248         * dom/DOMImplementation.h:
249         * dom/Document.cpp:
250         (WebCore::Document::Document):
251         * dom/Document.h:
252         * html/HTMLAttributeNames.in:
253         * html/HTMLFrameElementBase.cpp:
254         (WebCore::HTMLFrameElementBase::HTMLFrameElementBase):
255         (WebCore::HTMLFrameElementBase::openURL):
256         * html/HTMLFrameElementBase.h:
257         * html/HTMLViewSourceDocument.cpp: Removed.
258         * html/HTMLViewSourceDocument.h: Removed.
259         * html/parser/HTMLToken.h:
260         * html/parser/HTMLViewSourceParser.cpp: Removed.
261         * html/parser/HTMLViewSourceParser.h: Removed.
262         * html/parser/TextViewSourceParser.cpp: Removed.
263         * html/parser/TextViewSourceParser.h: Removed.
264         * inspector/InspectorOverlayPage.css:
265         (.tag-name):
266         (.node-id):
267         (.class-name):
268         * loader/DocumentWriter.cpp:
269         (WebCore::DocumentWriter::createDocument):
270         * loader/FrameLoader.cpp:
271         (WebCore::FrameLoader::receivedFirstData):
272         * page/Frame.cpp:
273         (WebCore::Frame::Frame):
274         * page/Frame.h:
275         * xml/DOMParser.cpp:
276         (WebCore::DOMParser::parseFromString):
277         * xml/XMLViewer.css:
278         (.tag):
279         * xml/XSLTProcessor.cpp:
280         (WebCore::XSLTProcessor::createDocumentFromSource):
281
282 2014-02-17  Simon Fraser  <simon.fraser@apple.com>
283
284         box-shadows get truncated with a combination of transforms and clip: (affects Google Maps)
285         https://bugs.webkit.org/show_bug.cgi?id=128937
286
287         Reviewed by Dean Jackson.
288         
289         RenderLayer::calculateLayerBounds() incorrectly assumed that if localClipRect() returns
290         a non-infinite rect, that rect is OK to use as the compositing bounds.
291         
292         That is not a valid assumption when clip() has a larger rect than the element (e.g.
293         with negative top/left in the rect). In that case, localClipRect() still just
294         returns the background rect, but we actually need a larger compositing layer
295         to show the unclipped parts of descendants.
296         
297         Fix by detecting clip() that exceeds the renderer bounds, and when it does,
298         not early returning in the UseLocalClipRectIfPossible clause.
299
300         Test: compositing/geometry/css-clip-oversize.html
301
302         * rendering/RenderLayer.cpp:
303         (WebCore::RenderLayer::localClipRect): Do a convertToLayerCoords()
304         because we need offsetFromRoot later, and we can pass our value down to
305         calculateRects(). Compute clipExceedsBounds based on the CSS clip rect.
306         (WebCore::RenderLayer::calculateClipRects): Don't early return if clipExceedsBounds
307         is true.
308         * rendering/RenderLayer.h:
309
310 2014-02-17  Antti Koivisto  <antti@apple.com>
311
312         Make TreeScope::rootNode return a reference
313         https://bugs.webkit.org/show_bug.cgi?id=128934
314
315         Reviewed by Andreas Kling.
316
317         It is never null.
318
319         * css/ElementRuleCollector.cpp:
320         (WebCore::ElementRuleCollector::collectMatchingRules):
321         * dom/ContainerNode.h:
322         (WebCore::Node::isTreeScope):
323         * dom/Document.cpp:
324         (WebCore::Document::buildAccessKeyMap):
325         * dom/DocumentOrderedMap.cpp:
326         (WebCore::DocumentOrderedMap::add):
327         (WebCore::DocumentOrderedMap::get):
328         (WebCore::DocumentOrderedMap::getAllElementsById):
329         * dom/EventDispatcher.cpp:
330         (WebCore::EventRelatedNodeResolver::moveToParentOrShadowHost):
331         (WebCore::eventTargetRespectingTargetRules):
332         (WebCore::shouldEventCrossShadowBoundary):
333         * dom/Node.cpp:
334         (WebCore::Node::containingShadowRoot):
335         (WebCore::Node::removedFrom):
336         * dom/ShadowRoot.h:
337         (WebCore::isShadowRoot):
338         * dom/TreeScope.h:
339         (WebCore::TreeScope::rootNode):
340         * page/DOMSelection.cpp:
341         (WebCore::DOMSelection::DOMSelection):
342         * page/DragController.cpp:
343         (WebCore::asFileInput):
344         * page/FocusController.cpp:
345         (WebCore::FocusNavigationScope::rootNode):
346
347 2014-02-17  Chris Fleizach  <cfleizach@apple.com>
348
349         AX: Invalid cast in WebCore::AccessibilityTable::isDataTable (CRBug 280352)
350         <https://webkit.org/b/128925>
351         <rdar://problem/16087351>
352
353         Merged from Blink (patch by Dominic Mazzoni):
354         https://src.chromium.org/viewvc/blink?revision=159711&view=revision
355
356         Reviewed by Oliver Hunt.
357
358         Don't cast to a table cell element unless we are sure it is one.
359
360         Test: accessibility/display-table-cell-causes-crash.html
361
362         * accessibility/AccessibilityTable.cpp:
363         (WebCore::AccessibilityTable::isDataTable):
364
365 2014-02-17  Antti Koivisto  <antti@apple.com>
366
367         Node constructor should take Document reference
368         https://bugs.webkit.org/show_bug.cgi?id=128931
369
370         Reviewed by Geoff Garen.
371
372         * dom/Attr.cpp:
373         (WebCore::Attr::Attr):
374         * dom/CharacterData.h:
375         (WebCore::CharacterData::CharacterData):
376         * dom/ContainerNode.cpp:
377         (WebCore::ContainerNode::~ContainerNode):
378         * dom/ContainerNode.h:
379         (WebCore::ContainerNode::ContainerNode):
380         * dom/Document.cpp:
381         (WebCore::Document::Document):
382         * dom/Document.h:
383         (WebCore::Node::Node):
384         * dom/DocumentFragment.cpp:
385         (WebCore::DocumentFragment::DocumentFragment):
386         (WebCore::DocumentFragment::create):
387         * dom/DocumentFragment.h:
388         * dom/DocumentType.cpp:
389         (WebCore::DocumentType::DocumentType):
390         * dom/Element.h:
391         (WebCore::Element::Element):
392         * dom/Entity.h:
393         (WebCore::Entity::Entity):
394         * dom/EntityReference.cpp:
395         (WebCore::EntityReference::EntityReference):
396         * dom/Node.cpp:
397         (WebCore::Node::~Node):
398         (WebCore::Node::willBeDeletedFrom):
399         * dom/Node.h:
400         * dom/Notation.cpp:
401         * dom/Notation.h:
402         (WebCore::Notation::publicId):
403         (WebCore::Notation::systemId):
404         (WebCore::Notation::Notation):
405         
406             Remove cruft from this non-instantiated class.
407
408         * dom/ShadowRoot.cpp:
409         (WebCore::ShadowRoot::ShadowRoot):
410         (WebCore::ShadowRoot::~ShadowRoot):
411         * dom/TemplateContentDocumentFragment.h:
412
413 2014-02-17  Sergio Correia  <sergio.correia@openbossa.org>
414
415         Replace uses of PassOwnPtr/OwnPtr with std::unique_ptr in WebCore/inspector
416         https://bugs.webkit.org/show_bug.cgi?id=128681
417
418         Reviewed by Timothy Hatcher.
419
420         Another step towards getting rid of PassOwnPtr/OwnPtr, now targeting
421         WebCore/inspector/*. Besides files in there, a few other files in
422         JavaScriptCore/inspector, WebKit/, WebKit2/WebProcess/WebCoreSupport/
423         and WebCore/testing were touched.
424
425         No new tests; no new behavior.
426
427         * WebCore.exp.in:
428         * inspector/CommandLineAPIHost.cpp:
429         * inspector/CommandLineAPIHost.h:
430         * inspector/DOMEditor.cpp:
431         * inspector/DOMPatchSupport.cpp:
432         * inspector/DOMPatchSupport.h:
433         * inspector/InspectorApplicationCacheAgent.h:
434         * inspector/InspectorCSSAgent.cpp:
435         * inspector/InspectorCSSAgent.h:
436         * inspector/InspectorCanvasAgent.h:
437         * inspector/InspectorDOMAgent.cpp:
438         * inspector/InspectorDOMAgent.h:
439         * inspector/InspectorDOMDebuggerAgent.h:
440         * inspector/InspectorDOMStorageAgent.h:
441         * inspector/InspectorDatabaseAgent.h:
442         * inspector/InspectorFrontendClientLocal.cpp:
443         * inspector/InspectorFrontendClientLocal.h:
444         * inspector/InspectorHeapProfilerAgent.h:
445         * inspector/InspectorHistory.cpp:
446         * inspector/InspectorHistory.h:
447         * inspector/InspectorIndexedDBAgent.h:
448         * inspector/InspectorInputAgent.h:
449         * inspector/InspectorLayerTreeAgent.h:
450         * inspector/InspectorMemoryAgent.cpp:
451         * inspector/InspectorMemoryAgent.h:
452         * inspector/InspectorOverlay.cpp:
453         * inspector/InspectorOverlay.h:
454         * inspector/InspectorProfilerAgent.cpp:
455         * inspector/InspectorProfilerAgent.h:
456         * inspector/InspectorResourceAgent.cpp:
457         * inspector/InspectorResourceAgent.h:
458         * inspector/InspectorStyleSheet.cpp:
459         * inspector/InspectorStyleSheet.h:
460         * inspector/InspectorTimelineAgent.h:
461         * inspector/InspectorWorkerAgent.cpp:
462         * inspector/PageConsoleAgent.cpp:
463         * inspector/PageRuntimeAgent.h:
464         * inspector/WebConsoleAgent.cpp:
465         * inspector/WorkerRuntimeAgent.h:
466         * testing/Internals.cpp:
467
468 2014-02-17  Antti Koivisto  <antti@apple.com>
469
470         Rename Document::m_selfOnlyRefCount to m_referencingNodeCount
471         https://bugs.webkit.org/show_bug.cgi?id=128916
472
473         Reviewed by Andreas Kling.
474
475         Make the name more informative. Also make it zero based (document is not considered to reference itself).
476
477         * dom/Document.cpp:
478         (WebCore::Document::Document):
479         (WebCore::Document::removedLastRef):
480         * dom/Document.h:
481         (WebCore::Document::increaseReferencingNodeCount):
482         (WebCore::Document::decreaseReferencingNodeCount):
483         (WebCore::Node::Node):
484         * dom/Node.cpp:
485         (WebCore::Node::~Node):
486         * dom/TreeScopeAdopter.cpp:
487         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
488         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
489
490 2014-02-17  ChangSeok Oh  <changseok.oh@collabora.com>
491
492         [GTK] Build failure caused by missing jsmin module
493         https://bugs.webkit.org/show_bug.cgi?id=128742
494
495         Reviewed by Philippe Normand.
496
497         No new tests since no functionality changed.
498
499         * GNUmakefile.am: Relocate PYTHONPATH to make it meaningful.
500
501 2014-02-17  Radu Stavila  <stavila@adobe.com>
502
503         [CSS Regions] Make regions unsplittable
504         https://bugs.webkit.org/show_bug.cgi?id=128811
505
506         Reviewed by David Hyatt.
507
508         At the moment, nested regions are not properly fragmented across regions. For the moment, 
509         the regions will become unsplittable elements to avoid slicing. At a later time a proper
510         fragmentation algorithm should be written, also taking into consideration pagination strut.
511
512         Test: fast/regions/unsplittable-nested-region.html
513
514         * rendering/RenderBox.cpp:
515         (WebCore::RenderBox::isUnsplittableForPagination):
516
517 2014-02-17  Simon Fraser  <simon.fraser@apple.com>
518
519         Graphics buffer issue with clip-path and fixed positioned element
520         https://bugs.webkit.org/show_bug.cgi?id=126262
521
522         Reviewed by Tim Horton.
523         
524         If an element has a clip-path, backgroundIsKnownToBeOpaqueInRect() needs
525         to return false so that we don't try to make opaque compositing layers.
526
527         Test: compositing/contents-opaque/opaque-with-clip-path.html
528
529         * rendering/RenderBox.cpp:
530         (WebCore::RenderBox::backgroundIsKnownToBeOpaqueInRect):
531
532 2014-02-17  Radu Stavila  <stavila@adobe.com>
533
534         [CSS Regions] The box decorations of an element overflowing a region should be clipped at the border box, not the content box
535         https://bugs.webkit.org/show_bug.cgi?id=128815
536
537         Reviewed by Andrei Bucur.
538
539         Elements flowed into a region should not be painted past the region's content box
540         if they continue to flow into another region in that direction.
541         If they do not continue into another region in that direction, they should be
542         painted all the way to the region's border box.
543         Regions with overflow:hidden will apply clip at the border box, not the content box.
544
545         Tests: fast/regions/box-decorations-over-region-padding-fragmented.html
546                fast/regions/box-decorations-over-region-padding-horiz-bt.html
547                fast/regions/box-decorations-over-region-padding-vert-lr.html
548                fast/regions/box-decorations-over-region-padding-vert-rl.html
549                fast/regions/box-decorations-over-region-padding.html
550
551         * rendering/RenderNamedFlowFragment.cpp:
552         (WebCore::RenderNamedFlowFragment::flowThreadPortionRectForClipping):
553         * rendering/RenderNamedFlowFragment.h:
554         * rendering/RenderRegion.cpp:
555         (WebCore::RenderRegion::rectFlowPortionForBox):
556
557 2014-02-17  Brendan Long  <b.long@cablelabs.com>
558
559         DataCue.data should be a copy of the input ArrayBuffer, not a pointer
560         https://bugs.webkit.org/show_bug.cgi?id=128886
561
562         Reviewed by Eric Carlson.
563
564         No new tests, just updated existing track-datacue.html test.
565
566         * html/track/DataCue.cpp:
567         (WebCore::DataCue::DataCue): Add ExceptionCode and pass through to setData().
568         (WebCore::DataCue::data): Return a copy of m_data instead of a pointer.
569         (WebCore::DataCue::setData): Create a copy of the input data, or throw an exception if it's null.
570         * html/track/DataCue.h: Add ExceptionCode parameters to constructor and data setter.
571         * html/track/DataCue.idl: Same.
572
573 2014-02-17  David Kilzer  <ddkilzer@apple.com>
574
575         CounterContentData::counter() and ImageContentData::image() should return references
576         <http://webkit.org/b/128671>
577
578         Reviewed by Darin Adler.
579
580         * css/CSSComputedStyleDeclaration.cpp:
581         (WebCore::contentToCSSValue):
582         - Update to use references.  Remove useless ASSERTs.
583
584         * css/StyleResolver.cpp:
585         (WebCore::StyleResolver::loadPendingImages):
586         - Update to use references.  StyleResolver::loadPendingImage()
587           will be changed to take a reference in the near future.
588
589         * rendering/RenderElement.cpp:
590         (WebCore::RenderElement::createFor):
591         - Update to use references.  The auto keyword wanted to
592           instantiate a StyleImage instead a reference, so it was
593           replaced.
594
595         * rendering/style/ContentData.h:
596         (WebCore::ImageContentData::ImageContentData): Add ASSERT that
597         m_image is not NULL.
598         (WebCore::ImageContentData::image): Return a reference.  Remove
599         useless overload with identical name.
600         (WebCore::ImageContentData::cloneInternal): Simplify by using
601         implicit PassRefPtr constructor.
602         (WebCore::operator==): Remove unneeded deref operators.
603         (WebCore::CounterContentData::counter): Return a reference.
604         (WebCore::CounterContentData::cloneInternal): Remove unneeded
605         deref operator.
606         (WebCore::operator==): Remove unneeded deref operators.
607
608 2014-02-17  Jer Noble  <jer.noble@apple.com>
609
610         [MediaControls][iOS] Make mediacontrols match the system inline controls
611         https://bugs.webkit.org/show_bug.cgi?id=128833
612
613         Reviewed by Eric Carlson.
614
615         Move items slightly, fix button sizes, font sizes, and colors to match the
616         inline controls from MoviePlayer.framework.
617
618         * Modules/mediacontrols/mediaControlsiOS.css:
619         (audio::-webkit-media-controls-panel):
620         (audio::-webkit-media-controls-fullscreen-button):
621         (audio::-webkit-media-controls-play-button):
622         (audio::-webkit-media-controls-play-button.paused):
623         (audio::-webkit-media-controls-timeline):
624         (audio::-webkit-media-controls-timeline::-webkit-slider-thumb):
625         (audio::-webkit-media-controls-time-remaining-display):
626         * Modules/mediacontrols/mediaControlsiOS.js:
627         (ControllerIOS.prototype.configureInlineControls): Do not add the status text.
628         (ControllerIOS.prototype.updateTime): Call updateProgress().
629         (ControllerIOS.prototype.progressFillStyle): Draw a slightly different color.
630         (ControllerIOS.prototype.updateProgress): Draw white to the left of the currentTime.
631         (ControllerIOS.prototype.formatTime): Single leading zero in the time display fields.
632         (ControllerIOS.prototype.handleTimelineChange): Call updateProgress().
633
634 2014-02-17  Manuel Rego Casasnovas  <rego@igalia.com>
635
636         [CSS Grid Layout] Fix missing layout in flexible and content sized columns
637         https://bugs.webkit.org/show_bug.cgi?id=128672
638
639         Reviewed by Sergio Villar Senin.
640
641         RenderGrid::logicalContentHeightForChild() is called for some items at the beginning of RenderGrid::layoutGridItems()
642         from RenderGrid::computeUsedBreadthOfGridTracks(). This causes that the comparison inside the for loop in
643         RenderGrid::layoutGridItems() does not detect width changes, so elements won't be marked as needsLayout.
644
645         So the comparison is done in RenderGrid::logicalContentHeightForChild() and the element is marked to perform a layout if
646         the width has changed.
647
648         The issue can be reproduced easily with a simple grid with one flexible or content sized column, all the available width
649         is not used. On top of that, when you resize the window the flexible or content sized columns are not updating their
650         size properly.
651
652         CSS Grid Layout perftest results are around 4% worse, which is expected as we're adding a missing layout.
653
654         Test: fast/css-grid-layout/flex-content-sized-column-use-available-width.html
655
656         * rendering/RenderGrid.cpp:
657         (WebCore::RenderGrid::logicalContentHeightForChild): Check width changes and mark element as needed layout if required.
658
659 2014-02-16  Andreas Kling  <akling@apple.com>
660
661         Ensure that removing an iframe from the DOM tree disconnects its Frame.
662         <https://webkit.org/b/128889>
663         <rdar://problem/15671221>
664
665         Merged from Blink (patch by Adam Klein):
666         https://src.chromium.org/viewvc/blink?revision=156174&view=revision
667
668         SubframeLoadingDisabler wasn't catching the case when an <iframe> was,
669         in its unload handler, removed and re-added to the same parent.
670         Fix this by using a count of SubframeLoadingDisablers that are on the
671         stack for a given root, rather than a simple boolean.
672
673         Test: fast/frames/reattach-in-unload.html
674
675         * html/HTMLFrameOwnerElement.h:
676         (WebCore::SubframeLoadingDisabler::disabledSubtreeRoots):
677
678 2014-02-16  Benjamin Poulain  <benjamin@webkit.org>
679
680         When applying style, attribute value matching should be case sensitive for SVG
681         https://bugs.webkit.org/show_bug.cgi?id=128882
682
683         Reviewed by Andreas Kling.
684
685         SelectorChecker was incorrectly matching attribute values with a case insensitve comparison
686         in some cases.
687
688         The choice to use case sensitive matching was taking into account the document type but not
689         the element type. As a result, SVG (and likely MHTML) elements were incorrectly being tested
690         as if they were HTML element.
691
692         With the patch, WebKit also matches the behavior of Firefox, which is great.
693
694         Tests: fast/css/case-insensitive-attribute-with-svg.html
695                fast/selectors/querySelector-case-insensitive-attribute-match-with-svg.html
696
697         * css/SelectorChecker.cpp:
698         (WebCore::SelectorChecker::checkOne):
699
700 2014-02-16  Benjamin Poulain  <benjamin@webkit.org>
701
702         Split compilation state between querySelector and CSS matching
703         https://bugs.webkit.org/show_bug.cgi?id=128869
704
705         Reviewed by Antti Koivisto.
706
707         Cleanup after recent changes:
708         -SelectorCompiler now has a SelectorContext defining if the code is compiled for QuerySelector
709          or for ElementRuleCollector.
710         -Generalize m_selectorCannotMatchAnything by making it part of the FunctionType. FunctionType now
711          fully represent the type of code generation and we don't rely implicitly on m_selectorFragments being
712          empty.
713
714         * css/ElementRuleCollector.cpp:
715         (WebCore::ElementRuleCollector::ruleMatches):
716
717         * cssjit/SelectorCompiler.cpp:
718         (WebCore::SelectorCompiler::compileSelector):
719         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
720         There is no tree marking for QuerySelector, so we can generate a simple selector
721         for the sibling selectors.
722
723         (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
724         The code is split to make it simpler. The classic code generation has been moved
725         to generateSelectorChecker().
726         The decision on what to generate is reduced to a simple switch-case.
727
728         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
729         The code that was previously in compile().
730
731         (WebCore::SelectorCompiler::SelectorCodeGenerator::markParentElementIfResolvingStyle):
732         We should not generate tree marking on querySelector traversal. Since the constructor
733         now generate a SimpleChecker, it would also be incorrect to attempt to access the checkingContext
734         on the stack.
735         We can just skip the marking entierly.
736
737         * cssjit/SelectorCompiler.h:
738         * dom/SelectorQuery.cpp:
739         (WebCore::SelectorDataList::execute):
740         With the changes of SelectorContext, we can no longer generate a complex checker for querySelector.
741         This code may come back in the future but at the moment it is useless.
742
743 2014-02-16  Benjamin Poulain  <bpoulain@apple.com>
744
745         The FTP view is squished to the left
746         https://bugs.webkit.org/show_bug.cgi?id=128856
747
748         Reviewed by Andreas Kling.
749
750         * html/FTPDirectoryDocument.cpp:
751         (WebCore::FTPDirectoryDocumentParser::createBasicDocument):
752
753 2014-02-16  Jae Hyun Park  <jae.park@company100.net>
754
755         [Coordinated Graphics] Make AreaAllocator fast allocated
756         https://bugs.webkit.org/show_bug.cgi?id=124995
757
758         Reviewed by Anders Carlsson.
759
760         AreaAllocator can be created and destroyed frequently (at least once per
761         frame) in case of animation with changing width or height. So, it's
762         better to make AreaAllocator fast allocated.
763
764         * platform/graphics/texmap/coordinated/AreaAllocator.h:
765
766 2014-02-16  Pratik Solanki  <psolanki@apple.com>
767
768         [iOS] WebKit crashes if text is copied to pasteboard with style containing text-shadow
769         https://bugs.webkit.org/show_bug.cgi?id=128888
770         <rdar://problem/16065699>
771
772         Reviewed by Anders Carlsson.
773
774         Use the correct class on iOS so that we don't crash.
775
776         * platform/mac/HTMLConverter.mm:
777         (_shadowForShadowStyle):
778
779 2014-02-16  Andreas Kling  <akling@apple.com>
780
781         Atomicize frequently identical ResourceResponse string members.
782         <https://webkit.org/b/128887>
783
784         Store the mime type, text encoding and HTTP response status text in
785         AtomicStrings instead of Strings to deduplicate frequently occurring
786         values (e.g "text/html", "utf-8" and "OK".)
787
788         Reviewed by Geoffrey Garen.
789
790         * platform/network/ResourceResponseBase.h:
791         * platform/network/cf/ResourceResponseCFNet.cpp:
792         (WebCore::ResourceResponse::cfURLResponse):
793         (WebCore::ResourceResponse::platformLazyInit):
794         * platform/network/mac/ResourceResponseMac.mm:
795         (WebCore::ResourceResponse::platformLazyInit):
796
797 2014-02-16  Dan Bernstein  <mitz@apple.com>
798
799         Speculative iOS build fix.
800
801         * dom/Document.cpp:
802         (WebCore::Document::Document):
803
804 2014-02-15  Antti Koivisto  <antti@apple.com>
805
806         Move document life time management from TreeScope to Document
807         https://bugs.webkit.org/show_bug.cgi?id=128877
808
809         Reviewed by Andreas Kling.
810
811         Document life time is managed in confusing manner by TreeScopes which are also inherited to ShadowRoots.
812         
813         This patches moves the life time management to Document. Nodes in shadow trees selfOnlyRef the Document instead
814         of the ShadowRoot. ShadowRoot is treated like any other node and selfOnlyRefs the Document as well (which it
815         also did earlier, indirectly).
816         
817         TreeScope is devirtualized.
818
819         * css/ElementRuleCollector.cpp:
820         (WebCore::ElementRuleCollector::collectMatchingRules):
821         
822             Author stylesheets never match in UA shadow trees.
823
824         * dom/ContainerNode.cpp:
825         (WebCore::ContainerNode::~ContainerNode):
826         * dom/Document.cpp:
827         (WebCore::Document::Document):
828         (WebCore::Document::~Document):
829         (WebCore::Document::removedLastRef):
830         * dom/Document.h:
831         (WebCore::Document::selfOnlyRef):
832         (WebCore::Document::selfOnlyDeref):
833
834             To avoid branches Document self-refs itself like all other Nodes. This is why deletion will now happen on ref count of 1.
835
836         (WebCore::Node::isDocumentNode):
837         (WebCore::Node::Node):
838         * dom/DocumentOrderedMap.cpp:
839         (WebCore::DocumentOrderedMap::add):
840         * dom/Element.cpp:
841         (WebCore::Element::insertedInto):
842         (WebCore::Element::removedFrom):
843         * dom/Node.cpp:
844         (WebCore::Node::~Node):
845         (WebCore::Node::removedLastRef):
846         * dom/Node.h:
847         (WebCore::Node::document):
848         (WebCore::Node::inDocument):
849         * dom/ShadowRoot.cpp:
850         (WebCore::ShadowRoot::ShadowRoot):
851         (WebCore::ShadowRoot::~ShadowRoot):
852         * dom/ShadowRoot.h:
853         * dom/TreeScope.cpp:
854         (WebCore::TreeScope::TreeScope):
855         (WebCore::TreeScope::~TreeScope):
856         (WebCore::TreeScope::setParentTreeScope):
857         * dom/TreeScope.h:
858         (WebCore::TreeScope::documentScope):
859         
860             Document can no longer ever be null.
861
862         (WebCore::TreeScope::rootNode):
863         (WebCore::TreeScope::setDocumentScope):
864         * dom/TreeScopeAdopter.cpp:
865         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
866         (WebCore::TreeScopeAdopter::moveShadowTreeToNewDocument):
867         
868             Manage Document selfOnlyRefs for nodes in shadow trees too.
869
870         (WebCore::TreeScopeAdopter::updateTreeScope):
871         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
872         * dom/TreeScopeAdopter.h:
873
874 2014-02-16  Ryosuke Niwa  <rniwa@webkit.org>
875
876         setSelectionRange shouldn't directly instantiate VisibleSelection
877         https://bugs.webkit.org/show_bug.cgi?id=128881
878
879         Reviewed by Andreas Kling.
880
881         Added a new version of moveTo for setSelectionRange.
882
883         * editing/FrameSelection.cpp:
884         (WebCore::FrameSelection::moveTo): Added.
885         * editing/FrameSelection.h:
886         * html/HTMLTextFormControlElement.cpp:
887         (WebCore::HTMLTextFormControlElement::setSelectionRange): Use the newly added FrameSelection::moveTo
888         instead of manually instantiating VisibleSelection here.
889
890 2014-02-16  Dan Bernstein  <mitz@apple.com>
891
892         Stop using PLATFORM(MAC) in Source except where it means “OS X but not iOS”
893         https://bugs.webkit.org/show_bug.cgi?id=128885
894
895         Reviewed by Anders Carlsson.
896
897         * loader/FrameLoaderClient.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
898         * platform/Cursor.h: Changed PLATFORM(MAC) to USE(APPKIT) around uses of NSCursor.
899         * platform/LocalizedStrings.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
900         * platform/graphics/PlatformLayer.h: Ditto.
901         * platform/graphics/cg/PDFDocumentImage.cpp: Ditto.
902         * rendering/RenderLayerCompositor.cpp: Ditto.
903         (WebCore::RenderLayerCompositor::requiresContentShadowLayer):
904         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
905
906 2014-02-16  Dan Bernstein  <mitz@apple.com>
907
908         Speculative iOS build fix after r164184.
909
910         * dom/Node.cpp:
911         (WebCore::Node::defaultEventHandler):
912
913 2014-02-15  Ryosuke Niwa  <rniwa@webkit.org>
914
915         DOMSelection shouldn't instantiate VisibleSelection everywhere
916         https://bugs.webkit.org/show_bug.cgi?id=128879
917
918         Reviewed by Antti Koivisto.
919
920         Removed explicit instantiation of VisibleSelection from various member functions of VisibleSelection.
921
922         * page/DOMSelection.cpp:
923         (WebCore::DOMSelection::collapse):
924         (WebCore::DOMSelection::collapseToEnd):
925         (WebCore::DOMSelection::collapseToStart):
926         (WebCore::DOMSelection::setBaseAndExtent):
927         (WebCore::DOMSelection::setPosition):
928         (WebCore::DOMSelection::extend):
929         (WebCore::DOMSelection::getRangeAt):
930         (WebCore::DOMSelection::addRange):
931
932 2014-02-15  Ryosuke Niwa  <rniwa@webkit.org>
933
934         Remove unused arguments from moveTo(Range*)
935         https://bugs.webkit.org/show_bug.cgi?id=128878
936
937         Reviewed by Antti Koivisto.
938
939         Cleanup.
940
941         * bindings/objc/DOMUIKitExtensions.mm:
942         (-[DOMRange move:inDirection:]):
943         (-[DOMRange extend:inDirection:]):
944         * editing/FrameSelection.cpp:
945         (WebCore::FrameSelection::moveTo):
946         * editing/FrameSelection.h:
947
948 2014-02-15  Filip Pizlo  <fpizlo@apple.com>
949
950         Vector with inline capacity should work with non-PODs
951         https://bugs.webkit.org/show_bug.cgi?id=128864
952
953         Reviewed by Michael Saboff.
954
955         No new tests because no change behavior.
956         
957         Deques no longer have inline capacity because it was broken, and we didn't need it
958         here anyway.
959
960         * page/WheelEventDeltaTracker.h:
961
962 2014-02-15  Andreas Kling  <akling@apple.com>
963
964         Add checked casts for Event.
965         <https://webkit.org/b/128875>
966
967         Generate casting helpers for casting from Event to various subclasses
968         and go on static_cast replacement spree.
969
970         Reviewed by Sam Weinig.
971
972 2014-02-15  Ryosuke Niwa  <rniwa@webkit.org>
973
974         HTMLTextFormControlElement::subtreeHasChanged should be called before updating selection
975         https://bugs.webkit.org/show_bug.cgi?id=128870
976
977         Reviewed by Darin Adler.
978
979         Extracted HTMLTextFormControlElement::didEditInnerTextValue out of HTMLTextFormControlElement::defaultEventHandler
980         and called it in appliedEditing, unappliedEditing, and reappliedEditing before updating selection.
981
982         * editing/Editor.cpp:
983         (WebCore::notifyTextFromControls): Added.
984         (WebCore::Editor::appliedEditing): Update text form control's internal states before updating selection.
985         (WebCore::Editor::unappliedEditing): Ditto.
986         (WebCore::Editor::reappliedEditing): Ditto.
987         * html/HTMLTextFormControlElement.cpp:
988         (WebCore::HTMLTextFormControlElement::didEditInnerTextValue):
989         * html/TextFieldInputType.cpp:
990         (WebCore::TextFieldInputType::subtreeHasChanged): Removed a stale assertion from the time we used to do
991         everything in the render tree.
992
993 2014-02-15  Andreas Kling  <akling@apple.com>
994
995         Add checked casts for ScriptExecutionContext.
996         <https://webkit.org/b/128874>
997
998         Generate casting helpers for casting from ScriptExecutionContext to
999         Document and WorkerGlobalScope. Apply heartily.
1000
1001         Reviewed by Antti Koivisto.
1002
1003 2014-02-15  Alexey Proskuryakov  <ap@apple.com>
1004
1005         [Mac] All WebKit clients should encrypt WebCrypto keys automatically
1006         https://bugs.webkit.org/show_bug.cgi?id=128852
1007
1008         Reviewed by Oliver Hunt.
1009
1010         Install a persistent master key in Keychain on first use of WebCrypto key serialization.
1011         The key is per application, protected with ACL.
1012
1013         * English.lproj/Localizable.strings:
1014         * WebCore.exp.in:
1015         * crypto/SerializedCryptoKeyWrap.h:
1016         * crypto/mac/SerializedCryptoKeyWrapMac.mm:
1017         (WebCore::masterKeyAccountNameForCurrentApplication):
1018         (WebCore::getDefaultWebCryptoMasterKey):
1019         (WebCore::createAndStoreMasterKey):
1020         (WebCore::findMasterKey):
1021         * platform/LocalizedStrings.cpp:
1022         (WebCore::webCryptoMasterKeyKeychainLabel):
1023         (WebCore::webCryptoMasterKeyKeychainComment):
1024         * platform/LocalizedStrings.h:
1025
1026 2014-02-15  Ryosuke Niwa  <rniwa@webkit.org>
1027
1028         computeSelectionStart and computeSelectionEnd shouldn't trigger synchronous layout
1029         https://bugs.webkit.org/show_bug.cgi?id=128806
1030
1031         Reviewed by Darin Adler.
1032
1033         Added indexForPosition to HTMLTextFormControlElement. Like r163825, this patch traverses the DOM tree
1034         instead of the render tree to compute the index for a given position.
1035
1036         We traverse the DOM Tree backwards starting at the specified Position all the way back to the beginning
1037         of the inner text element. The index is computed as the number of characters we encountered during
1038         this backwards DOM traversal.
1039
1040         It's worth noting that passedPosition.computeNodeBeforePosition() returns and only returns 0 when the
1041         position is before the first node of its parent or inside a text node. In such cases, we call
1042         passedPosition.containerNode() to find the parent or the text node.
1043
1044         * html/HTMLTextFormControlElement.cpp:
1045         (WebCore::HTMLTextFormControlElement::indexForVisiblePosition): Use indexForPosition.
1046         (WebCore::HTMLTextFormControlElement::computeSelectionStart): Ditto.
1047         (WebCore::HTMLTextFormControlElement::computeSelectionEnd): Dotto.
1048         (WebCore::finishText): Cleanup. Use newlineCharacter instead of hard-coding '\n'.
1049         (WebCore::HTMLTextFormControlElement::indexForPosition): Added. See above for the description.
1050         * html/HTMLTextFormControlElement.h:
1051
1052 2014-02-15  Brent Fulgham  <bfulgham@apple.com>
1053
1054         [Win] Avoid unnecessary asserts if "prepareToPlay" is called multiple times.
1055         https://bugs.webkit.org/show_bug.cgi?id=128859
1056
1057         Reviewed by Eric Carlson.
1058
1059         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1060         (WebCore::AVFWrapper::createPlayer): Don't assert if player exists; just return the
1061         existing copy.
1062         (WebCore::AVFWrapper::createPlayerItem): Ditto (but with Player Items).
1063
1064 2014-02-15  Darin Adler  <darin@apple.com>
1065
1066         Remove double hashing from DatasetDOMStringMap::deleteItem
1067         https://bugs.webkit.org/show_bug.cgi?id=128865
1068
1069         Reviewed by Benjamin Poulain.
1070
1071         * dom/DatasetDOMStringMap.cpp:
1072         (WebCore::DatasetDOMStringMap::deleteItem): Removed call to hasAttribute, using the
1073         result from removeAttribute instead.
1074
1075         * dom/Element.cpp:
1076         (WebCore::Element::removeAttribute): Add a return value, false if nothing is removed,
1077         and true if something is removed.
1078         (WebCore::Element::removeAttributeNS): Ditto.
1079         * dom/Element.h: Ditto.
1080
1081 2014-02-15  Piotr Grad  <p.grad@samsung.com>
1082
1083         Setting currentTime on HTMLMediaElement with media controller should throw exception.
1084         https://bugs.webkit.org/show_bug.cgi?id=128867.
1085
1086         Reviewed by Eric Carlson.
1087
1088         Added implementation for setting currentTime in HTMLMediaElement. Old implementation
1089         was left to be used internally.
1090
1091         Test: media/video-controller-currentTime.html
1092
1093         * html/HTMLMediaElement.cpp:
1094         (WebCore::HTMLMediaElement::parseAttribute):
1095         * html/HTMLMediaElement.h:
1096         * html/HTMLMediaElement.idl:
1097
1098 2014-02-15  Anders Carlsson  <andersca@apple.com>
1099
1100         Form controls are always painted in the active state
1101         https://bugs.webkit.org/show_bug.cgi?id=128872
1102         <rdar://problem/9422677>
1103
1104         Reviewed by Dan Bernstein.
1105
1106         AppKit will always paint form controls in the active state if the view doesn't have a
1107         window. Fix this by adding a fake window whose key appearance we'll update based on the 
1108         control state. Also, rename WebCoreFlippedView to WebCoreThemeView since it stopped being
1109         just about the flippedness a long time ago.
1110
1111         * platform/mac/ThemeMac.h:
1112         * platform/mac/ThemeMac.mm:
1113         (-[WebCoreThemeWindow hasKeyAppearance]):
1114         Return themeWindowHasKeyAppearance.
1115
1116         (-[WebCoreThemeView window]):
1117         Create a WebCoreThemeWindow object lazily and return it.
1118
1119         (WebCore::paintCheckbox):
1120         (WebCore::paintRadio):
1121         (WebCore::paintButton):
1122         Pass the control states to ThemeMac::ensuredView.
1123
1124         (WebCore::ThemeMac::ensuredView):
1125         Set themeWindowHasKeyAppearance based on the control state.
1126
1127         * rendering/RenderThemeMac.mm:
1128         (WebCore::RenderThemeMac::documentViewFor):
1129         Pass the control states to ThemeMac::ensuredView.
1130
1131 2014-02-15  Renata Hodovan  <rhodovan.u-szeged@partner.samsung.com>
1132
1133         ASSERT_WITH_SECURITY_IMPLICATION in WebCore::toElement
1134         https://bugs.webkit.org/show_bug.cgi?id=128810
1135
1136         Reviewed by Ryosuke Niwa.
1137
1138         Make CompositeEditCommand::cloneParagraphUnderNewElement() to work when |outerNode|
1139         doesn't contain |start|.
1140
1141         Before this patch, CompositeEditCommand::cloneParagraphUnderNewElement() tried to copy
1142         ancestry nodes from |start| to Document node when |start| position isn't in |outerNode|. This
1143         patch changes CompositeEditCommand::cloneParagraphUnderNewElement() to copy |start| to
1144         |outerNode| only if |outerNode| contains |start| position.
1145
1146         Merged from Blink https://src.chromium.org/viewvc/blink?revision=161762&view=revision by yosin@chromium.org.
1147
1148         Test: editing/execCommand/indent-with-uneditable-crash.html
1149
1150         * editing/CompositeEditCommand.cpp:
1151         (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
1152
1153 2014-02-15  Samuel White  <samuel_white@apple.com>
1154
1155         AX: Add ability to specify descendant type when using AXUIElementsForSearchPredicate.
1156         https://bugs.webkit.org/show_bug.cgi?id=128747
1157
1158         Reviewed by Chris Fleizach.
1159
1160         Added support for 'immediate descendant only' to existing predicate based searching. This
1161         addition allows VoiceOver to fetch each child element lazily (rather than all at once via AXChildren).
1162
1163         Test: platform/mac/accessibility/search-predicate-immediate-descendants-only.html
1164
1165         * accessibility/AccessibilityObject.cpp:
1166         (WebCore::AccessibilityObject::findMatchingObjects):
1167         * accessibility/AccessibilityObject.h:
1168         (WebCore::AccessibilitySearchCriteria::AccessibilitySearchCriteria):
1169         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1170         (accessibilitySearchCriteriaForSearchPredicateParameterizedAttribute):
1171
1172 2014-02-15  Jeremy Jones  <jeremyj@apple.com>
1173
1174         WK2 AVKit enter fullscreen doesn't work a second time.
1175         https://bugs.webkit.org/show_bug.cgi?id=128558
1176
1177         Reviewed by Jer Noble.
1178
1179         Lazily create WebAVPlayerController when needed.
1180
1181         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
1182         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1183         (WebVideoFullscreenInterfaceAVKit::WebVideoFullscreenInterfaceAVKit):
1184         (WebVideoFullscreenInterfaceAVKit::getPlayerController):
1185         Add getPlayerController()
1186
1187         (WebVideoFullscreenInterfaceAVKit::setWebVideoFullscreenModel):
1188         (WebVideoFullscreenInterfaceAVKit::setDuration):
1189         (WebVideoFullscreenInterfaceAVKit::setCurrentTime):
1190         (WebVideoFullscreenInterfaceAVKit::setRate):
1191         (WebVideoFullscreenInterfaceAVKit::setVideoDimensions):
1192         (WebVideoFullscreenInterfaceAVKit::setVideoLayer):
1193         (WebVideoFullscreenInterfaceAVKit::enterFullscreenWithCompletionHandler):
1194         use getPlayerController();
1195
1196 2014-02-15  Jer Noble  <jer.noble@apple.com>
1197
1198         [Mac] 10X slower than Chrome when drawing a video into a canvas
1199         https://bugs.webkit.org/show_bug.cgi?id=124599
1200
1201         Reviewed by Darin Adler.
1202
1203         Follow up patch to r159518 to address Darin's post-commit review.
1204
1205         * html/HTMLVideoElement.cpp:
1206         (WebCore::HTMLVideoElement::nativeImageForCurrentTime): Use nullptr.
1207         * platform/graphics/MediaPlayerPrivate.h:
1208         (WebCore::MediaPlayerPrivateInterface::nativeImageForCurrentTime): Ditto.
1209         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1210         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Ditto.
1211         (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC): Clear the
1212                 AVPlayerItemVideoOutput's delegate callback.
1213         (WebCore::CVPixelBufferGetBytePointerCallback): Use static_cast.
1214         (WebCore::CVPixelBufferReleaseBytePointerCallback): Ditto.
1215         (WebCore::CVPixelBufferReleaseInfoCallback): Ditto.
1216         (-[WebCoreAVFPullDelegate initWithCallback:]): Space changes.
1217         (-[WebCoreAVFPullDelegate setCallback:]): Added.
1218         (-[WebCoreAVFPullDelegate outputMediaDataWillChange:]): Check the value of m_callback.
1219
1220 2014-02-14  Andreas Kling  <akling@apple.com>
1221
1222         CTTE: WorkerGlobalScope is always owned by a WorkerThread.
1223         <https://webkit.org/b/128834>
1224
1225         Codify this by storing the owner thread as a WorkerThread& and making
1226         thread() return a reference.
1227
1228         This exposed a couple of unnecessary assertions.
1229
1230         Reviewed by Anders Carlsson.
1231
1232         * Modules/notifications/WorkerGlobalScopeNotifications.cpp:
1233         (WebCore::WorkerGlobalScopeNotifications::webkitNotifications):
1234         * Modules/websockets/ThreadableWebSocketChannel.cpp:
1235         (WebCore::ThreadableWebSocketChannel::create):
1236         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
1237         (WebCore::WorkerThreadableWebSocketChannel::Bridge::Bridge):
1238         (WebCore::WorkerThreadableWebSocketChannel::Bridge::waitForMethodCompletion):
1239         * bindings/js/ScheduledAction.cpp:
1240         (WebCore::ScheduledAction::execute):
1241         * bindings/js/WorkerScriptDebugServer.cpp:
1242         (WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
1243         * dom/ScriptExecutionContext.cpp:
1244         (WebCore::ScriptExecutionContext::createdMessagePort):
1245         (WebCore::ScriptExecutionContext::destroyedMessagePort):
1246         * inspector/WorkerDebuggerAgent.cpp:
1247         (WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent):
1248         (WebCore::WorkerDebuggerAgent::~WorkerDebuggerAgent):
1249         * inspector/WorkerInspectorController.cpp:
1250         * inspector/WorkerRuntimeAgent.cpp:
1251         (WebCore::WorkerRuntimeAgent::pauseWorkerGlobalScope):
1252         * loader/WorkerThreadableLoader.cpp:
1253         (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
1254         (WebCore::WorkerThreadableLoader::loadResourceSynchronously):
1255         * loader/cache/MemoryCache.cpp:
1256         (WebCore::MemoryCache::removeRequestFromCache):
1257         * workers/DedicatedWorkerGlobalScope.cpp:
1258         (WebCore::DedicatedWorkerGlobalScope::create):
1259         (WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):
1260         (WebCore::DedicatedWorkerGlobalScope::postMessage):
1261         (WebCore::DedicatedWorkerGlobalScope::importScripts):
1262         (WebCore::DedicatedWorkerGlobalScope::thread):
1263         * workers/DedicatedWorkerGlobalScope.h:
1264         * workers/DedicatedWorkerThread.cpp:
1265         (WebCore::DedicatedWorkerThread::createWorkerGlobalScope):
1266         * workers/SharedWorkerGlobalScope.cpp:
1267         (WebCore::SharedWorkerGlobalScope::create):
1268         (WebCore::SharedWorkerGlobalScope::SharedWorkerGlobalScope):
1269         (WebCore::SharedWorkerGlobalScope::thread):
1270         * workers/SharedWorkerGlobalScope.h:
1271         * workers/SharedWorkerThread.cpp:
1272         (WebCore::SharedWorkerThread::createWorkerGlobalScope):
1273         * workers/WorkerGlobalScope.cpp:
1274         (WebCore::CloseWorkerGlobalScopeTask::performTask):
1275         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
1276         (WebCore::WorkerGlobalScope::~WorkerGlobalScope):
1277         (WebCore::WorkerGlobalScope::postTask):
1278         (WebCore::WorkerGlobalScope::logExceptionToConsole):
1279         (WebCore::WorkerGlobalScope::addConsoleMessage):
1280         (WebCore::WorkerGlobalScope::addMessage):
1281         (WebCore::WorkerGlobalScope::isContextThread):
1282         * workers/WorkerGlobalScope.h:
1283         (WebCore::WorkerGlobalScope::thread):
1284         * workers/WorkerMessagingProxy.cpp:
1285         (WebCore::MessageWorkerGlobalScopeTask::performTask):
1286         (WebCore::WorkerMessagingProxy::WorkerMessagingProxy):
1287         (WebCore::WorkerMessagingProxy::~WorkerMessagingProxy):
1288         * workers/WorkerRunLoop.cpp:
1289         (WebCore::WorkerRunLoop::runInMode):
1290         (WebCore::WorkerRunLoop::runCleanupTasks):
1291
1292 2014-02-14  Ryosuke Niwa  <rniwa@webkit.org>
1293
1294         setSelectionRange shouldn't trigger a synchronous layout to check focusability when text field is already focused
1295         https://bugs.webkit.org/show_bug.cgi?id=128804
1296
1297         Reviewed by Enrica Casucci.
1298
1299         Don't trigger a synchronous layout at the beginning of setSelectionRange if the element is already focused
1300         since we don't have to check the size of render box in that case.
1301
1302         We should be able to get rid of this synchronous layout entirely once we fix https://webkit.org/b/128797
1303         but that's somewhat risky behavioral change so we'll do that in a separate patch.
1304
1305         * editing/FrameSelection.cpp:
1306         (WebCore::FrameSelection::selectAll): Fixed the bug where selectAll selects the entire document even if the text
1307         form contol is focused if the selection is none (i.e. not anchored to any node).
1308         * html/HTMLTextFormControlElement.cpp:
1309         (WebCore::HTMLTextFormControlElement::setSelectionRange): Only update the layout if the element is not focused
1310         already. Also pass in DoNotSetFocus option to setSelection since we already have the focus in that case.
1311
1312 2014-02-14  Dan Bernstein  <mitz@apple.com>
1313
1314         REGRESSION (r157443): Search fields with a non-white background don’t have a round bezel
1315         https://bugs.webkit.org/show_bug.cgi?id=126295
1316
1317         Reviewed by Ryosuke Niwa.
1318
1319         Reverted r157443 and improved comment.
1320
1321         * rendering/RenderTheme.cpp:
1322         (WebCore::RenderTheme::isControlStyled):
1323
1324 2014-02-14  Brian Burg  <bburg@apple.com>
1325
1326         Web Replay: AtomicString replay input names should be stored in a thread-local table
1327         https://bugs.webkit.org/show_bug.cgi?id=128829
1328
1329         Reviewed by Andreas Kling.
1330
1331         Similar to how DOM event names are frequently-used AtomicStrings, replay input
1332         names are also checked in many places as a "type tag". This patch puts all known
1333         input names into a class held by ThreadGlobalData and adds the shortcut `inputTypes()`
1334         so that replay input types can be referenced with `inputTypes.InputName()`.
1335
1336         * WebCore.xcodeproj/project.pbxproj:
1337         * platform/ThreadGlobalData.cpp: Add inputTypes() shortcut.
1338         (WebCore::ThreadGlobalData::ThreadGlobalData):
1339         * platform/ThreadGlobalData.h: Add inputTypes() shortcut.
1340         (WebCore::ThreadGlobalData::inputTypes):
1341         * replay/ReplayInputTypes.cpp: Added.
1342         (WebCore::ReplayInputTypes::ReplayInputTypes):
1343         * replay/ReplayInputTypes.h: Added.
1344         (WebCore::inputTypes): The input names are provided by per-framework macros that
1345         are generated by the replay inputs code generator.
1346
1347 2014-02-14  Jer Noble  <jer.noble@apple.com>
1348
1349         Add support for specced event handlers to HTMLMediaElement
1350         https://bugs.webkit.org/show_bug.cgi?id=128292
1351
1352         Reviewed by Andreas Kling.
1353
1354         Test: media/media-event-listeners.html
1355
1356         Add explicit event listener IDL attributes to HTMLMediaElement.
1357
1358         * html/HTMLMediaElement.h:
1359         * html/HTMLMediaElement.idl:
1360
1361 2014-02-14  Oliver Hunt  <oliver@apple.com>
1362
1363         Implement a few more Array prototype functions in JS
1364         https://bugs.webkit.org/show_bug.cgi?id=128788
1365
1366         Reviewed by Gavin Barraclough.
1367
1368         Minor change to ensure that the inspector is treating builtins
1369         as host functions.
1370
1371         Tests: js/regress/array-prototype-filter.html
1372                js/regress/array-prototype-forEach.html
1373                js/regress/array-prototype-map.html
1374                js/regress/array-prototype-some.html
1375
1376         * inspector/InspectorDOMAgent.cpp:
1377         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
1378           Make sure we treat builtins as regular host functions
1379
1380 2014-02-14  Beth Dakin  <bdakin@apple.com>
1381
1382         Margin tiles are not created for the top and left sides when there is a < 1.0 
1383         scale factor
1384         https://bugs.webkit.org/show_bug.cgi?id=128842
1385
1386         Reviewed by Simon Fraser.
1387
1388         floor the result of the computation whenever we have a negative origin, to ensure 
1389         that we are rounding 'up' to a larger number of tiles. 
1390         * platform/graphics/ca/mac/TileController.mm:
1391         (WebCore::TileController::getTileIndexRangeForRect):
1392
1393 2014-02-13  Ryosuke Niwa  <rniwa@webkit.org>
1394
1395         setSelection should not synchronously trigger layout
1396         https://bugs.webkit.org/show_bug.cgi?id=128797
1397
1398         Reviewed by Antti Koivisto.
1399
1400         Only update the appearance and reveal selection when the style and the layout is already up to date.
1401         Otherwise, do so in performPostLayoutTasks.
1402
1403         * editing/FrameSelection.cpp:
1404         (WebCore::FrameSelection::FrameSelection):
1405         (WebCore::FrameSelection::setSelection): Set m_pendingSelectionUpdate and synchronously update caret rect
1406         if we don't need to update style or layout.
1407         (WebCore::updateSelectionByUpdatingLayoutOrStyle): Added. Used by FrameSelection member functions to
1408         trigger layout or style recalc whichever is needed.
1409         (WebCore::FrameSelection::updateAndRevealSelection): Extracted from setSelection.
1410         (WebCore::FrameSelection::absoluteCaretBounds): Call updateSelectionByUpdatingLayoutOrStyle since caret rect
1411         is no longer updated synchronously in setSelection.
1412         (WebCore::FrameSelection::recomputeCaretRect): Don't assert that visibleStart().absoluteCaretBounds() is
1413         equal to m_absCaretBounds since selection may no longer be caret at this point.
1414         (WebCore::FrameSelection::setCaretVisibility): Call updateSelectionByUpdatingLayoutOrStyle since we're
1415         synchronously calling into updateAppearance here. In the future, we should make this asynchronous as well.
1416         (WebCore::FrameSelection::selectionBounds): Call updateSelectionByUpdatingLayoutOrStyle since selection bounds
1417         could be outdated. This code only triggering style recalc was presumably a bug.
1418         * editing/FrameSelection.h:
1419
1420         * page/FrameView.cpp:
1421         (WebCore::FrameView::performPostLayoutTasks): Update selection's appearance and scroll to reveal selection
1422         as needed.
1423
1424 2014-02-14  Andreas Kling  <akling@apple.com>
1425
1426         Purge remaining ENABLE(SHADOW_DOM) cruft.
1427         <https://webkit.org/b/128827>
1428
1429         Remove the remaining 8.8 million lines of Shadow DOM code to align
1430         with goals for intent to ship 60fps on mobile in 2014.
1431
1432         Reviewed by Antti Koivisto.
1433
1434 2014-02-13  Jer Noble  <jer.noble@apple.com>
1435
1436         [MediaControls][iOS] Embedded YouTube does not show a 'paused' button state after starting
1437         https://bugs.webkit.org/show_bug.cgi?id=128755
1438
1439         Reviewed by Eric Carlson.
1440
1441         Don't rely on "canPlay()", instead, take the information directly from the event itself. I.e., when
1442         handling the 'play' event, switch mode to playing, and vice versa for the 'pause' event.
1443
1444         * Modules/mediacontrols/mediaControlsApple.js:
1445         (Controller.prototype.handlePlay):
1446         (Controller.prototype.handlePause):
1447         (Controller.prototype.updatePlaying):
1448         (Controller.prototype.setPlaying):
1449
1450 2014-02-13  Jer Noble  <jer.noble@apple.com>
1451
1452         [MediaControls][iOS] Start playback button is visible when playing embedded YouTube
1453         https://bugs.webkit.org/show_bug.cgi?id=128754
1454
1455         Reviewed by Eric Carlson.
1456
1457         Update shouldHaveStartPlaybackButton to match the behavior of the plugin proxy.
1458
1459         Add a accessor to determine whether playback has been requested:
1460         * Modules/mediacontrols/MediaControlsHost.cpp:
1461         (WebCore::MediaControlsHost::userGestureRequired):
1462         * Modules/mediacontrols/MediaControlsHost.h:
1463         * Modules/mediacontrols/MediaControlsHost.idl:
1464
1465         Update the logic of shouldHaveStartPlaybackButton.
1466         * Modules/mediacontrols/mediaControlsiOS.js:
1467         (ControllerIOS.prototype.shouldHaveStartPlaybackButton):
1468
1469 2014-02-13  Jer Noble  <jer.noble@apple.com>
1470
1471         [MediaControls] Add support for a loading progress meter
1472         https://bugs.webkit.org/show_bug.cgi?id=128651
1473
1474         Reviewed by Eric Carlson.
1475
1476         Draw the loaded ranges underneath the timeline slider. Use a -webkit-canvas()
1477         CSS function to allow the track of the slider to reflect the current state of
1478         the video's loadedTimeRanges property.
1479
1480         Since -webkit-canvas() will share a backing store with all other CSS images using
1481         the same identifier, use a monotonically increasing identifier to uniquely identify the timeline on a per-document basis.
1482
1483         * Modules/mediacontrols/mediaControlsApple.css:
1484         (audio::-webkit-media-controls-timeline):
1485         * Modules/mediacontrols/mediaControlsApple.js:
1486         (Controller): Call updateProgress().
1487         (Controller.prototype.createControls): Set up the canvas style and identifier.
1488         (Controller.prototype.handleLoadStart): Call updateProgress().
1489         (Controller.prototype.handleStalled): Ditto.
1490         (Controller.prototype.handleReadyStateChange): Ditto.
1491         (Controller.prototype.handleDurationChange): Ditto.
1492         (Controller.prototype.handleProgress): Ditto.
1493         (Controller.prototype.progressFillStyle): Added an easily overridable method
1494             to determine the fill color of the progress bar.
1495         (Controller.prototype.updateProgress): Draw the loadedTimeRanges into the timeline slider.
1496         * Modules/mediacontrols/mediaControlsiOS.js:
1497         (ControllerIOS.prototype.progressFillStyle): Override.
1498
1499 2014-02-14  Benjamin Poulain  <benjamin@webkit.org>
1500
1501         Clean up JSDOMStringMap::deleteProperty
1502         https://bugs.webkit.org/show_bug.cgi?id=128801
1503
1504         Reviewed by Geoffrey Garen.
1505
1506         Follow up on my cleaning of JSDOMStringMapCustom, this time for deletion.
1507
1508         Previously, we would query for the name, then call deleteItem() if the name was
1509         found. Instead, everything is moved to deleteItem which then return if the deletion
1510         is successful or not.
1511
1512         By using convertPropertyNameToAttributeName, we can use Element::hasAttribute() directly
1513         to find if the attribute exists or not. If it exists, we remove it.
1514
1515         Theoretically we could have a single pass over the attributes to find->delete but this
1516         code is not hot enough to justify anything fancy at this point.
1517
1518         Finally, we no longer check for isValidPropertyName() on deletion. JSDOMStringMapCustom
1519         was the last client of DatasetDOMStringMap::deleteItem() and it could not call deleteItem()
1520         with invalid name since the name would have failed DatasetDOMStringMap::contains().
1521         The spec does not specify any name checking either for deletion so we are safe just ignoring
1522         invalid input.
1523
1524         * bindings/js/JSDOMStringMapCustom.cpp:
1525         (WebCore::JSDOMStringMap::deleteProperty):
1526         * dom/DatasetDOMStringMap.cpp:
1527         (WebCore::DatasetDOMStringMap::deleteItem):
1528         * dom/DatasetDOMStringMap.h:
1529
1530 2014-02-14  Benjamin Poulain  <bpoulain@apple.com>
1531
1532         Improve the performance on mobile of FTPDirectoryDocument
1533         https://bugs.webkit.org/show_bug.cgi?id=128778
1534
1535         Reviewed by Antti Koivisto.
1536
1537         Little cleanup.
1538
1539         * html/FTPDirectoryDocument.cpp:
1540         (WebCore::FTPDirectoryDocumentParser::appendEntry):
1541         (WebCore::FTPDirectoryDocumentParser::createTDForFilename):
1542         (WebCore::processFilesizeString):
1543         (WebCore::wasLastDayOfMonth):
1544         (WebCore::processFileDateString):
1545         (WebCore::FTPDirectoryDocumentParser::parseAndAppendOneLine):
1546         (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
1547         (WebCore::FTPDirectoryDocumentParser::createBasicDocument):
1548
1549 2014-02-14  Benjamin Poulain  <benjamin@webkit.org>
1550
1551         Do not attempt to synchronize attributes when no Simple Selector could match an animatable attribute
1552         https://bugs.webkit.org/show_bug.cgi?id=128728
1553
1554         Reviewed by Andreas Kling.
1555
1556         In most cases, we don't even need to test for the flag animatedSVGAttributesNotDirty.
1557         If the selector filter could never match an animatable attribute, there is no point in testing for one.
1558
1559         * cssjit/SelectorCompiler.cpp:
1560         (WebCore::SelectorCompiler::canMatchStyleAttribute):
1561         Skip the second test when the local name is equal to canonicalLocalName. That is the common case.
1562
1563         (WebCore::SelectorCompiler::canMatchAnimatableSVGAttribute):
1564         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributesMatching):
1565
1566         * svg/SVGElement.cpp:
1567         (WebCore::addQualifiedName):
1568         (WebCore::SVGElement::animatableAttributeForName):
1569         (WebCore::SVGElement::isAnimatableAttribute):
1570         (WebCore::SVGElement::filterOutAnimatableAttribute):
1571         * svg/SVGElement.h:
1572         * svg/SVGScriptElement.cpp:
1573         (WebCore::SVGScriptElement::filterOutAnimatableAttribute):
1574         * svg/SVGScriptElement.h:
1575         Move the list of animatable attribute to a static function available in Release.
1576         Selector matching is a lot more flexible than normal name matching. Since the local name must
1577         always match, it is used as a key to get the full QualifiedName to compare to the selector.
1578
1579         Separating the list of animatable attributes between Selectors and SVGElement::isAnimatableAttribute
1580         would be error prone. Instead, SVGElement::isAnimatableAttribute() is modified to use
1581         SVGElement::animatableAttributeForName so that the two never get out of sync.
1582
1583         Since SVGScriptElement has one additional restriction to isAnimatableAttribute(), the function
1584         filterOutAnimatableAttribute() is added to remove a qualified name from the complete list of animatable attributes.
1585         This ensure SVGElement::animatableAttributeForName() always has the complete list, and subclasses of SVGElement
1586         can only remove QualifiedNames, not add them.
1587
1588 2014-02-14  Benjamin Poulain  <benjamin@webkit.org>
1589
1590         Make code generation of the unoptimized pseudo classes separate
1591         https://bugs.webkit.org/show_bug.cgi?id=128704
1592
1593         Reviewed by Andreas Kling.
1594
1595         Mapping the unoptimized selectors when generating the code was useful for debugging
1596         but those cases are so common that looping over unoptimizedPseudoCheckers was more
1597         costly than anticipated.
1598
1599         This patch moves the unoptimized pseudo selector in their own array to simplify code generation.
1600
1601         * cssjit/SelectorCompiler.cpp:
1602         (WebCore::SelectorCompiler::addPseudoType):
1603         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
1604         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
1605
1606 2014-02-14  Myles C. Maxfield  <mmaxfield@apple.com>
1607
1608         Implement text-decoration-skip: auto
1609         https://bugs.webkit.org/show_bug.cgi?id=128786
1610
1611         Reviewed by Dean Jackson.
1612
1613         http://lists.w3.org/Archives/Public/www-style/2014Feb/0485.html
1614         We are updating the initial value of text-decoration-skip to a new value, "auto".
1615         On Mac + iOS, this will have the same behavior as "skip".
1616
1617         Test: fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-default.html
1618
1619         * css/CSSComputedStyleDeclaration.cpp:
1620         (WebCore::renderTextDecorationSkipFlagsToCSSValue):
1621         * css/CSSParser.cpp:
1622         (WebCore::CSSParser::parseTextDecorationSkip):
1623         * css/DeprecatedStyleBuilder.cpp:
1624         (WebCore::valueToDecorationSkip):
1625         * rendering/InlineTextBox.cpp:
1626         (WebCore::InlineTextBox::paintDecoration):
1627         * rendering/style/RenderStyle.h:
1628         * rendering/style/RenderStyleConstants.h:
1629
1630 2014-02-13  Simon Fraser  <simon.fraser@apple.com>
1631
1632         Give ScrollingTree(State)Nodes a reference to another layer, which is used for moving overflow:scroll contents around
1633         https://bugs.webkit.org/show_bug.cgi?id=128790
1634
1635         Reviewed by Beth Dakin.
1636
1637         Have scrolling tree nodes and state nodes track another layer, the
1638         "scrolled contents layer", for accelerated overflow:scroll.
1639         
1640         When making ScrollingTreeScrollingNodes for overflow:scroll, the node's
1641         layer will point to the composited element's primary layer, and its
1642         scrolledContentsLayer to the layer that gets moved around by scrolling.
1643         
1644         Do some other cleanup on AsyncScrollingCoordinator, removing
1645         functions that just called through to nodes.
1646
1647         * WebCore.exp.in:
1648         * page/scrolling/AsyncScrollingCoordinator.cpp:
1649         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
1650         (WebCore::AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged):
1651         (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
1652         (WebCore::AsyncScrollingCoordinator::updateScrollingNode):
1653         (WebCore::AsyncScrollingCoordinator::updateViewportConstrainedNode):
1654         (WebCore::AsyncScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView):
1655         * page/scrolling/AsyncScrollingCoordinator.h:
1656         * page/scrolling/ScrollingCoordinator.h:
1657         (WebCore::ScrollingCoordinator::updateScrollingNode):
1658         * page/scrolling/ScrollingStateScrollingNode.cpp:
1659         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
1660         (WebCore::ScrollingStateScrollingNode::setScrolledContentsLayer):
1661         (WebCore::ScrollingStateScrollingNode::setCounterScrollingLayer):
1662         (WebCore::ScrollingStateScrollingNode::setHeaderLayer):
1663         (WebCore::ScrollingStateScrollingNode::setFooterLayer):
1664         * page/scrolling/ScrollingStateScrollingNode.h:
1665         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h:
1666         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm:
1667         (WebCore::ScrollingTreeScrollingNodeIOS::updateBeforeChildren):
1668         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
1669         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
1670         (WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
1671         * rendering/RenderLayerCompositor.cpp:
1672         (WebCore::RenderLayerCompositor::fixedRootBackgroundLayerChanged):
1673
1674 2014-02-14  Chris Fleizach  <cfleizach@apple.com>
1675
1676         AX: WebKit needs heuristics to differentiate lists used for layout from semantic data lists, similar to the heuristics for layout tables versus data tables.
1677         https://bugs.webkit.org/show_bug.cgi?id=122320
1678
1679         Reviewed by Mario Sanchez Prada.
1680
1681         Many authors use lists for layout, rather than presenting data. Exposing these kinds of lists to accessibility users
1682         makes the web harder to process and listen, while degrading the importance of real lists.
1683
1684         This introduces heuristics to filter out layout lists with the following:
1685            1. If it's a named list, like ol or aria=list, then it's a list.
1686              1a. Unless the list has no children, then it's not a list.
1687            2. If it displays visible list markers, it's a list.
1688            3. If it does not display list markers and has only one child, it's not a list.
1689            4. If it does not have any listitem children, it's not a list.
1690            5. Otherwise it's a list (for now).
1691
1692         Test: accessibility/list-detection.html
1693
1694         * accessibility/AccessibilityList.cpp:
1695         (WebCore::AccessibilityList::determineAccessibilityRole):
1696         (WebCore::AccessibilityList::roleValue):
1697         * accessibility/AccessibilityList.h:
1698
1699 2014-02-14  Brendan Long  <b.long@cablelabs.com>
1700
1701         Use AtomicString arguments in TrackPrivateBaseClient callbacks
1702         https://bugs.webkit.org/show_bug.cgi?id=128765
1703
1704         Reviewed by Eric Carlson.
1705
1706         No new tests because this doesn't change functionality.
1707
1708         * html/track/AudioTrack.cpp:
1709         (WebCore::AudioTrack::idChanged):
1710         (WebCore::AudioTrack::labelChanged):
1711         (WebCore::AudioTrack::languageChanged):
1712         * html/track/AudioTrack.h:
1713         * html/track/InbandTextTrack.cpp:
1714         (WebCore::InbandTextTrack::InbandTextTrack):
1715         (WebCore::InbandTextTrack::idChanged):
1716         (WebCore::InbandTextTrack::labelChanged):
1717         (WebCore::InbandTextTrack::languageChanged):
1718         * html/track/InbandTextTrack.h:
1719         * html/track/VideoTrack.cpp:
1720         (WebCore::VideoTrack::idChanged):
1721         (WebCore::VideoTrack::labelChanged):
1722         (WebCore::VideoTrack::languageChanged):
1723         * html/track/VideoTrack.h:
1724         * platform/graphics/TrackPrivateBase.h:
1725
1726 2014-02-14  Renata Hodovan  <rhodovan.u-szeged@partner.samsung.com>
1727
1728         ASSERTION FAILED: comparePositions(newEnd, newStart) >= 0 in WebCore::ApplyStyleCommand::updateStartEnd
1729         https://bugs.webkit.org/show_bug.cgi?id=121791
1730
1731         Reviewed by Darin Adler.
1732
1733         If WebCore::ApplyStyleCommand::applyBlockStyle() creates a TextIterator for a range
1734         that has an element with ReplacedElement rendering object, then a ',' is emitted in the
1735         constructor of TextIterator. Due to this comma the end of the run range can be at the
1736         wrong position, what makes the assertion fire. This situation can be handled the same
1737         way in TextIterator::rangeFromLocationAndLength() as we do in case of the emitted '\n's.
1738
1739         Test: editing/execCommand/remove-formatting-from-iframe-in-button.html
1740
1741         * editing/TextIterator.cpp:
1742         (WebCore::TextIterator::rangeFromLocationAndLength):
1743
1744 2014-02-14  Andrei Bucur  <abucur@adobe.com>
1745
1746         [CSS Regions] visibility: hidden on a region should hide its content
1747         https://bugs.webkit.org/show_bug.cgi?id=128814
1748
1749         Reviewed by Mihnea Ovidenie.
1750
1751         The patch properly checks that the content of a region layer should be painted before actually
1752         calling the paint function (for example, when visibility: hidden is specified on a region, its
1753         content should be hidden).
1754
1755         Test: fast/regions/visibility-hidden.html
1756
1757         * rendering/RenderLayer.cpp:
1758         (WebCore::RenderLayer::paintLayerContents):
1759
1760 2014-02-14  László Langó  <llango.u-szeged@partner.samsung.com>
1761
1762         Follow-up fix after r164036.
1763
1764         Reviewed by Csaba Osztrogonác.
1765
1766         * dom/Document.cpp:
1767         (WebCore::Document::create):
1768
1769 2014-02-13  Byungseon Shin  <sun.shin@lge.com>
1770
1771         [MSE] Move PublicURLManager shutdown logic so ActiveDOMObjects associated with public URLs won't leak.
1772         https://bugs.webkit.org/show_bug.cgi?id=128532
1773
1774         Reviewed by Jer Noble.
1775
1776         This fixes a leak of DOM objects by breaking the circular reference 
1777         between Document, PublicURLManager, and MediaSource. 
1778         Instead of clearing PublicURLManager at destruction-time, 
1779         which is delayed indefinitely because of the circular reference, 
1780         clear the PublicURLManager during ActiveDOMObject::stop().
1781
1782         Frome Blink r151890 by <acolwell@chromium.org>
1783         <https://src.chromium.org/viewvc/blink?view=rev&revision=151890>
1784
1785         * dom/ScriptExecutionContext.cpp:
1786         (WebCore::ScriptExecutionContext::~ScriptExecutionContext):
1787         (WebCore::ScriptExecutionContext::publicURLManager):
1788         * html/DOMURL.h:
1789         * html/PublicURLManager.cpp:
1790         (WebCore::PublicURLManager::create):
1791         (WebCore::PublicURLManager::PublicURLManager):
1792         (WebCore::PublicURLManager::registerURL):
1793         (WebCore::PublicURLManager::stop):
1794         * html/PublicURLManager.h:
1795
1796 2014-02-13  Myles C. Maxfield  <mmaxfield@apple.com>
1797
1798         Remove position:sticky runtime flag
1799         https://bugs.webkit.org/show_bug.cgi?id=128774
1800
1801         Reviewed by Simon Fraser.
1802
1803         Rollout of r128663
1804
1805         No new tests are necessary because there is no behavior change.
1806
1807         * css/CSSParser.cpp:
1808         (WebCore::CSSParserContext::CSSParserContext):
1809         (WebCore::operator==):
1810         (WebCore::isValidKeywordPropertyAndValue):
1811         * css/CSSParserMode.h:
1812         * dom/Document.cpp:
1813         * dom/Document.h:
1814         * page/Settings.cpp:
1815         (WebCore::Settings::Settings):
1816         * page/Settings.h:
1817
1818 2014-02-04  Gustavo Noronha Silva  <gns@gnome.org>
1819
1820         [GTK][CMake] Generate GObject DOM bindings .symbols files
1821         https://bugs.webkit.org/show_bug.cgi?id=126210
1822
1823         Reviewed by Martin Robinson.
1824
1825         No new tests. Build change only.
1826
1827         * CMakeLists.txt: list Quota module files and IDLs even if the feature
1828         is disabled, for GTK, since we rely on that for our DOM bindings.
1829         * PlatformGTK.cmake: add a new target to check for DOM symbols API by
1830         running the new python script.
1831         * bindings/gobject/GNUmakefile.am: call the new python script instead
1832         of using a custom rule.
1833
1834 2014-02-13  Myles C. Maxfield  <mmaxfield@apple.com>
1835
1836         text-decoration-skip: ink skips randomly when using SVG fonts
1837         https://bugs.webkit.org/show_bug.cgi?id=128709
1838
1839         Reviewed by Simon Fraser.
1840
1841         This patch simply disables skipping underlines being used with SVG fonts.
1842         It's a stopgap until we can support skipping properly with SVG fonts.
1843
1844         Test: svg/custom/svg-fonts-skip-ink.html
1845
1846         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1847         (WebCore::FontPlatformData::ctFont):
1848         * platform/graphics/mac/FontMac.mm:
1849         (WebCore::Font::dashesForIntersectionsWithRect):
1850
1851 2014-02-13  Daniel Bates  <dabates@apple.com>
1852
1853         Fix the ARM build when HAVE_ARM_NEON_INTRINSICS is enabled
1854
1855         Add !HAVE(ARM_NEON_INTRINSICS)-guard around file-level inline function arithmeticSoftware to
1856         avoid an unused function compiler warning when building with ARM Neon intrinsics.
1857
1858         * platform/graphics/filters/FEComposite.cpp:
1859
1860 2014-02-13  Brady Eidson  <beidson@apple.com>
1861
1862         IDB: Three tests crash the DatabaseProcess under ~KeyedDecoder
1863         https://bugs.webkit.org/show_bug.cgi?id=128763
1864
1865         Reviewed by Anders Carlsson.
1866
1867         No new tests (Covered by three existing tests)
1868
1869         * platform/KeyedCoding.h:
1870         (WebCore::KeyedEncoder::encodeObjects): If the array is empty we still have to begin() and end() it.
1871
1872 2014-02-13  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>
1873
1874         [css3-text] Support -webkit-text-decoration-skip: objects
1875         https://bugs.webkit.org/show_bug.cgi?id=128723
1876
1877         Reviewed by Dean Jackson.
1878
1879         Implemented 'objects' value of text-decoration-skip.
1880         http://www.w3.org/TR/2013/CR-css-text-decor-3-20130801/#text-decoration-skip
1881
1882         This is initial value and same behavior without
1883         ENABLE_CSS3_TEXT_DECORATION_SKIP_INK flag. Threfore, this patch only
1884         added parser code and constant for 'objects'.
1885
1886         Changed the initial value of text-decoration-skip.
1887
1888         The current implementation parses 'none', but the rendering code is
1889         not match the spec, so this patch added FIXME to the rendering code.
1890
1891         * css/CSSComputedStyleDeclaration.cpp:
1892         (WebCore::renderTextDecorationSkipFlagsToCSSValue):
1893         * css/CSSParser.cpp:
1894         (WebCore::CSSParser::parseTextDecorationSkip):
1895         * css/CSSValueKeywords.in:
1896         * css/DeprecatedStyleBuilder.cpp:
1897         (WebCore::valueToDecorationSkip):
1898         * rendering/InlineTextBox.cpp:
1899         (WebCore::InlineTextBox::paintDecoration):
1900         * rendering/style/RenderStyle.h:
1901         * rendering/style/RenderStyleConstants.h:
1902
1903 2014-02-13  Daniel Bates  <dabates@apple.com>
1904
1905         Fix ARM NEON build following <http://trac.webkit.org/changeset/164058>
1906         (https://bugs.webkit.org/show_bug.cgi?id=128767)
1907
1908         I inadvertently didn't include header NEONHelpers.h, which defines WebCore::loadRGBA8AsFloat().
1909
1910         * platform/graphics/cpu/arm/filters/FECompositeArithmeticNEON.h:
1911
1912 2014-02-13  Daniel Bates  <dabates@apple.com>
1913
1914         Write FEComposite::computeArithmeticPixelsNeon() in terms of loadRGBA8AsFloat()
1915         https://bugs.webkit.org/show_bug.cgi?id=128767
1916
1917         Reviewed by Dean Jackson.
1918
1919         This patch was inspired by Gabor Rapcsanyi's work in <https://bugs.webkit.org/show_bug.cgi?id=90669>.
1920
1921         Currently we duplicate code in FEComposite::computeArithmeticPixelsNeon() to read pixel data.
1922         Instead we should use the convenience function WebCore::loadRGBA8AsFloat. This also resolves
1923         an uninitialized variable compiler warning in the existing code.
1924
1925         * platform/graphics/cpu/arm/filters/FECompositeArithmeticNEON.h:
1926         (WebCore::FEComposite::computeArithmeticPixelsNeon):
1927
1928 2014-02-13  Myles C. Maxfield  <mmaxfield@apple.com>
1929
1930         During a copy, position:fixed gets converted to position:absolute even if only part of the document is selected
1931         https://bugs.webkit.org/show_bug.cgi?id=128688
1932
1933         Reviewed by Ryosuke Niwa.
1934
1935         Adds a field, m_needsPositionStyleConversion, to StyledMarkupAccumulator.
1936
1937         Also, renames the ConvertPositionStyleOnCopy setting to ShouldConvertPositionStyleOnCopy
1938
1939         Test: editing/pasteboard/copy-paste-doesnt-convert-sticky-and-fixed-during-partial-copy.html
1940
1941         * editing/markup.cpp:
1942         (WebCore::StyledMarkupAccumulator::StyledMarkupAccumulator):
1943         (WebCore::StyledMarkupAccumulator::appendElement):
1944         (WebCore::createMarkupInternal):
1945         * page/Settings.in:
1946         * testing/InternalSettings.cpp:
1947         (WebCore::InternalSettings::Backup::Backup):
1948         (WebCore::InternalSettings::Backup::restoreTo):
1949         (WebCore::InternalSettings::setShouldConvertPositionStyleOnCopy):
1950         * testing/InternalSettings.h:
1951         * testing/InternalSettings.idl:
1952
1953 2014-02-12  Timothy Hatcher  <timothy@apple.com>
1954
1955         Enable inspection of recently used IndexedDB databases.
1956
1957         https://bugs.webkit.org/show_bug.cgi?id=128687
1958
1959         Reviewed by Brady Eidson & Joseph Pecoraro.
1960
1961         * Modules/indexeddb/IDBFactory.cpp:
1962         (WebCore::IDBFactory::getDatabaseNames):
1963         * Modules/indexeddb/IDBFactoryBackendInterface.h:
1964         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
1965         (WebCore::IDBFactoryBackendLevelDB::getDatabaseNames):
1966         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
1967         Fix up the arguments passed to getDatabaseNames.
1968
1969         * WebCore.xcodeproj/project.pbxproj:
1970         Make DOMStringList.h private so WebKit2 can use it.
1971
1972         * inspector/InspectorIndexedDBAgent.cpp:
1973         Modernize the loops and remove some PLATFORM(COCOA) ifdefs to
1974         compile the code. 
1975
1976         * inspector/protocol/IndexedDB.json: Use number for version to
1977         allow larger values instead of clamping to int.
1978
1979 2014-02-13  Chang Shu  <cshu@webkit.org>
1980
1981         Copying (createMarkup) wrapping text results in space between wrapped lines stripped.
1982         https://bugs.webkit.org/show_bug.cgi?id=63233
1983
1984         The problem is StyledMarkupAccumulator uses renderedText and the space at
1985         the end of the text has been stripped when the tag after the text was wrapped.
1986
1987         Reviewed by Ryosuke Niwa.
1988
1989         Test: editing/pasteboard/copy-text-with-wrapped-tag.html
1990
1991         * editing/TextIterator.cpp:
1992         (WebCore::TextIterator::TextIterator):
1993         (WebCore::TextIterator::handleTextBox):
1994         * editing/TextIterator.h:
1995         Check the special case when the iterator runs over a range that is followed by a non-text box.
1996         In this case, the possible last space has been collapsed and needs to be restored.
1997         * editing/markup.cpp:
1998         (WebCore::StyledMarkupAccumulator::renderedText):
1999         Check if the range is followed by more nodes and pass this information to the constructed TextIterator.
2000
2001 2014-02-13  Myles C. Maxfield  <mmaxfield@apple.com>
2002
2003         Gaps for text-decoration-skip: ink are calculated assuming the glyph orientation is the same as the run orientation
2004         https://bugs.webkit.org/show_bug.cgi?id=128718
2005
2006         Reviewed by Darin Adler.
2007
2008         This is a stop-gap patch to make underlines in CJK text not look terrible. A long-term fix is to refactor
2009         showGlyphsWithAdvances to move rotation logic into a common place that the text-decoration-skip: ink code
2010         can use.
2011
2012         Test: fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-orientation-upright.html
2013
2014         * rendering/InlineTextBox.cpp:
2015         (WebCore::InlineTextBox::paintDecoration):
2016
2017 2014-02-13  Andreas Kling  <akling@apple.com>
2018
2019         InsertIntoTextNodeCommand should get Settings from the Frame.
2020         <https://webkit.org/b/128678>
2021
2022         EditCommands have a frame() accessor that returns a reference,
2023         so there's no need to go through Document.
2024
2025         Reviewed by Anders Carlsson.
2026
2027         * editing/InsertIntoTextNodeCommand.cpp:
2028         (WebCore::InsertIntoTextNodeCommand::doApply):
2029
2030 2014-02-13  László Langó  <llango.u-szeged@partner.samsung.com>
2031
2032         Document should be constructable
2033         https://bugs.webkit.org/show_bug.cgi?id=115643
2034
2035         Reviewed by Darin Adler.
2036
2037         http://www.w3.org/TR/2014/WD-dom-20140204/#interface-document
2038         Make Document constructable so that one can do "new Document"
2039         instead of "document.implementation.createHTMLDocument('')".
2040
2041         Test: fast/dom/Document/document-constructor.html
2042
2043         * dom/Document.cpp:
2044         (WebCore::Document::create):
2045         (WebCore::Document::origin):
2046         * dom/Document.h:
2047         * dom/Document.idl:
2048
2049 2014-02-13  Javier Fernandez  <jfernandez@igalia.com>
2050
2051         [CSS Grid Layout] Rename named areas property
2052         https://bugs.webkit.org/show_bug.cgi?id=127990
2053
2054         Reviewed by Sergio Villar Senin.
2055
2056         From Blink r165891 by <rego@igalia.com>
2057
2058         The property 'grid-template' has been renamed to 'grid-template-areas'
2059         in the last two versions of the spec.
2060
2061         * CMakeLists.txt:
2062         * GNUmakefile.list.am:
2063         * WebCore.vcxproj/WebCore.vcxproj:
2064         * WebCore.vcxproj/WebCore.vcxproj.filters:
2065         * WebCore.xcodeproj/project.pbxproj:
2066         * css/CSSComputedStyleDeclaration.cpp:
2067         (WebCore::ComputedStyleExtractor::propertyValue):
2068         * css/CSSGridTemplateAreasValue.cpp: Renamed from Source/WebCore/css/CSSGridTemplateValue.cpp.
2069         (WebCore::CSSGridTemplateAreasValue::CSSGridTemplateAreasValue):
2070         (WebCore::stringForPosition):
2071         (WebCore::CSSGridTemplateAreasValue::customCSSText):
2072         * css/CSSGridTemplateAreasValue.h: Renamed from Source/WebCore/css/CSSGridTemplateValue.h.
2073         (WebCore::CSSGridTemplateAreasValue::create):
2074         (WebCore::CSSGridTemplateAreasValue::~CSSGridTemplateAreasValue):
2075         (WebCore::CSSGridTemplateAreasValue::gridAreaMap):
2076         (WebCore::CSSGridTemplateAreasValue::rowCount):
2077         (WebCore::CSSGridTemplateAreasValue::columnCount):
2078         * css/CSSParser.cpp:
2079         (WebCore::CSSParser::parseValue):
2080         (WebCore::CSSParser::parseGridTemplateAreas):
2081         * css/CSSParser.h:
2082         * css/CSSPropertyNames.in:
2083         * css/CSSValue.cpp:
2084         (WebCore::CSSValue::equals):
2085         (WebCore::CSSValue::cssText):
2086         (WebCore::CSSValue::destroy):
2087         * css/CSSValue.h:
2088         (WebCore::CSSValue::isGridTemplateAreasValue):
2089         * css/StyleResolver.cpp:
2090         (WebCore::StyleResolver::applyProperty):
2091
2092 2014-02-13  Adrian Bunk  <bunk@stusta.de>
2093
2094         Remove the last remnants of Maemo support
2095         https://bugs.webkit.org/show_bug.cgi?id=85238
2096
2097         Reviewed by Ryosuke Niwa.
2098
2099         * plugins/npapi.h:
2100
2101 2014-02-13  ChangSeok Oh  <changseok.oh@collabora.com>
2102
2103         Support ANGLE_instanced_arrays for GLES backend.
2104         https://bugs.webkit.org/show_bug.cgi?id=128579
2105
2106         Reviewed by Dean Jackson.
2107
2108         Add some APIs to Extensions3D to support ANGLE_instanced_arrays for GLES backend.
2109         At the same time, drawArraysInstanced, drawElementsInstanced and vertexAttribDivisor
2110         are moved from GC3DOpenGL.cpp to GC3DOpenGLCommon.cpp since they could be shareable
2111         through Extensions3D.
2112
2113         Covered by fast/canvas/webgl/angle-instanced-arrays.html
2114
2115         * platform/graphics/Extensions3D.h:
2116         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
2117         (WebCore::Extensions3DOpenGL::drawArraysInstanced):
2118         (WebCore::Extensions3DOpenGL::drawElementsInstanced):
2119         (WebCore::Extensions3DOpenGL::vertexAttribDivisor):
2120         * platform/graphics/opengl/Extensions3DOpenGL.h:
2121         * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
2122         (WebCore::Extensions3DOpenGLES::Extensions3DOpenGLES):
2123         (WebCore::Extensions3DOpenGLES::drawArraysInstanced):
2124         (WebCore::Extensions3DOpenGLES::drawElementsInstanced):
2125         (WebCore::Extensions3DOpenGLES::vertexAttribDivisor):
2126         (WebCore::Extensions3DOpenGLES::supportsExtension):
2127         * platform/graphics/opengl/Extensions3DOpenGLES.h:
2128         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2129         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2130         (WebCore::GraphicsContext3D::drawArraysInstanced):
2131         (WebCore::GraphicsContext3D::drawElementsInstanced):
2132         (WebCore::GraphicsContext3D::vertexAttribDivisor):
2133         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
2134
2135 2014-02-13  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2136
2137         [GTK] MEDIA_CONTROLS_SCRIPT support
2138         https://bugs.webkit.org/show_bug.cgi?id=123097
2139
2140         Reviewed by Jer Noble.
2141
2142         WebKitGTK+ multimedia controls are now managed from Javascript
2143         code. Apple controls are kept as common code and GTK+ ones are
2144         subclassed for the specific behavior.
2145
2146         Both CMake and Autotools build support is provided.
2147
2148         * CMakeLists.txt: Added support to build the media controls
2149         script and their associated files.
2150         * GNUmakefile.am: Added support to generate the C++ code from the
2151         Javascript.
2152         * GNUmakefile.list.am: Added the media controls script associated
2153         files.
2154         * Modules/mediacontrols/MediaControlsHost.cpp:
2155         * Modules/mediacontrols/MediaControlsHost.h:
2156         * Modules/mediacontrols/MediaControlsHost.idl:
2157         (WebCore::MediaControlsHost::supportsFullscreen): Added attribute
2158         to know if the element supports fullscreen.
2159         * Modules/mediacontrols/mediaControlsApple.js:
2160         (Controller.prototype.handleWrapperMouseMove):
2161         (Controller.prototype.handleWrapperMouseOut):
2162         (Controller.prototype.updatePlaying): Use clear and
2163         resetHideControlsTimer.
2164         (Controller.prototype.clearHideControlsTimer): Added.
2165         (Controller.prototype.resetHideControlsTimer): Added.
2166         * Modules/mediacontrols/mediaControlsGtk.js: Added.
2167         (createControls): Calls ControllerGtk.
2168         (ControllerGtk): Calls the superclass.
2169         (contains): Defines a function to know if an object is contained
2170         in an array.
2171         (ControllerGtk.prototype.inheritFrom): Copies the method of the
2172         superclass that are not reimplemented in the subclass.
2173         (ControllerGtk.prototype.createControls): Calls the superclass and
2174         create the remaining needed elements.
2175         (ControllerGtk.prototype.configureInlineControls): Configures the
2176         controls.
2177         (ControllerGtk.prototype.setStatusHidden): Redefined empty.
2178         (ControllerGtk.prototype.updateTime): Writes the duration and
2179         current position. As it was so far, current time also includes
2180         duration. If current time is bigger than 0 we show that.
2181         (ControllerGtk.prototype.showCurrentTime): Shows current time and
2182         hides duration label (that is included in current time).
2183         (ControllerGtk.prototype.handlePlay): Calls the superclass and
2184         force showing the current time.
2185         (ControllerGtk.prototype.handleTimeUpdate): Always update the
2186         time.
2187         (ControllerGtk.prototype.handleMuteButtonMouseOver): Shows the
2188         volume slider.
2189         (ControllerGtk.prototype.handleVolumeBoxMouseOut): Hides the
2190         volume slider.
2191         (ControllerGtk.prototype.addControls): Adds the enclosure instead
2192         of the panel directly. Panel is, of course, part of the enclosure.
2193         (ControllerGtk.prototype.updateReadyState): Shows the fullscreen
2194         button only if fullscreen is supported. Sets the volume in up or
2195         down mode depending on its position in the document. Updates the
2196         volume.
2197         (ControllerGtk.prototype.setControlsType): Creates the controls it
2198         they were not created before. Unlike Apple ones, WebKitGTK+
2199         fullscreen and inline controls are the same.
2200         (ControllerGtk.prototype.updatePlaying): Calls the superclass and
2201         shows the controls if not playing.
2202         (ControllerGtk.prototype.handleCaptionButtonClicked): Redefined
2203         empty. To be coherent with volume, that also shows a popup, this
2204         is handled with mouseover instead of click.
2205         (ControllerGtk.prototype.buildCaptionMenu): Calls the superclass
2206         to build the menu, sets some listeners, centers the popup with the
2207         captions button, keeps the current height and sets the style to 0,
2208         which is needed to animate it.
2209         (ControllerGtk.prototype.destroyCaptionMenu): Hides the caption menu.
2210         (ControllerGtk.prototype.showCaptionMenu): Resets the height to
2211         its original. We don't animate it with CSS because we would need
2212         to specify a height in the style and we don't know it in advance.
2213         (ControllerGtk.prototype.hideCaptionMenu): Sets height to 0.
2214         (ControllerGtk.prototype.captionMenuTransitionEnd): When the
2215         captions menu transtition ends, it is destroyed.
2216         (ControllerGtk.prototype.handleCaptionButtonMouseOver): Creates
2217         the caption menu and shows it.
2218         (ControllerGtk.prototype.handleCaptionButtonMouseOut): Hides the
2219         captions menu.
2220         (ControllerGtk.prototype.handleCaptionMouseOut): Hides the
2221         captions menu.
2222         * PlatformGTK.cmake: Added WebCore to the target link libraries
2223         and initialized the variables needed at CMakelists.txt
2224         * css/mediaControlsGtk.css:
2225         (audio::-webkit-media-controls-panel)
2226         (video::-webkit-media-controls-panel): Added transtion based on opacity.
2227         (video::-webkit-media-controls-panel): Set video opacity to 0.
2228         (video::-webkit-media-controls-panel.paused): Set video opacity to 1.
2229         (audio::-webkit-media-controls-panel div.mute-box): Set the same
2230         style as the mute button to preserve the layout.
2231         (audio::-webkit-media-controls-panel div.mute-box.hidden): Sets
2232         the display to none.
2233         (audio::-webkit-media-controls-mute-button)
2234         (video::-webkit-media-controls-mute-button): Removed the outline
2235         and the margin that is managed by the mute box now.
2236         (audio::-webkit-media-controls-play-button)
2237         (video::-webkit-media-controls-play-button): Removed the outline.
2238         (audio::-webkit-media-controls-time-remaining-display)
2239         (video::-webkit-media-controls-time-remaining-display): Removed
2240         the display.
2241         (audio::-webkit-media-controls-current-time-display)
2242         (video::-webkit-media-controls-current-time-display): Added the
2243         display block.
2244         (video::-webkit-media-controls-time-remaining-display): Set
2245         display none.
2246         (video::-webkit-media-controls-time-remaining-display.show): Set
2247         display block.
2248         (video::-webkit-media-controls-time-remaining-display.hidden): Set
2249         display none.
2250         (audio::-webkit-media-controls-timeline)
2251         (video::-webkit-media-controls-timeline): Removed outline.
2252         (audio::-webkit-media-controls-volume-slider-container)
2253         (video::-webkit-media-controls-volume-slider-container): Set
2254         overflow hidden and set a transition by height.
2255         (video::-webkit-media-controls-volume-slider-container.hidden):
2256         Set height 0.
2257         (video::-webkit-media-controls-volume-slider-container.down): Set
2258         bottom to be below the panel. Changed the border radius and
2259         transition accordingly.
2260         (video::-webkit-media-controls-panel .hidden.down): Sets default
2261         bottom as 0.
2262         (audio::-webkit-media-controls-volume-slider)
2263         (video::-webkit-media-controls-volume-slider): Removed the outline.
2264         (audio::-webkit-media-controls-toggle-closed-captions-button)
2265         (video::-webkit-media-controls-toggle-closed-captions-button):
2266         Removed the background that is painted from C++ and removed the
2267         outline.
2268         (video::-webkit-media-controls-closed-captions-container):
2269         (video::-webkit-media-controls-closed-captions-container h3):
2270         (video::-webkit-media-controls-closed-captions-container ul):
2271         (video::-webkit-media-controls-closed-captions-container li):
2272         (video::-webkit-media-controls-closed-captions-container li.selected): Changed
2273         the style to make it more coherent with the rest of the controls.
2274         (audio::-webkit-media-controls-fullscreen-button)
2275         (video::-webkit-media-controls-fullscreen-button): Removed the outline.
2276         (audio::-webkit-media-controls-panel button.hidden): Sets the
2277         display to none.
2278         * html/HTMLMediaElement.cpp: UserAgentScripts.h is not needed here
2279         and build cmake build would need for changes to get this compiled.
2280         * platform/gtk/RenderThemeGtk.cpp:
2281         (WebCore::nodeHasPseudo): Added. Checks if a node has a certain
2282         pseudo.
2283         (WebCore::nodeHasClass): Added. Checks if a node has a certain
2284         class.
2285         (WebCore::supportsFocus): Removed some element types as outline is
2286         now handled in CSS.
2287         (WebCore::RenderThemeGtk::paintMediaPlayButton): Checks if the
2288         play button has the class paused to show the play icon instead of
2289         the pause one.
2290         (WebCore::RenderThemeGtk::paintMediaToggleClosedCaptionsButton):
2291         Added. Paints the captions icon.
2292         (WebCore::RenderThemeGtk::mediaControlsScript): Added. Loads the
2293         bundled scripts.
2294         * platform/gtk/RenderThemeGtk.h: Added the mediaControlsScript
2295         method and declared the redefinition of the method to play the
2296         captions icon.
2297
2298 2014-02-11  Alexey Proskuryakov  <ap@apple.com>
2299
2300         Don't crash when SerializedScriptValue deserialization fails
2301         https://bugs.webkit.org/show_bug.cgi?id=128657
2302
2303         Reviewed by Oliver Hunt.
2304
2305         Test: crypto/subtle/postMessage-worker.html
2306
2307         * bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::data): Added a FIXME.
2308
2309         * bindings/js/SerializedScriptValue.cpp:
2310         (WebCore::CloneBase::fail): Don't assert on failure.
2311         (WebCore::SerializedScriptValue::deserialize): Never return a null JSValue, these
2312         are not allowed.
2313
2314 2014-02-12  Bem Jones-Bey  <bjonesbe@adobe.com>
2315
2316         [CSS Shapes] Rename shapeSize and others to make ShapeInfo and friends easier to understand
2317         https://bugs.webkit.org/show_bug.cgi?id=128685
2318
2319         Reviewed by Alexandru Chiculita.
2320
2321         The ShapeInfo hierarchy has grown organically as the spec has changed,
2322         and the naming has become very stale and confusing. The spec is now in
2323         Last Call, so it seems like a good time to take a stab towards better
2324         naming that matches the spec terminology and is also more consistent
2325         in general.
2326
2327         No new tests, no behavior change.
2328
2329         * rendering/RenderBlock.cpp:
2330         (WebCore::RenderBlock::imageChanged): Use new names.
2331         (WebCore::RenderBlock::updateShapeInsideInfoAfterStyleChange): Ditto.
2332         (WebCore::shapeInfoRequiresRelayout): Ditto.
2333         (WebCore::RenderBlock::computeShapeSize): Ditto.
2334         (WebCore::RenderBlock::updateShapesAfterBlockLayout): Ditto.
2335         * rendering/RenderBlock.h:
2336         (WebCore::RenderBlock::logicalSizeForChild): This method makes it much
2337             cleaner to set the reference box size.
2338         * rendering/RenderBlockFlow.cpp:
2339         (WebCore::RenderBlockFlow::positionNewFloats): Use new names.
2340         * rendering/RenderBox.cpp:
2341         (WebCore::RenderBox::updateShapeOutsideInfoAfterStyleChange): Ditto.
2342         (WebCore::RenderBox::imageChanged): Ditto.
2343         * rendering/shapes/ShapeInfo.cpp:
2344         (WebCore::getShapeImageMarginRect): Rename variables.
2345         (WebCore::ShapeInfo<RenderType>::computedShape): More renames.
2346         * rendering/shapes/ShapeInfo.h:
2347         (WebCore::ShapeInfo::setReferenceBoxLogicalSize): Renamed from
2348             setShapeSize.
2349         (WebCore::ShapeInfo::logicalLineTop): Use new names.
2350         (WebCore::ShapeInfo::logicalLineBottom): Ditto.
2351         (WebCore::ShapeInfo::shapeContainingBlockLogicalHeight): Ditto.
2352         (WebCore::ShapeInfo::markShapeAsDirty): Renamed from dirtyShapeSize.
2353         (WebCore::ShapeInfo::isShapeDirty): Renamed from shapeSizeDirty.
2354         (WebCore::ShapeInfo::referenceBoxLogicalSize): Renamed from shapeSize.
2355         (WebCore::ShapeInfo::logicalTopOffset): Use new names.
2356         (WebCore::ShapeInfo::logicalLeftOffset): Ditto.
2357         * rendering/shapes/ShapeInsideInfo.cpp:
2358         (WebCore::ShapeInsideInfo::updateSegmentsForLine): Ditto.
2359         (WebCore::ShapeInsideInfo::adjustLogicalLineTop): Ditto.
2360         (WebCore::ShapeInsideInfo::computeFirstFitPositionForFloat): Ditto.
2361         * rendering/shapes/ShapeInsideInfo.h:
2362         * rendering/shapes/ShapeOutsideInfo.cpp:
2363         (WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine): Ditto.
2364         * rendering/shapes/ShapeOutsideInfo.h:
2365
2366 2014-02-12  Brent Fulgham  <bfulgham@apple.com>
2367
2368         REGRESSION: Crashing/Broken Tests Due To Unexpected 8-bit Character Data
2369         https://bugs.webkit.org/show_bug.cgi?id=128698
2370
2371         Reviewed by Tim Horton.
2372
2373         * platform/graphics/win/UniscribeController.cpp:
2374         (WebCore::UniscribeController::advance): Make 16-bit copy when needed.
2375         (WebCore::UniscribeController::shapeAndPlaceItem): Handle 8-bit case when checking
2376         for word boundaries.
2377
2378 2014-02-12  Benjamin Poulain  <bpoulain@apple.com>
2379
2380         Document::childrenChanged does not necessarily have a page
2381
2382         Rubber stamped by Enrica Casucci.
2383
2384         * dom/Document.cpp:
2385         (WebCore::Document::childrenChanged):
2386
2387 2014-02-12  Timothy Hatcher  <timothy@apple.com>
2388
2389         Add a missing ": " between the URL and exception in STDOUT logs.
2390
2391         https://bugs.webkit.org/show_bug.cgi?id=128689
2392
2393         Reviewed by Joseph Pecoraro.
2394
2395         * page/PageConsole.cpp:
2396         (WebCore::PageConsole::addMessage): Print ": " after calling
2397         printSourceURLAndPosition now that it does not print it for us.
2398
2399 2014-02-12  Enrica Casucci  <enrica@apple.com>
2400
2401         WK2: coordinate mapping for frames does not work when the page is scrolled.
2402         https://bugs.webkit.org/show_bug.cgi?id=128690
2403         <rdar://problem/16042925>
2404
2405         Reviewed by Simon Fraser.
2406
2407         We should not apply the scroll offset when using delegate scrolling.
2408
2409         * platform/ScrollView.cpp:
2410         (WebCore::ScrollView::rootViewToContents):
2411         (WebCore::ScrollView::contentsToRootView):
2412         (WebCore::ScrollView::rootViewToTotalContents):
2413
2414 2014-02-12  Joseph Pecoraro  <pecoraro@apple.com>
2415
2416         Web Inspector: Rename PageInjectedScript* to WebInjectedScript*
2417         https://bugs.webkit.org/show_bug.cgi?id=128660
2418
2419         Reviewed by Timothy Hatcher.
2420
2421         Rename the files update build systems and users.
2422
2423         * CMakeLists.txt:
2424         * GNUmakefile.list.am:
2425         * WebCore.vcxproj/WebCore.vcxproj:
2426         * WebCore.vcxproj/WebCore.vcxproj.filters:
2427         * WebCore.xcodeproj/project.pbxproj:
2428         * inspector/CommandLineAPIModule.cpp:
2429         (WebCore::CommandLineAPIModule::host):
2430         * inspector/InspectorAllInOne.cpp:
2431         * inspector/InspectorController.cpp:
2432         (WebCore::InspectorController::InspectorController):
2433         * inspector/InspectorController.h:
2434         * inspector/InspectorHeapProfilerAgent.cpp:
2435         (WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent):
2436         * inspector/InspectorHeapProfilerAgent.h:
2437         * inspector/InspectorProfilerAgent.cpp:
2438         (WebCore::PageProfilerAgent::PageProfilerAgent):
2439         (WebCore::InspectorProfilerAgent::create):
2440         (WebCore::WorkerProfilerAgent::WorkerProfilerAgent):
2441         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
2442         * inspector/InspectorProfilerAgent.h:
2443         * inspector/PageConsoleAgent.cpp:
2444         (WebCore::PageConsoleAgent::PageConsoleAgent):
2445         (WebCore::PageConsoleAgent::addInspectedNode):
2446         * inspector/PageConsoleAgent.h:
2447         * inspector/WebConsoleAgent.cpp:
2448         (WebCore::WebConsoleAgent::WebConsoleAgent):
2449         (WebCore::WebConsoleAgent::frameWindowDiscarded):
2450         (WebCore::WebConsoleAgent::addInspectedHeapObject):
2451         * inspector/WebConsoleAgent.h:
2452         * inspector/WebInjectedScriptHost.cpp: Renamed from Source/WebCore/inspector/PageInjectedScriptHost.cpp.
2453         (WebCore::WebInjectedScriptHost::type):
2454         (WebCore::WebInjectedScriptHost::isHTMLAllCollection):
2455         * inspector/WebInjectedScriptHost.h: Renamed from Source/WebCore/inspector/PageInjectedScriptHost.h.
2456         * inspector/WebInjectedScriptManager.cpp: Renamed from Source/WebCore/inspector/PageInjectedScriptManager.cpp.
2457         (WebCore::WebInjectedScriptManager::WebInjectedScriptManager):
2458         (WebCore::WebInjectedScriptManager::disconnect):
2459         (WebCore::WebInjectedScriptManager::didCreateInjectedScript):
2460         (WebCore::WebInjectedScriptManager::discardInjectedScriptsFor):
2461         * inspector/WebInjectedScriptManager.h: Renamed from Source/WebCore/inspector/PageInjectedScriptManager.h.
2462         * inspector/WorkerConsoleAgent.cpp:
2463         (WebCore::WorkerConsoleAgent::WorkerConsoleAgent):
2464         * inspector/WorkerConsoleAgent.h:
2465         * inspector/WorkerInspectorController.cpp:
2466         (WebCore::WorkerInspectorController::WorkerInspectorController):
2467         * inspector/WorkerInspectorController.h:
2468
2469 2014-02-12  Brent Fulgham  <bfulgham@apple.com>
2470
2471         Unreviewed iOS Build fix after r163975.
2472
2473         * page/EventHandler.cpp: Use wheel event stubs if !PLATFORM(MAC) || PLATFORM(IOS).
2474
2475 2014-02-12  Gavin Barraclough  <barraclough@apple.com>
2476
2477         Clean up PageThrottler interface
2478         https://bugs.webkit.org/show_bug.cgi?id=128677
2479
2480         Reviewed by Benjamin Poulain.
2481
2482         Currently, responsibility for throttling DOM timers & suspending animations is split
2483         between the Page & the PageThrottler. Clarify by making Page responsible for suspending
2484         animations (PageThrottler is now purely related to aspects of timer throttling), and
2485         move all timer throttling policy to the PageThrottler, with a single function on Page to
2486         enable (Page::setTimerThrottlingEnabled).
2487
2488         Also, transmit the full ViewState to the PageThrottler (not just the IsVisuallyIdle flag),
2489         and distinguish between media & page-load activity.
2490
2491         * WebCore.exp.in:
2492             - removed setDOMTimerAlignmentInterval.
2493         * html/HTMLMediaElement.cpp:
2494         (WebCore::HTMLMediaElement::parseAttribute):
2495             - createActivityToken -> mediaActivityToken
2496         * loader/FrameLoader.cpp:
2497         (WebCore::FrameLoader::started):
2498             - createActivityToken -> pageLoadActivityToken
2499         * page/Page.cpp:
2500         (WebCore::Page::Page):
2501             - added m_timerThrottlingEnabled, made PageThrottler a member
2502         (WebCore::Page::setIsVisuallyIdleInternal):
2503             - update animiation suspension.
2504         (WebCore::Page::setTimerThrottlingEnabled):
2505             - setTimerAlignmentInterval -> setTimerThrottlingEnabled
2506         (WebCore::Page::setViewState):
2507             - pass viewState to PageThrottler.
2508         (WebCore::Page::setIsVisibleInternal):
2509             - don't update timer throttling.
2510         * page/Page.h:
2511         (WebCore::Page::pageThrottler):
2512             - made PageThrottler a member.
2513         (WebCore::Page::timerAlignmentInterval):
2514             - inlined.
2515         * page/PageThrottler.cpp:
2516         (WebCore::PageThrottler::PageThrottler):
2517             - initialize ViewState.
2518         (WebCore::PageThrottler::~PageThrottler):
2519             - clean up by calling setTimerThrottlingEnabled directly.
2520         (WebCore::PageThrottler::hiddenPageDOMTimerThrottlingStateChanged):
2521             - moved from Page.
2522         (WebCore::PageThrottler::mediaActivityToken):
2523         (WebCore::PageThrottler::pageLoadActivityToken):
2524             - from Page::createActivityToken
2525         (WebCore::PageThrottler::throttlePage):
2526         (WebCore::PageThrottler::unthrottlePage):
2527             - don't throttle animations here.
2528         (WebCore::PageThrottler::setViewState):
2529         (WebCore::PageThrottler::setIsVisible):
2530             - added, throttle Dom timers.
2531         * page/PageThrottler.h:
2532         * page/Settings.cpp:
2533         (WebCore::Settings::setHiddenPageDOMTimerThrottlingEnabled):
2534             - removed setDOMTimerAlignmentInterval, hiddenPageDOMTimerThrottlingStateChanged moved to PageThrottler.
2535         * page/Settings.h:
2536             - removed setDOMTimerAlignmentInterval.
2537
2538 2014-02-12  Benjamin Poulain  <bpoulain@apple.com>
2539
2540         [WK2][iOS] Add back the special viewport for the old xhtml mobile doctype
2541         https://bugs.webkit.org/show_bug.cgi?id=128639
2542
2543         Reviewed by Andreas Kling.
2544
2545         * WebCore.exp.in:
2546         * dom/Document.cpp:
2547         (WebCore::Document::childrenChanged):
2548         Document::setDocType() has been removed and the doctype update code with it.
2549         Add a call to didReceiveDocType() to ensure the viewport is updated when the doctype is parsed.
2550
2551         * loader/EmptyClients.h:
2552         * page/Chrome.cpp:
2553         (WebCore::Chrome::didReceiveDocType):
2554         * page/ChromeClient.h:
2555         * page/ViewportConfiguration.cpp:
2556         (WebCore::ViewportConfiguration::xhtmlMobileParameters):
2557         * page/ViewportConfiguration.h:
2558
2559 2014-02-12  Alexey Proskuryakov  <ap@apple.com>
2560
2561         Mountain Lion build fix.
2562
2563         * WebCore.exp.in: Only export WebCrypto symbols on 10.9+, because SUBTLE_CRYPTO
2564         is not enabled on 10.8.
2565
2566 2014-02-12  Alexey Proskuryakov  <ap@apple.com>
2567
2568         Wrap WebCrypto keys in SerializedScriptValue
2569         https://bugs.webkit.org/show_bug.cgi?id=128680
2570
2571         Reviewed by Anders Carlsson.
2572
2573         Test: crypto/subtle/rsa-indexeddb.html
2574
2575         Added Mac code to wrap a key with AES-GCM. We then serialize it into a plist,
2576         because more custom formats would be crazy (even the custom format in SerializedScriptValue
2577         makes me nervous, we'll certainly need to change CryptoKey in the future).
2578
2579         * WebCore.exp.in:
2580         * WebCore.xcodeproj/project.pbxproj:
2581         * crypto/CommonCryptoUtilities.h:
2582         * crypto/SerializedCryptoKeyWrap.h: Added.
2583         * crypto/mac/SerializedCryptoKeyWrapMac.mm: Added.
2584         (WebCore::vectorFromNSData):
2585         (WebCore::wrapSerializedCryptoKey):
2586         (WebCore::unwrapSerializedCryptoKey):
2587
2588 2014-02-12  Brent Fulgham  <bfulgham@apple.com>
2589
2590         Wheel events don't latch to inner scrollable elements 
2591         https://bugs.webkit.org/show_bug.cgi?id=128225
2592         <rdar://problem/12183688>
2593
2594         Reviewed by Simon Fraser
2595
2596         * WebCore.exp.in: Add declarations for new scrolledToTop, scrolledToBottom, scrolledToLeft, and scrolledToRight.
2597         * page/EventHandler.cpp:
2598         (WebCore::EventHandler::EventHandler):
2599         (WebCore::EventHandler::clear):
2600         (WebCore::findScrollableContainer): New helper function to locate first node
2601         in enclosing region of document that is capable of handling mouse wheel events.
2602         (WebCore::isAtMaxDominantScrollPosition): Predicate to check if the scrollable
2603         area is at the limit we will hit based on scroll direction.
2604         (WebCore::EventHandler::handleWheelEvent): Identify the case where we have hit
2605         the end of a scroll, and treat that as a valid 'handled' case. If the scroll event
2606         is just starting, treat end-of-scroll as unhandled so the parent element can
2607         handle things.
2608         * page/EventHandler.h:
2609         * page/scrolling/ScrollingTree.cpp:
2610         (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously): Use new methods
2611         on the PlatformWheelEvent class.
2612         (WebCore::ScrollingTree::setOrClearLatchedNode): Ditto
2613         * platform/PlatformWheelEvent.h:
2614         (WebCore::PlatformWheelEvent::shouldConsiderLatching): Moved implementation from ScrollingTree.
2615         (WebCore::PlatformWheelEvent::shouldClearLatchedNode): Ditto
2616         * platform/ScrollableArea.cpp:
2617         (WebCore::ScrollableArea::scrolledToTop): Added
2618         (WebCore::ScrollableArea::scrolledToBottom):Added
2619         (WebCore::ScrollableArea::scrolledToLeft): Added
2620         (WebCore::ScrollableArea::scrolledToRight): Added
2621         * platform/ScrollableArea.h:
2622         * rendering/RenderListBox.cpp:
2623         (WebCore::RenderListBox::scrolledToTop): Added
2624         (WebCore::RenderListBox::scrolledToBottom): Added
2625         (WebCore::RenderListBox::scrolledToLeft): Added
2626         (WebCore::RenderListBox::scrolledToRight): Added
2627         * rendering/RenderListBox.h: Changed to public inheritance of ScrollableArea to
2628         allow generic use of this type in scroll wheel logic.
2629
2630 2014-02-12  Brendan Long  <b.long@cablelabs.com>
2631
2632         Implement DataCue for metadata cues
2633         https://bugs.webkit.org/show_bug.cgi?id=128402
2634
2635         Reviewed by Eric Carlson.
2636
2637         Test: media/track/track-datacue.html
2638
2639         * CMakeLists.txt: Add DataCue.
2640         * DerivedSources.cpp: Add JSDataCue.
2641         * DerivedSources.make: Same.
2642         * GNUmakefile.list.am: Add DataCue and JSDataCue.
2643         * WebCore.vcxproj/WebCore.vcxproj: Add DataCue.
2644         * WebCore.vcxproj/WebCore.vcxproj.filters: Same.
2645         * WebCore.xcodeproj/project.pbxproj: Add DataCue and JSDataCue.
2646         * bindings/js/JSTextTrackCueCustom.cpp:
2647         (WebCore::toJS): Add DataCue wrapper.
2648         * html/track/DataCue.cpp: Copied from Source/WebCore/html/track/TextTrack.idl.
2649         * html/track/DataCue.h: Copied from Source/WebCore/html/track/TextTrack.idl.
2650         * html/track/DataCue.idl: Copied from Source/WebCore/html/track/TextTrack.idl.
2651         * html/track/InbandGenericTextTrack.cpp:
2652         (WebCore::InbandGenericTextTrack::addGenericCue): Pass ASSERT_NO_EXCEPTION to addCue().
2653         * html/track/InbandWebVTTTextTrack.cpp:
2654         (WebCore::InbandWebVTTTextTrack::newCuesParsed): Same.
2655         * html/track/TextTrack.cpp:
2656         (WebCore::TextTrack::addCue): Throw an exception if DataCue is added to a track that isn't kind="metadata".
2657         * html/track/TextTrack.h: Add exception code parameter to addCue().
2658         * html/track/TextTrack.idl: Add [RaisesException] to addCue().
2659         * html/track/TextTrackCue.h: Add Data CueType.
2660
2661 2014-02-12  Zalan Bujtas  <zalan@apple.com>
2662
2663         Subpixel layout: Clean up LayoutPoint class.
2664         https://bugs.webkit.org/show_bug.cgi?id=128515
2665
2666         Reviewed by Simon Fraser.
2667
2668         Remove redundant functions (keep the more explicit ones).
2669
2670         No change in functionality.
2671
2672         * page/FrameView.cpp:
2673         (WebCore::FrameView::viewportConstrainedVisibleContentRect):
2674         * platform/graphics/LayoutPoint.h:
2675         (WebCore::toLayoutPoint):
2676         (WebCore::toLayoutSize):
2677         (WebCore::roundedIntPoint):
2678         * platform/graphics/ca/GraphicsLayerCA.cpp:
2679         (WebCore::GraphicsLayerCA::updateContentsRects):
2680         * rendering/LayoutState.cpp:
2681         (WebCore::LayoutState::LayoutState):
2682         * rendering/RenderBlock.cpp:
2683         (WebCore::RenderBlock::addFocusRingRects):
2684         * rendering/RenderBox.cpp:
2685         (WebCore::RenderBox::offsetFromContainer):
2686         * rendering/RenderInline.cpp:
2687         (WebCore::RenderInline::addFocusRingRects):
2688         * rendering/RenderLayer.cpp:
2689         (WebCore::RenderLayer::updateLayerPosition):
2690         (WebCore::accumulateOffsetTowardsAncestor):
2691         (WebCore::RenderLayer::paintBackgroundForFragments):
2692         (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
2693         (WebCore::RenderLayer::paintOutlineForFragments):
2694         (WebCore::RenderLayer::paintMaskForFragments):
2695         (WebCore::RenderLayer::paintOverflowControlsForFragments):
2696         * rendering/RenderScrollbarPart.cpp:
2697         (WebCore::RenderScrollbarPart::paintIntoRect):
2698
2699 2014-02-12  Zan Dobersek  <zdobersek@igalia.com>
2700
2701         [CoordinatedGraphics] Move CoordinatedGraphicsScene, CoordinatedLayerTreeHostProxy to std::function
2702         https://bugs.webkit.org/show_bug.cgi?id=128473
2703
2704         Reviewed by Anders Carlsson.
2705
2706
2707         Move the CoordinatedGraphicsScene class to using std::function instead of WTF::Functional and std::bind
2708         instead of WTF::bind. The function wrapper is now moved through function calls and not passed by reference,
2709         and lambda functions are inlined into the dispatchOnMainThread() calls, with the CoordinatedGraphicsScene
2710         refcount-protected.
2711
2712         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
2713         (WebCore::CoordinatedGraphicsScene::dispatchOnMainThread):
2714         (WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
2715         (WebCore::CoordinatedGraphicsScene::commitSceneState):
2716         (WebCore::CoordinatedGraphicsScene::syncRemoteContent):
2717         (WebCore::CoordinatedGraphicsScene::purgeGLResources):
2718         (WebCore::CoordinatedGraphicsScene::commitScrollOffset):
2719         (WebCore::CoordinatedGraphicsScene::appendUpdate):
2720         (WebCore::CoordinatedGraphicsScene::setActive):
2721         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
2722
2723 2014-02-12  Eric Carlson  <eric.carlson@apple.com>
2724
2725         Cleanup the code added for https://bugs.webkit.org/show_bug.cgi?id=128125.
2726
2727         Not reviewed.
2728
2729         * html/HTMLMediaSession.cpp:
2730         (WebCore::restrictionName): Don't need a "break" after a "return" in a case statement.
2731         * platform/audio/MediaSession.cpp:
2732         (WebCore::stateName): Ditto.
2733         * platform/audio/ios/MediaSessionManagerIOS.mm:
2734
2735 2014-02-12  Andreas Kling  <akling@apple.com>
2736
2737         RenderNamedFlowThread should only support RenderElement children.
2738         <https://webkit.org/b/128675>
2739
2740         Tighten up flow-thread rendering so that it only supports element
2741         children directly. This means we don't have to worry about text
2742         renderers on this code path.
2743
2744         Reviewed by Antti Koivisto.
2745
2746         * rendering/RenderElement.cpp:
2747         (WebCore::RenderElement::insertedIntoTree):
2748         (WebCore::RenderElement::willBeRemovedFromTree):
2749         (WebCore::RenderElement::willBeDestroyed):
2750         * rendering/RenderNamedFlowThread.cpp:
2751         (WebCore::RenderNamedFlowThread::nextRendererForElement):
2752         (WebCore::RenderNamedFlowThread::addFlowChild):
2753         (WebCore::RenderNamedFlowThread::removeFlowChild):
2754         * rendering/RenderNamedFlowThread.h:
2755         * rendering/RenderObject.cpp:
2756         (WebCore::RenderObject::willBeDestroyed):
2757         (WebCore::RenderObject::insertedIntoTree):
2758         (WebCore::RenderObject::willBeRemovedFromTree):
2759         * style/StyleResolveTree.cpp:
2760         (WebCore::Style::createRendererIfNeeded):
2761
2762 2014-02-12  Joseph Pecoraro  <pecoraro@apple.com>
2763
2764         Web Inspector: Modernize missed inspector files
2765         https://bugs.webkit.org/show_bug.cgi?id=128661
2766
2767         Reviewed by Anders Carlsson.
2768
2769         Add final, override, and use nullptr where appropriate.
2770
2771         * inspector/InspectorCSSAgent.cpp:
2772         (WebCore::InspectorCSSAgent::asCSSStyleRule):
2773         (WebCore::InspectorCSSAgent::discardAgent):
2774         (WebCore::InspectorCSSAgent::disable):
2775         (WebCore::InspectorCSSAgent::getInlineStylesForNode):
2776         (WebCore::InspectorCSSAgent::getComputedStyleForNode):
2777         (WebCore::InspectorCSSAgent::asInspectorStyleSheet):
2778         (WebCore::InspectorCSSAgent::elementForId):
2779         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
2780         (WebCore::InspectorCSSAgent::assertStyleSheetForId):
2781         (WebCore::InspectorCSSAgent::buildObjectForRule):
2782         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
2783         * inspector/InspectorFrontendClientLocal.h:
2784
2785 2014-02-11  Brent Fulgham  <bfulgham@apple.com>
2786
2787         Remove some unintended copies in ranged for loops
2788         https://bugs.webkit.org/show_bug.cgi?id=128644
2789
2790         Reviewed by Anders Carlsson.
2791
2792         * css/StyleResolver.cpp:
2793         (WebCore::StyleResolver::loadPendingSVGDocuments): Avoid creating/destroying
2794         RefPtrs in loop.
2795
2796 2014-02-12  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
2797
2798         Update the HTML Media Capture implementation.
2799         https://bugs.webkit.org/show_bug.cgi?id=118465
2800
2801         Reviewed by Darin Adler.
2802
2803         Make the implementation in WebKit compatible with the 2013-05-09
2804         version of the spec, which makes the "capture" attribute a boolean
2805         instead of an enum.
2806
2807         Covered by fast/forms/file/file-input-capture.html.
2808
2809         * html/FileInputType.cpp:
2810         (WebCore::FileInputType::handleDOMActivateEvent):
2811         * html/HTMLInputElement.cpp:
2812         (WebCore::HTMLInputElement::capture): Renamed to shouldUseMediaCapture().
2813         (WebCore::HTMLInputElement::shouldUseMediaCapture): Return a bool.
2814         * html/HTMLInputElement.h:
2815         * html/HTMLInputElement.idl: Turn the `capture' attribute into a
2816         reflective boolean instead of a DOMString.
2817         * platform/FileChooser.h:
2818
2819 2014-02-12  Radu Stavila  <stavila@adobe.com>
2820
2821         [CSS Regions] Remove unused method in RenderFlowThread
2822         https://bugs.webkit.org/show_bug.cgi?id=128373
2823
2824         Reviewed by Mihnea Ovidenie.
2825
2826         After the landing of https://bugs.webkit.org/show_bug.cgi?id=118665, the 
2827         RenderFlowThread::computeRegionClippingRect method is obsolete.
2828
2829         No new tests needed, this patch only removes an unused method.
2830
2831         * rendering/RenderFlowThread.cpp:
2832         * rendering/RenderFlowThread.h:
2833
2834 2014-02-12  Mihai Tica  <mitica@adobe.com>
2835
2836         [CSS Element Blending] Implement the software path of -webkit-blend-mode with Core Graphics.
2837         https://bugs.webkit.org/show_bug.cgi?id=99119
2838
2839         Reviewed by Simon Fraser.
2840
2841         This patch adds support for -webkit-blend-mode with Core Graphics.
2842         The layer promotion code that forced compositing when blending was detected has been removed.
2843         Remaining work for the software path is to detect and implement isolation of the blending operation:
2844         as stated in the spec, blending should be limited to the parent stacking context.
2845
2846         Tests: css3/compositing/blend-mode-blended-element-overlapping-composited-sibling-should-have-compositing-layer.html
2847                css3/compositing/blend-mode-parent-of-composited-blended-has-layer.html
2848                css3/compositing/blend-mode-simple-composited.html
2849                css3/compositing/blend-mode-with-composited-descendant-should-have-layer.html
2850
2851         * inspector/InspectorLayerTreeAgent.cpp:
2852         (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer): Remove CompositingReasonBlending.
2853         * rendering/RenderLayer.cpp:
2854         (WebCore::RenderLayer::beginTransparencyLayers): Set the blendMode on the GraphicsContext.
2855         * rendering/RenderLayer.h: paintsWithTransparency should return true when a blendMode is set.
2856         * rendering/RenderLayerCompositor.cpp: Remove promotion code when a blendMode is detected.
2857         (WebCore::RenderLayerCompositor::requiresCompositingLayer): Remove CompositingReasonBlending reason.
2858         (WebCore::RenderLayerCompositor::requiresOwnBackingStore): Remove CompositingReasonBlending reason.
2859         (WebCore::RenderLayerCompositor::reasonsForCompositing): Remove CompositingReasonBlending reason.
2860         (WebCore::RenderLayerCompositor::logReasonsForCompositing): Remove CompositingReasonBlending reason.
2861         * rendering/RenderLayerCompositor.h:
2862         - Remove the requiresCompositingForBlending method
2863         - Remove the CompositingReasonBlending from the CompositingReasons enum.
2864
2865 2014-02-11  Zalan Bujtas  <zalan@apple.com>
2866
2867         Subpixel rendering: Switch repaint rect from IntRect to LayoutRect to be able to
2868         repaint on device pixel boundaries.
2869         https://bugs.webkit.org/show_bug.cgi?id=128477
2870
2871         Reviewed by Simon Fraser.
2872
2873         RenderLayer needs to be able to repaint on device pixel boundaries. RenderView still
2874         repaints on integral position.
2875
2876         No change in functionality.
2877
2878         * rendering/RenderBlockLineLayout.cpp:
2879         (WebCore::RenderBlockFlow::layoutRunsAndFloats):
2880         * rendering/RenderElement.cpp:
2881         (WebCore::RenderElement::repaintAfterLayoutIfNeeded):
2882         * rendering/RenderLayer.cpp:
2883         (WebCore::RenderLayer::updateLayerPositions):
2884         (WebCore::RenderLayer::clearRepaintRects):
2885         (WebCore::RenderLayer::scrollTo):
2886         (WebCore::RenderLayer::calculateClipRects):
2887         * rendering/RenderLayerBacking.cpp:
2888         (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
2889         * rendering/RenderLayerBacking.h:
2890         * rendering/RenderObject.cpp:
2891         (WebCore::RenderObject::repaintUsingContainer):
2892         (WebCore::RenderObject::repaint):
2893         (WebCore::RenderObject::repaintRectangle):
2894         * rendering/RenderObject.h:
2895
2896 2014-02-11  Dan Bernstein  <mitz@apple.com>
2897
2898         iOS build fix fix.
2899
2900         * rendering/RenderElement.cpp:
2901         (WebCore::shouldRepaintForImageAnimation):
2902
2903 2014-02-11  Dan Bernstein  <mitz@apple.com>
2904
2905         iOS build fix.
2906
2907         * rendering/RenderElement.cpp:
2908         (WebCore::shouldRepaintForImageAnimation):
2909
2910 2014-02-11  David Kilzer  <ddkilzer@apple.com>
2911
2912         ContentData equals() methods are not inline-able
2913         <http://webkit.org/b/128538>
2914
2915         Reviewed by Darin Adler.
2916
2917         Get rid of pure virtual equals() method in favor of
2918         ContentData::Type enum for runtime type information.
2919         This also lets us devirtualize the isFoo() methods.
2920
2921         * rendering/style/ContentData.h:
2922         (WebCore::ContentData::type): Add.
2923         (WebCore::ContentData::isCounter): Devirtualize.
2924         (WebCore::ContentData::isImage): Devirtualize.
2925         (WebCore::ContentData::isQuote): Devirtualize.
2926         (WebCore::ContentData::isText): Devirtualize.
2927         (WebCore::ContentData::ContentData): Add.  Include
2928         ContentData::Type parameter.
2929         (WebCore::operator==): Add overloaded methods for each subclass.
2930         Stop using pure virtual equals() method, check type(), and use
2931         overloaded subclass operator==() methods.
2932         (WebCore::operator!=): Add overloaded methods for each subclass.
2933
2934 2014-02-11  Andreas Kling  <akling@apple.com>
2935
2936         Protect some RenderFlowThread functions.
2937         <https://webkit.org/b/128642>
2938
2939         Make the RenderFlowThread constructor protected and a handful of
2940         member functions private.
2941
2942         Reviewed by Anders Carlsson.
2943
2944         * rendering/RenderFlowThread.h:
2945
2946 2014-02-11  Andreas Kling  <akling@apple.com>
2947
2948         Don't allocate RenderNamedFlowThread's child list separately.
2949         <https://webkit.org/b/128640>
2950
2951         Since we always create the flow-thread child list, there's no reason
2952         to put it in a separate heap allocation. Also remove the typedef and
2953         use auto instead.
2954
2955         Reviewed by Anders Carlsson.
2956
2957         * rendering/RenderNamedFlowThread.cpp:
2958         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
2959         (WebCore::RenderNamedFlowThread::nextRendererForNode):
2960         (WebCore::RenderNamedFlowThread::addFlowChild):
2961         (WebCore::RenderNamedFlowThread::removeFlowChild):
2962         * rendering/RenderNamedFlowThread.h:
2963
2964 2014-02-11  Zalan Bujtas  <zalan@apple.com>
2965
2966         Subpixel rendering: Make GraphicsLayerClient::paintContents's clip rect subpixel based.
2967         https://bugs.webkit.org/show_bug.cgi?id=128460
2968
2969         Reviewed by Simon Fraser.
2970
2971         GraphicsClient::paintContents takes clipRect as FloatRect now so that we can paint on
2972         subpixel position.
2973
2974         No change in functionality.
2975
2976         * platform/graphics/GraphicsLayerClient.h:
2977         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
2978         (WebCore::CompositingCoordinator::paintContents):
2979         * platform/graphics/texmap/coordinated/CompositingCoordinator.h:
2980         * rendering/RenderLayer.cpp:
2981         (WebCore::cornerRect):
2982         (WebCore::RenderLayer::scrollCornerRect):
2983         (WebCore::resizerCornerRect):
2984         (WebCore::RenderLayer::scrollCornerAndResizerRect):
2985         (WebCore::RenderLayer::verticalScrollbarStart):
2986         (WebCore::RenderLayer::horizontalScrollbarStart):
2987         (WebCore::RenderLayer::paintResizer):
2988         (WebCore::RenderLayer::hitTestOverflowControls):
2989         * rendering/RenderLayer.h:
2990         * rendering/RenderLayerBacking.cpp:
2991         (WebCore::RenderLayerBacking::paintIntoLayer):
2992         (WebCore::RenderLayerBacking::paintContents):
2993         * rendering/RenderLayerBacking.h:
2994         * rendering/RenderLayerCompositor.cpp:
2995         (WebCore::RenderLayerCompositor::paintContents):
2996         * rendering/RenderLayerCompositor.h:
2997         * rendering/RenderWidget.cpp:
2998         (WebCore::RenderWidget::paint):
2999
3000 2014-02-11  Antti Koivisto  <antti@apple.com>
3001
3002         GIF animations should be suspended when outside of viewport
3003         https://bugs.webkit.org/show_bug.cgi?id=128632
3004
3005         Reviewed by Andreas Kling.
3006         
3007         Animations are driven by the paint cycle. Speculative tiles keep animations outside the actual viewport going.
3008         
3009         Pause animations when they are outside the viewport by not painting them.
3010
3011         Test: fast/repaint/no-animation-outside-viewport.html
3012
3013         * loader/cache/CachedImage.cpp:
3014         (WebCore::CachedImage::animationAdvanced):
3015         
3016             Call animation specific newImageAnimationFrameAvailable instead of the generic notifyObservers.
3017
3018         * loader/cache/CachedImage.h:
3019         
3020             Removed now unnecessary resumeAnimatingImagesForLoader mechanism.
3021             Remove unnecessary shouldPauseAnimation. Pausing is now always done when by avoiding repaint.
3022
3023         * loader/cache/CachedImageClient.h:
3024         (WebCore::CachedImageClient::newImageAnimationFrameAvailable):
3025         * page/FrameView.cpp:
3026         (WebCore::FrameView::scrollPositionChanged):
3027         
3028             Check if we have image animations to resume when scroll position changes.
3029
3030         * page/Page.cpp:
3031         (WebCore::Page::resumeAnimatingImages):
3032         
3033             Use the same mechanism when resuming background tabs etc.
3034
3035         * platform/graphics/BitmapImage.cpp:
3036         (WebCore::BitmapImage::internalAdvanceAnimation):
3037         
3038             Remove the shouldPauseAnimation test, always rely on pausing on invalidation.
3039
3040         * platform/graphics/ImageObserver.h:
3041         * rendering/RenderBoxModelObject.cpp:
3042         * rendering/RenderElement.cpp:
3043         (WebCore::RenderElement::RenderElement):
3044         (WebCore::RenderElement::~RenderElement):
3045         (WebCore::shouldRepaintForImageAnimation):
3046         
3047             Factor the pausing conditions to a function. Test that the animation is withing the
3048             visible rect.
3049
3050         (WebCore::RenderElement::newImageAnimationFrameAvailable):
3051         
3052             Add renderer to the paused animation set if we don't continue the animation.
3053
3054         (WebCore::RenderElement::repaintForPausedImageAnimationsIfNeeded):
3055         
3056             Resume the paused animations by triggering repaint.
3057
3058         * rendering/RenderElement.h:
3059         (WebCore::RenderElement::setHasPausedImageAnimations):
3060         (WebCore::RenderElement::hasPausedImageAnimations):
3061         * rendering/RenderObject.cpp:
3062         * rendering/RenderObject.h:
3063         * rendering/RenderView.cpp:
3064         (WebCore::RenderView::addRendererWithPausedImageAnimations):
3065         (WebCore::RenderView::removeRendererWithPausedImageAnimations):
3066         (WebCore::RenderView::resumePausedImageAnimationsIfNeeded):
3067         * rendering/RenderView.h:
3068
3069 2014-02-11  Andreas Kling  <akling@apple.com>
3070
3071         Remove unused RenderNamedFlowThread::previousRendererForNode().
3072         <https://webkit.org/b/128637>
3073
3074         Reviewed by Antti Koivisto.
3075
3076         * rendering/RenderNamedFlowThread.cpp:
3077         * rendering/RenderNamedFlowThread.h:
3078
3079 2014-02-11  Andreas Kling  <akling@apple.com>
3080
3081         Move renderNamedFlowThreadWrapper() to RenderElement.
3082         <https://webkit.org/b/128634>
3083
3084         This function is only ever called on RenderElements so move it there
3085         from RenderObject.
3086
3087         Reviewed by Antti Koivisto.
3088
3089         * rendering/RenderElement.cpp:
3090         (WebCore::RenderElement::renderNamedFlowThreadWrapper):
3091         * rendering/RenderElement.h:
3092         * rendering/RenderObject.cpp:
3093         * rendering/RenderObject.h:
3094
3095 2014-02-11  Myles C. Maxfield  <mmaxfield@apple.com>
3096
3097         Position and thickness of underline as text size changes
3098         https://bugs.webkit.org/show_bug.cgi?id=16768
3099
3100         Reviewed by Dean Jackson.
3101
3102         This patch adopts the iOS codepath for underlines. It also reorganizes
3103         drawLineForText to avoid a costly global state save & restore.
3104
3105         Test: fast/css3-text/css3-text-decoration/text-decoration-thickness.html
3106
3107         * platform/graphics/cg/GraphicsContextCG.cpp:
3108         (WebCore::computeLineBoundsAndAntialiasingModeForText):
3109         (WebCore::GraphicsContext::computeLineBoundsForText):
3110         (WebCore::GraphicsContext::drawLineForText):
3111         (WebCore::GraphicsContext::drawLinesForText):
3112         * rendering/InlineTextBox.cpp:
3113         (WebCore::InlineTextBox::paintDecoration):
3114
3115 2014-02-11  Ryosuke Niwa  <rniwa@webkit.org>
3116
3117         Frame::rectForSelection shouldn't instantiate FrameSelection
3118         https://bugs.webkit.org/show_bug.cgi?id=128587
3119
3120         Reviewed by Enrica Casucci.
3121
3122         Made VisiblePosition::absoluteCaretBounds more interoperable with the one in FrameSelection and made
3123         iOS's Frame::rectForScrollToVisible use that function instead.
3124
3125         The above change allows us to remove:
3126         - suppressCloseTyping(), restoreCloseTyping(), and m_closeTypingSuppressions in FrameSelection
3127         - suppressSelectionNotifications() and restoreSelectionNotifications() in EditorClient
3128
3129         See inline comments below for more details.
3130
3131         * Source/WebCore/WebCore.exp.in:
3132
3133         * editing/FrameSelection.cpp:
3134         (WebCore::FrameSelection::FrameSelection):
3135         (WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance):
3136         (WebCore::CaretBase::updateCaretRect):
3137         (WebCore::FrameSelection::caretRendererWithoutUpdatingLayout):
3138         (WebCore::DragCaretController::caretRenderer):
3139         (WebCore::repaintCaretForLocalRect):
3140         (WebCore::FrameSelection::recomputeCaretRect): Merged FrameSelection::localCaretRect(). Modified
3141         the code to update caretNode when and only when caret rect is updated. Also added an assertion to
3142         ensure absoluteCaretBounds() on FrameSelection and VisiblePosition yield the same result.
3143
3144         (WebCore::CaretBase::paintCaret):
3145         * editing/FrameSelection.h:
3146
3147         * editing/VisiblePosition.cpp:
3148         (WebCore::VisiblePosition::absoluteCaretBounds): Fixed the bug where the old code wasn't respecting
3149         the convention to use containing block as the renderer to paint caret.
3150
3151         * editing/htmlediting.cpp:
3152         (WebCore::caretRendersInsideNode): Moved from FrameSelection.cpp.
3153         (WebCore::rendererForCaretPainting): Ditto and renamed from caretRenderer.
3154         (WebCore::localCaretRectInRendererForCaretPainting): Extracted from FrameSelection::updateCaretRect.
3155         (WebCore::absoluteBoundsForLocalCaretRect): Ditto from CaretBase::absoluteBoundsForLocalRect.
3156         * editing/htmlediting.h:
3157
3158         * loader/EmptyClients.h:
3159         * page/EditorClient.h:
3160         * page/Frame.h:
3161
3162         * page/ios/FrameIOS.mm:
3163         (WebCore::Frame::rectForScrollToVisible): Reimplemented in its simplest form using VisiblePosition's
3164         absoluteCaretBounds().
3165
3166 2014-02-11  Enrica Casucci  <enrica@apple.com>
3167
3168         Support WebSelections in WK2 on iOS.
3169         https://bugs.webkit.org/show_bug.cgi?id=127015
3170         <rdar://problem/15211964>
3171
3172         Reviewed by Benjamin Poulain.
3173
3174         Adding few exports.
3175
3176         * WebCore.exp.in:
3177
3178 2014-02-11  Andreas Kling  <akling@apple.com>
3179
3180         CTTE: RenderNamedFlowThread always has a WebKitNamedFlow.
3181         <https://webkit.org/b/128623>
3182
3183         Codify the fact that RenderNamedFlowThread always has a corresponding
3184         WebKitNamedFlow by storing it in a Ref, and adding an accessor that
3185         returns a reference to get rid of all the ->'s.
3186
3187         Also removed some unnecessary assertions exposed by this.
3188
3189         Reviewed by Antti Koivisto.
3190
3191         * dom/NamedFlowCollection.cpp:
3192         (WebCore::NamedFlowCollection::ensureFlowWithName):
3193         * dom/NamedFlowCollection.h:
3194         * rendering/RenderNamedFlowThread.cpp:
3195         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
3196         (WebCore::RenderNamedFlowThread::registerNamedFlowContentElement):
3197         (WebCore::RenderNamedFlowThread::unregisterNamedFlowContentElement):
3198         (WebCore::RenderNamedFlowThread::flowThreadName):
3199         (WebCore::RenderNamedFlowThread::dispatchRegionLayoutUpdateEvent):
3200         (WebCore::RenderNamedFlowThread::dispatchRegionOversetChangeEvent):
3201         (WebCore::RenderNamedFlowThread::regionLayoutUpdateEventTimerFired):
3202         (WebCore::RenderNamedFlowThread::regionOversetChangeEventTimerFired):
3203         (WebCore::RenderNamedFlowThread::setMarkForDestruction):
3204         (WebCore::RenderNamedFlowThread::resetMarkForDestruction):
3205         (WebCore::RenderNamedFlowThread::isMarkedForDestruction):
3206         * rendering/RenderNamedFlowThread.h:
3207
3208 2014-02-10  Myles C. Maxfield  <mmaxfield@apple.com>
3209
3210         Convert position:fixed property to position:absolute upon copy
3211         https://bugs.webkit.org/show_bug.cgi?id=128194
3212
3213         Reviewed by Simon Fraser.
3214
3215         This adds a Setting and Preference that allows clients to opt-in to this behavior.
3216
3217         This new behavior is only activated if the entire body is copied. If there is a position:fixed
3218         element in the copied selection, it is replaced with position:absolute, and a containing
3219         block (position:relative) is wrapped around the copied text.
3220
3221         This patch originally converted position:-webkit-sticky to position:relative. However, we
3222         currently don't support copying and pasting of position:-webkit-sticky content (See below).
3223         Therefore, this patch only deals with position:fixed.
3224
3225         Right now we don't copy position:-webkit-sticky. This is because:
3226         1. When copying styled elements, we parse the style properties again
3227         2. CSSParserContext has a flag which can disable parsing -webkit-sticky
3228         3. There are two constructors to CSSParserContext: one that takes a document and sets up the
3229         aforementioned flag, and a simple one that doesn't take a document and sets all the enableFoo
3230         flags to false
3231         4. At the relevant place within copy code, we are far removed from the Document object, so we
3232         instead call the second constructor, thereby disabling parsing of -webkit-sticky
3233
3234         Test: editing/pasteboard/copy-paste-converts-sticky-and-fixed.html
3235
3236         * WebCore.exp.in: Export the Setting setter
3237         * editing/EditingStyle.cpp:
3238         (WebCore::EditingStyle::convertFixedAndStickyPosition): Converts a single style
3239         * editing/EditingStyle.h:
3240         * editing/markup.cpp:
3241         (WebCore::StyledMarkupAccumulator::StyledMarkupAccumulator): Remember if we found
3242         an element which needs the position:relative containing block
3243         (WebCore::StyledMarkupAccumulator::appendElement): Surround with the position:relative
3244         containing block if necessary
3245         (WebCore::createMarkupInternal):
3246         * page/Settings.cpp:
3247         (WebCore::Settings::Settings): New setting to opt-in to this new behavior
3248         (WebCore::Settings::setConvertPositionStyleOnCopy):
3249         * page/Settings.h:
3250         (WebCore::Settings::convertPositionStyleOnCopy):
3251         * testing/InternalSettings.cpp: Allow setting the setting from a Layout Test
3252         (WebCore::InternalSettings::Backup::Backup):
3253         (WebCore::InternalSettings::Backup::restoreTo):
3254         (WebCore::InternalSettings::setConvertPositionStyleOnCopy):
3255         * testing/InternalSettings.h:
3256         * testing/InternalSettings.idl:
3257
3258 2014-02-11  Youenn Fablet  <youennf@gmail.com>
3259
3260         XMLHttpRequest should not send DNT header
3261         https://bugs.webkit.org/show_bug.cgi?id=128533
3262
3263         Reviewed by Alexey Proskuryakov.
3264
3265         Added DNT (Do Not Track) header to the list of forbidden headers.
3266         Updated http/tests/xmlhttprequest/set-dangerous-headers.html to test that header.
3267
3268         * xml/XMLHttpRequest.cpp:
3269         (WebCore::XMLHttpRequestStaticData::XMLHttpRequestStaticData):
3270
3271 2014-02-10  Jeffrey Pfau  <jpfau@apple.com>
3272
3273         Bring third-party app cache blocking behavior in line with private browsing app cache blocking behavior
3274         https://bugs.webkit.org/show_bug.cgi?id=128557
3275
3276         Reviewed by Alexey Proskuryakov.
3277
3278         * loader/appcache/ApplicationCacheGroup.cpp:
3279         (WebCore::ApplicationCacheGroup::cacheForMainRequest):
3280         (WebCore::ApplicationCacheGroup::selectCache):
3281         (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
3282         (WebCore::ApplicationCacheGroup::update):
3283         * loader/appcache/ApplicationCacheHost.cpp:
3284         (WebCore::ApplicationCacheHost::maybeLoadMainResource):
3285         (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainResponse):
3286         (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainError):
3287         (WebCore::ApplicationCacheHost::maybeLoadResource):
3288         (WebCore::ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache):
3289         (WebCore::ApplicationCacheHost::isApplicationCacheBlockedForRequest):
3290         * loader/appcache/ApplicationCacheHost.h:
3291
3292 2014-02-11  Brady Eidson  <beidson@apple.com>
3293
3294         IDB: The test after storage/indexeddb/mozilla/object-identity.html fails in cleanup code
3295         <rdar://problem/16040663> and https://bugs.webkit.org/show_bug.cgi?id=128621
3296
3297         Reviewed by Alexey Proskuryakov.
3298
3299         Covered by storage/indexeddb/mozilla/object-identity.html.
3300
3301         * Modules/indexeddb/IDBTransactionBackend.cpp:
3302         (WebCore::IDBTransactionBackend::abort): Clear the m_database pointer before calling the onAbort callback.
3303         (WebCore::IDBTransactionBackend::commit): Don't run the abort code if there's no m_database pointer.
3304
3305 2014-02-10  Jer Noble  <jer.noble@apple.com>
3306
3307         [EME][Mac] Move the implementation of CDMPrivateAVFoundation back into MediaPlayerPrivateAVFoundationObjC.
3308         https://bugs.webkit.org/show_bug.cgi?id=128559
3309
3310         Reviewed by Dean Jackson.
3311
3312         To prepare for multiple simultaneous CDMs with muliple MediaPlayer types, move the implementation for
3313         CDMPrivateAVFoundation back into its media engine.
3314
3315         * Modules/encryptedmedia/CDMPrivateAVFoundation.mm:
3316         (WebCore::MediaKeyExceptionToErrorCode): Added.
3317         (WebCore::CDMSessionAVFoundation::generateKeyRequest): Moved to MediaPlayerPrivateAVFoundationObjC.
3318         (WebCore::CDMSessionAVFoundation::releaseKeys): Ditto.
3319         (WebCore::CDMSessionAVFoundation::update): Ditto.
3320         * platform/graphics/MediaPlayer.cpp:
3321         (WebCore::MediaPlayer::generateKeyRequest): Added, pass through to MediaPlayerPrivate.
3322         (WebCore::MediaPlayer::releaseKeys): Ditto.
3323         (WebCore::MediaPlayer::update): Ditto.
3324         * platform/graphics/MediaPlayer.h:
3325         * platform/graphics/MediaPlayerPrivate.h:
3326         (WebCore::MediaPlayerPrivateInterface::generateKeyRequest): Added.
3327         (WebCore::MediaPlayerPrivateInterface::releaseKeys): Ditto.
3328         (WebCore::MediaPlayerPrivateInterface::update): Ditto.
3329         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3330         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3331         (WebCore::MediaPlayerPrivateAVFoundationObjC::generateKeyRequest): Moved from CDMSessionAVFoundation.
3332         (WebCore::MediaPlayerPrivateAVFoundationObjC::releaseKeys): Ditto.
3333         (WebCore::MediaPlayerPrivateAVFoundationObjC::update): Ditto.
3334
3335 2014-01-24  Jer Noble  <jer.noble@apple.com>
3336
3337         Run UserAgentScripts through jsmin rather than the css preprocessor
3338         https://bugs.webkit.org/show_bug.cgi?id=127559
3339
3340         Reviewed by Tim Horton.
3341
3342         User Agent JavaScript files were being run through the c++ preprocessor to strip out
3343         comments (and presumably to allow #if ENABLE macros, though that feature is entirely
3344         unused). This had the side effect of removing important whitespace, namely newlines where
3345         there would normally be an implicit semicolon.
3346
3347         Instead, .js files will now be run through the jsmin minifier, used by the inspector.
3348         Jsmin will also strip comments and whitespace, but in a syntactically aware way which will
3349         keep newlines when their presence adds an implied semicolon.
3350
3351         * DerivedSources.make:
3352         * Scripts/make-js-file-arrays.py: Added.
3353         (stringifyCodepoint):
3354         (chunk):
3355         (main):
3356
3357 2014-02-11  Andy Estes  <aestes@apple.com>
3358
3359         [Mac] connection:willStopBufferingData: no longer exists in NSURLConnectionDelegate
3360         https://bugs.webkit.org/show_bug.cgi?id=128583
3361
3362         Reviewed by Anders Carlsson.
3363
3364         The delegate method was removed in Snow Leopard.
3365
3366         * loader/ResourceLoader.cpp:
3367         * loader/ResourceLoader.h:
3368         * platform/network/ResourceHandleClient.h:
3369         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
3370         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
3371
3372 2014-02-10  Andy Estes  <aestes@apple.com>
3373
3374         [Content Filter] Check for NULL before calling dispatch_release()
3375         https://bugs.webkit.org/show_bug.cgi?id=128576
3376
3377         Reviewed by Darin Adler.
3378
3379         m_neFilterSourceQueue will be NULL if NEFilterSource isn't enabled, and
3380         passing NULL to dispatch_release() is undefined.
3381
3382         * platform/mac/ContentFilterMac.mm:
3383         (WebCore::ContentFilter::~ContentFilter):
3384
3385 2014-01-24  Jer Noble  <jer.noble@apple.com>
3386
3387         [MediaControls] Allow the media controls script to be debuggable by giving it a generated sourceURL
3388         https://bugs.webkit.org/show_bug.cgi?id=127560
3389
3390         Reviewed by Eric Carlson.
3391
3392         When evaluating a script through ScriptController, if that script does not have an
3393         explicit sourceURL, it will not appear in the resources section of the Web Inspector.
3394         For debug builds only, give the media controls script a generated (i.e. fake) sourceURL.
3395
3396         * html/HTMLMediaElement.cpp:
3397         (WebCore::HTMLMediaElement::parseAttribute):
3398
3399 2014-02-11  Samuel White  <samuel_white@apple.com>
3400
3401         AX: Add text replacement activity support to NSAccessibilitySelectTextWithCriteriaParameterizedAttribute.
3402         https://bugs.webkit.org/show_bug.cgi?id=128397
3403
3404         Reviewed by Chris Fleizach.
3405
3406         Added text replacement support for the AXSelectTextWithCriteria parameterized attribute.
3407
3408         No new test. Updated platform/mac/accessibility/select-text.html to test the added functionality.
3409
3410         * accessibility/AccessibilityObject.cpp:
3411         (WebCore::AccessibilityObject::selectText):
3412         * accessibility/AccessibilityObject.h:
3413         (WebCore::AccessibilitySelectTextCriteria::AccessibilitySelectTextCriteria):
3414         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3415         (accessibilitySelectTextCriteriaForCriteriaParameterizedAttribute):
3416
3417 2014-02-11  Roger Fong  <roger_fong@apple.com>
3418
3419         [Windows] Unreviewed. Speculative test fix.
3420
3421         * platform/graphics/GraphicsContext.h:
3422         (WebCore::GraphicsContext::pixelSnappingFactor):
3423         * platform/graphics/cg/GraphicsContextCG.cpp:
3424         (WebCore::GraphicsContext::platformInit):
3425
3426 2014-02-11  Dan Bernstein  <mitz@apple.com>
3427
3428         iOS build fix.
3429
3430         * platform/ios/TileGrid.mm:
3431         (WebCore::TileGrid::dropTilesBetweenRects):
3432         (WebCore::TileGrid::dropDistantTiles):
3433         (WebCore::TileGrid::dropInvalidTiles):
3434
3435 2014-02-11  James Craig  <jcraig@apple.com>
3436
3437         Web Inspector: AX: Accessibility Node Inspection
3438         https://bugs.webkit.org/show_bug.cgi?id=127447
3439
3440         Reviewed by Timothy Hatcher.
3441
3442         New methods supporting WebCore::AccessibilityObject::computedRoleString()
3443         used for Accessibility section in WebInspector Node Inspector. Other updates 
3444         support the JSON interface for the WebInspectorUI feature.
3445
3446         Test: accessibility/roles-computedRoleString.html
3447
3448         * accessibility/AccessibilityObject.cpp:
3449         (WebCore::initializeRoleMap):
3450         (WebCore::ariaRoleMap):
3451         (WebCore::reverseAriaRoleMap):
3452         (WebCore::AccessibilityObject::ariaRoleToWebCoreRole):
3453         (WebCore::AccessibilityObject::computedRoleString):
3454         * accessibility/AccessibilityObject.h:
3455         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3456         (-[WebAccessibilityObjectWrapper computedRoleString]):
3457         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
3458         * inspector/InspectorDOMAgent.cpp:
3459         (WebCore::InspectorDOMAgent::getAccessibilityPropertiesForNode):
3460         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
3461         * inspector/InspectorDOMAgent.h:
3462         * inspector/protocol/DOM.json:
3463
3464 2014-02-10  Oliver Hunt  <oliver@apple.com>
3465
3466         Stop throwing when attempting to read instance properties directly from the prototype
3467         https://bugs.webkit.org/show_bug.cgi?id=128568
3468
3469         Reviewed by Mark Lam.
3470
3471         A number of websites expect to be able to access instance properties
3472         directly through the prototype.  This is broken behavior but if we
3473         throw an exception the entire site breaks.  This patch simply makes us
3474         return undefined when reading, and logs the error to the console.
3475
3476         * bindings/scripts/CodeGeneratorJS.pm:
3477         (GenerateImplementation):
3478         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3479         (WebCore::jsTestActiveDOMObjectExcitingAttr):
3480         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3481         (WebCore::jsTestEventConstructorAttr1):
3482         (WebCore::jsTestEventConstructorAttr2):
3483         * bindings/scripts/test/JS/JSTestException.cpp:
3484         (WebCore::jsTestExceptionName):
3485         * bindings/scripts/test/JS/JSTestInterface.cpp:
3486         (WebCore::jsTestInterfaceImplementsStr1):
3487         (WebCore::jsTestInterfaceImplementsStr2):
3488         (WebCore::jsTestInterfaceImplementsStr3):
3489         (WebCore::jsTestInterfaceImplementsNode):
3490         (WebCore::jsTestInterfaceSupplementalStr1):
3491         (WebCore::jsTestInterfaceSupplementalStr2):
3492         (WebCore::jsTestInterfaceSupplementalStr3):
3493         (WebCore::jsTestInterfaceSupplementalNode):
3494         * bindings/scripts/test/JS/JSTestObj.cpp:
3495         (WebCore::jsTestObjReadOnlyLongAttr):
3496         (WebCore::jsTestObjReadOnlyStringAttr):
3497         (WebCore::jsTestObjReadOnlyTestObjAttr):
3498         (WebCore::jsTestObjConstructorTestSubObj):
3499         (WebCore::jsTestObjTestSubObjEnabledBySettingConstructor):
3500         (WebCore::jsTestObjEnumAttr):
3501         (WebCore::jsTestObjByteAttr):
3502         (WebCore::jsTestObjOctetAttr):
3503         (WebCore::jsTestObjShortAttr):
3504         (WebCore::jsTestObjUnsignedShortAttr):
3505         (WebCore::jsTestObjLongAttr):
3506         (WebCore::jsTestObjLongLongAttr):
3507         (WebCore::jsTestObjUnsignedLongLongAttr):
3508         (WebCore::jsTestObjStringAttr):
3509         (WebCore::jsTestObjTestObjAttr):
3510         (WebCore::jsTestObjXMLObjAttr):
3511         (WebCore::jsTestObjCreate):
3512         (WebCore::jsTestObjReflectedStringAttr):
3513         (WebCore::jsTestObjReflectedIntegralAttr):
3514         (WebCore::jsTestObjReflectedUnsignedIntegralAttr):
3515         (WebCore::jsTestObjReflectedBooleanAttr):
3516         (WebCore::jsTestObjReflectedURLAttr):
3517         (WebCore::jsTestObjReflectedCustomIntegralAttr):
3518         (WebCore::jsTestObjReflectedCustomBooleanAttr):
3519         (WebCore::jsTestObjReflectedCustomURLAttr):
3520         (WebCore::jsTestObjTypedArrayAttr):
3521         (WebCore::jsTestObjAttrWithGetterException):
3522         (WebCore::jsTestObjAttrWithSetterException):
3523         (WebCore::jsTestObjStringAttrWithGetterException):
3524         (WebCore::jsTestObjStringAttrWithSetterException):
3525         (WebCore::jsTestObjCustomAttr):
3526         (WebCore::jsTestObjWithScriptStateAttribute):
3527         (WebCore::jsTestObjWithScriptExecutionContextAttribute):
3528         (WebCore::jsTestObjWithScriptStateAttributeRaises):
3529         (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
3530         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttribute):
3531         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
3532         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
3533         (WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute):
3534         (WebCore::jsTestObjConditionalAttr1):
3535         (WebCore::jsTestObjConditionalAttr2):
3536         (WebCore::jsTestObjConditionalAttr3):
3537         (WebCore::jsTestObjConditionalAttr4Constructor):
3538         (WebCore::jsTestObjConditionalAttr5Constructor):
3539         (WebCore::jsTestObjConditionalAttr6Constructor):
3540         (WebCore::jsTestObjCachedAttribute1):
3541         (WebCore::jsTestObjCachedAttribute2):
3542         (WebCore::jsTestObjAnyAttribute):
3543         (WebCore::jsTestObjContentDocument):
3544         (WebCore::jsTestObjMutablePoint):
3545         (WebCore::jsTestObjImmutablePoint):
3546         (WebCore::jsTestObjStrawberry):
3547         (WebCore::jsTestObjStrictFloat):
3548         (WebCore::jsTestObjDescription):
3549         (WebCore::jsTestObjId):
3550         (WebCore::jsTestObjHash):
3551         (WebCore::jsTestObjReplaceableAttribute):
3552         (WebCore::jsTestObjNullableDoubleAttribute):
3553         (WebCore::jsTestObjNullableLongAttribute):
3554         (WebCore::jsTestObjNullableBooleanAttribute):
3555         (WebCore::jsTestObjNullableStringAttribute):
3556         (WebCore::jsTestObjNullableLongSettableAttribute):
3557         (WebCore::jsTestObjNullableStringValue):
3558         (WebCore::jsTestObjAttribute):
3559         (WebCore::jsTestObjAttributeWithReservedEnumType):
3560         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3561         (WebCore::jsTestSerializedScriptValueInterfaceValue):
3562         (WebCore::jsTestSerializedScriptValueInterfaceReadonlyValue):
3563         (WebCore::jsTestSerializedScriptValueInterfaceCachedValue):
3564         (WebCore::jsTestSerializedScriptValueInterfacePorts):
3565         (WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValue):
3566         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3567         (WebCore::jsTestTypedefsUnsignedLongLongAttr):
3568         (WebCore::jsTestTypedefsImmutableSerializedScriptValue):
3569         (WebCore::jsTestTypedefsConstructorTestSubObj):
3570         (WebCore::jsTestTypedefsAttrWithGetterException):
3571         (WebCore::jsTestTypedefsAttrWithSetterException):
3572         (WebCore::jsTestTypedefsStringAttrWithGetterException):
3573         (WebCore::jsTestTypedefsStringAttrWithSetterException):
3574         * bindings/scripts/test/JS/JSattribute.cpp:
3575         (WebCore::jsattributeReadonly):
3576
3577 2014-02-11  Sergio Villar Senin  <svillar@igalia.com>
3578
3579         [CSS Grid Layout] Support calc() breadth size type
3580         https://bugs.webkit.org/show_bug.cgi?id=103761
3581
3582         Reviewed by Dean Jackson.
3583
3584         We now support using calc() in
3585         -webkit-grid-template-{columns|rows}. This means that we now
3586         match the specification and support all the possible ways to
3587         specify the track breadths.
3588
3589         This includes a fix to CSSCalculationValue that was converting
3590         Length values to CalcExpressionNumber and thus removing all the
3591         info regarding length units (px, em, pt...). That's why things
3592         like calc(10px + 20%) were shown as calc(10 + 20%) in
3593         getComputedStyle() output.
3594
3595         * css/CSSCalculationValue.cpp:
3596         (WebCore::CSSCalcPrimitiveValue::toCalcValue):
3597         * css/CSSComputedStyleDeclaration.cpp:
3598         (WebCore::zoomAdjustedPixelValueForLength):
3599         (WebCore::specifiedValueForGridTrackBreadth):
3600         (WebCore::specifiedValueForGridTrackSize):
3601         * css/StyleResolver.cpp:
3602         (WebCore::createGridTrackBreadth):
3603         * rendering/RenderGrid.cpp:
3604         (WebCore::RenderGrid::computeUsedBreadthOfMinLength):
3605         (WebCore::RenderGrid::computeUsedBreadthOfMaxLength):
3606         (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
3607
3608 2014-02-11  Brent Fulgham  <bfulgham@apple.com>
3609
3610         Correct some uses of 'auto'
3611         https://bugs.webkit.org/show_bug.cgi?id=128578
3612
3613         Reviewed by Anders Carlsson.
3614
3615         Correct the following instances of "for (auto ...)" to use reference or
3616         const references to avoid copies.
3617
3618         * accessibility/AccessibilityObject.cpp:
3619         (WebCore::AccessibilityObject::elementsFromAttribute):
3620         * css/CSSGridTemplateValue.cpp:
3621         (WebCore::stringForPosition):
3622         * dom/Node.cpp:
3623         (WebCore::NodeListsNodeData::invalidateCaches):
3624         * inspector/PageInjectedScriptManager.cpp:
3625         (WebCore::PageInjectedScriptManager::discardInjectedScriptsFor):
3626         * page/WheelEventDeltaTracker.cpp:
3627         (WebCore::WheelEventDeltaTracker::dominantScrollGestureDirection):
3628         * page/scrolling/ScrollingCoordinator.cpp:
3629         (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
3630         * platform/graphics/mac/WebLayer.mm:
3631         (WebCore::drawLayerContents):
3632         * platform/ios/TileGrid.mm:
3633         (WebCore::TileGrid::dropTilesBetweenRects):
3634         (WebCore::TileGrid::dropDistantTiles):
3635         (WebCore::TileGrid::dropInvalidTiles):
3636         * rendering/InlineTextBox.cpp:
3637         (WebCore::translateIntersectionPointsToSkipInkBoundaries):
3638         * testing/InternalSettings.cpp:
3639         (WebCore::InternalSettings::Backup::restoreTo):
3640
3641 2014-02-10  David Hyatt  <hyatt@apple.com>
3642
3643         [New Multicolumn] Make columns work with line grids
3644         https://bugs.webkit.org/show_bug.cgi?id=128555
3645
3646         Reviewed by Antti Koivisto.
3647
3648         Added line-snap-into-columns.html and line-snap-inside-columns.html
3649
3650         * rendering/LayoutState.cpp:
3651         (WebCore::LayoutState::LayoutState):
3652         * rendering/LayoutState.h:
3653         (WebCore::LayoutState::pageOffset):
3654         (WebCore::LayoutState::setLineGridPaginationOrigin):
3655         Change the LayoutState to call into the renderer to compute the line
3656         grid pagination origin instead of doing it directly. Added the
3657         appropriate getters and setters to enable the renderer to do this.
3658
3659         * rendering/RenderBlock.cpp:
3660         (WebCore::RenderBlock::computeLineGridPaginationOrigin):
3661          * rendering/RenderBlock.h:
3662         An implementation for the old multi-column code. The logic is the
3663         same with tweaks made now that the method is on the renderer instead.
3664
3665         * rendering/RenderBlockFlow.cpp:
3666         (WebCore::RenderBlockFlow::pageLogicalTopForOffset):
3667         Fix a bug with flow threads and pageLogicalTopForOffset. Normal CSS region-based
3668         flow threads are never embedded in an enclosing pagination context, so they
3669         didn't add in the firstPageLogicalTop (or subtract it when computing the region
3670         hit). Multi-column flow threads do need to subtract out the firstPageLogicalTop,
3671         since it can occur somewhere on the page.
3672         
3673         Ultimately regions will need to get smarter here too if they want to work with
3674         line grids, but for now I just fixed multi-column.
3675
3676         * rendering/RenderBox.cpp:
3677         (WebCore::RenderBox::isUnsplittableForPagination):
3678         Undo this change, since it prevents the inheritance of line grids into the
3679         multi-column layout.
3680
3681         * rendering/RenderMultiColumnFlowThread.cpp:
3682         (WebCore::RenderMultiColumnFlowThread::computeLineGridPaginationOrigin):
3683         * rendering/RenderMultiColumnFlowThread.h:
3684         An implementation for the new multi-column code. The logic is the
3685         same as the old code. Code duplication is ok, since the old multi-column method
3686         in RenderBlock will just be deleted once the new code is turned on, and it's easier
3687         not to intertwine them.
3688
3689 2014-02-11  Radu Stavila  <stavila@adobe.com>
3690
3691         [CSS Regions] Overflow above the first region is not properly painted for regions with padding
3692         https://bugs.webkit.org/show_bug.cgi?id=128590
3693
3694         Reviewed by Andrei Bucur.
3695
3696         Painting is done using the layer of the region's container, so offsetting using the content box
3697         of the region itself is incorrect. 
3698
3699         Test: fast/regions/region-padding-overflow-hidden.html
3700
3701         * rendering/RenderLayer.cpp:
3702         (WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
3703         * rendering/RenderRegion.cpp:
3704         (WebCore::RenderRegion::regionContainer):
3705         (WebCore::RenderRegion::regionContainerLayer):
3706         * rendering/RenderRegion.h:
3707
3708 2014-02-11  Benjamin Poulain  <benjamin@webkit.org>
3709
3710         querySelector() does not use the compiler correctly
3711         https://bugs.webkit.org/show_bug.cgi?id=128588
3712
3713         Reviewed by Andreas Kling.
3714
3715         * dom/SelectorQuery.cpp:
3716         (WebCore::SelectorDataList::execute):
3717         I messed up the refactoring when I landed SelectorQuery. The compiled
3718         code was not used the first time through SelectorDataList::execute.
3719
3720 2014-02-11  Piotr Grad  <p.grad@samsung.com>
3721
3722         [GStreamer] High playback rate causes crash
3723         https://bugs.webkit.org/show_bug.cgi?id=128453
3724
3725         Reviewed by Philippe Normand.
3726
3727         To high playback rate passed to GStreamer was causing crash.
3728         Added guard in setRate method.
3729
3730         Test: media/video-extreme-playbackrate-crash.html
3731
3732         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3733         (WebCore::MediaPlayerPrivateGStreamer::setRate):
3734
3735 2014-02-10  Brady Eidson  <beidson@apple.com>
3736
3737         IndexedDB assertion at IDBTransactionBackend::~IDBTransactionBackend()
3738         https://bugs.webkit.org/show_bug.cgi?id=128341
3739
3740         Reviewed by Maciej Stachowiak.
3741
3742         * Modules/indexeddb/IDBTransactionBackend.cpp:
3743         (WebCore::IDBTransactionBackend::~IDBTransactionBackend): "Finished" is not the only
3744           valid value here - In WK2, "Unused" is also valid. Update the ASSERT.
3745
3746 2014-02-10  Alexey Proskuryakov  <ap@apple.com>
3747
3748         Add hooks for wrapping CryptoKeys in SerializedScriptValue
3749         https://bugs.webkit.org/show_bug.cgi?id=128567
3750
3751         Reviewed by Anders Carlsson.
3752
3753         * bindings/js/SerializedScriptValue.cpp: Changed SerializedScriptValue to serialize
3754         wrapped keys. Added a version number to crypto key serialization.
3755
3756         * dom/Document.cpp:
3757         (WebCore::Document::wrapCryptoKey):
3758         (WebCore::Document::unwrapCryptoKey):
3759         * dom/Document.h:
3760         * dom/ScriptExecutionContext.h:
3761         * page/ChromeClient.h:
3762         (WebCore::ChromeClient::wrapCryptoKey):
3763         (WebCore::ChromeClient::unwrapCryptoKey):
3764         Hand wrapping/unwrapping over to client code.
3765
3766         * workers/WorkerGlobalScope.cpp:
3767         (WebCore::WorkerGlobalScope::wrapCryptoKey):
3768         (WebCore::WorkerGlobalScope::unwrapCryptoKey):
3769         * workers/WorkerGlobalScope.h:
3770         Not implemented in workers. SubtleCrypto is currently not exposed in workers. It used
3771         to be possible in WebKit implementation to post a CryptoKey to a worker anyway,
3772         but this doesn't work any more.
3773
3774 2014-02-10  ChangSeok Oh  <changseok.oh@collabora.com>
3775
3776         Support ANGLE_instanced_arrays for linux
3777         https://bugs.webkit.org/show_bug.cgi?id=127465
3778
3779         Reviewed by Martin Robinson.
3780
3781         Support the instanced drawing WebGL extension, ANGLE_instanced_arrays for linux platform.
3782         This is a following patch for r162565. Relevant opengl APIs are exposed
3783         for WebGLRenderingContext to access them.
3784
3785         Covered by fast/canvas/webgl/angle-instanced-arrays.html
3786
3787         * html/canvas/ANGLEInstancedArrays.cpp:
3788         (WebCore::ANGLEInstancedArrays::supported):
3789         * platform/graphics/OpenGLShims.cpp:
3790         (WebCore::initializeOpenGLShims):
3791         * platform/graphics/OpenGLShims.h:
3792         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
3793         (WebCore::Extensions3DOpenGL::supportsExtension):
3794         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
3795         (WebCore::GraphicsContext3D::drawArraysInstanced):
3796         (WebCore::GraphicsContext3D::drawElementsInstanced):
3797         (WebCore::GraphicsContext3D::vertexAttribDivisor):
3798
3799 2014-02-10  Mark Lam  <mark.lam@apple.com>
3800
3801         Removing limitation on JSLock’s lockDropDepth.
3802         <https://webkit.org/b/128570>
3803
3804         Reviewed by Geoffrey Garen.
3805
3806         No new tests.
3807
3808         * bindings/js/PageScriptDebugServer.cpp:
3809         (WebCore::PageScriptDebugServer::runEventLoopWhilePaused):
3810         * platform/ios/wak/WebCoreThread.mm:
3811         (SendDelegateMessage):
3812         (WebThreadRunOnMainThread):
3813         - No longer need to specify AlwaysDropLocks, because DropAllLocks is
3814           now always unconditional.
3815
3816 2014-02-10  Benjamin Poulain  <benjamin@webkit.org>
3817
3818         Clean up MarkupAccumulator::appendCharactersReplacingEntities
3819         https://bugs.webkit.org/show_bug.cgi?id=128440
3820
3821         Reviewed by Ryosuke Niwa.
3822
3823         Some cleanup:
3824         -Remove the copied code for the loops. Instead, use a template with the loop
3825          parametrized by the characters type.
3826         -Move EntityDescription from the header to the implementation.
3827         -Make the 5 substitution strings compile-time literals. Replacement is not hot enough
3828          to justify the static here.
3829
3830         * editing/MarkupAccumulator.cpp:
3831         (WebCore::appendCharactersReplacingEntitiesInternal):
3832         (WebCore::MarkupAccumulator::appendCharactersReplacingEntities):
3833         * editing/MarkupAccumulator.h:
3834
3835 2014-02-10  Benjamin Poulain  <benjamin@webkit.org>
3836
3837         Add a few pseudo type to the selector compiler through function calls
3838         https://bugs.webkit.org/show_bug.cgi?id=128514
3839
3840         Reviewed by Dean Jackson.
3841
3842         Certain pseudo type checkers rely on virtual function calls. Since those types
3843         are uncommon, and this code generator cannot currently make virtual function calls,
3844         the checker are added by generating a function call to a wrapper function.
3845
3846         To avoid code duplication between SelectorChecker and the compiler, all the relevant checking
3847         code has been moved to a common header, SelectorCheckerTestFunctions.h.
3848         SelectorChecker still inline the functions, while the SelectorCompiler generate local static functions
3849         and generate calls to them as needed.
3850
3851         * GNUmakefile.list.am:
3852         * WebCore.vcxproj/WebCore.vcxproj:
3853         * WebCore.vcxproj/WebCore.vcxproj.filters:
3854         * WebCore.xcodeproj/project.pbxproj:
3855         * css/SelectorChecker.cpp:
3856         (WebCore::SelectorChecker::checkOne):
3857         * css/SelectorCheckerTestFunctions.h: Added.
3858         (WebCore::isAutofilled):
3859         (WebCore::isDefaultButtonForForm):
3860         (WebCore::isDisabled):
3861         (WebCore::isEnabled):
3862         (WebCore::isChecked):
3863         (WebCore::isInvalid):
3864         (WebCore::isOptionalFormControl):
3865         (WebCore::isRequiredFormControl):
3866         (WebCore::isValid):
3867         (WebCore::matchesReadOnlyPseudoClass):
3868         (WebCore::matchesReadWritePseudoClass):
3869         (WebCore::shouldAppearIndeterminate):
3870         (WebCore::matchesFullScreenPseudoClass):
3871         (WebCore::matchesFutureCuePseudoClass):
3872         (WebCore::matchesPastCuePseudoClass):
3873         * cssjit/SelectorCompiler.cpp:
3874         (WebCore::SelectorCompiler::addPseudoType):
3875         (WebCore::SelectorCompiler::nonConstTestFunctionWrapper):
3876         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
3877         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementFunctionCallTest):
3878         * dom/Element.h:
3879         (WebCore::Element::isValidFormControlElement):
3880         * dom/Node.h:
3881         (WebCore::Node::toInputElement):
3882         * html/HTMLFormControlElement.cpp:
3883         (WebCore::HTMLFormControlElement::isValidFormControlElement):
3884         * html/HTMLFormControlElement.h:
3885
3886 2014-02-10  Benjamin Poulain  <benjamin@webkit.org>
3887
3888         Add the basic infrastructure to compile attributes matching in selectors
3889         https://bugs.webkit.org/show_bug.cgi?id=128484
3890
3891         Reviewed by Gavin Barraclough.
3892
3893         Tests: fast/selectors/querySelector-attribute-match-with-child-backtracking.html
3894                fast/selectors/querySelector-long-attribute-match-with-child-backtracking.html
3895                fast/selectors/querySelector-long-multiple-attribute-match-with-child-backtracking.html
3896                fast/selectors/querySelector-multiple-attribute-match-with-child-backtracking.html
3897
3898         Add the infrastructure to match attributes. This only add basic support for the 'Set' match
3899         type, the other match types will have to be built on top.
3900
3901         * cssjit/RegisterAllocator.h:
3902         (WebCore::RegisterAllocator::availableRegisterCount):
3903         (WebCore::RegisterAllocator::allocateRegister):
3904         (WebCore::RegisterAllocator::deallocateRegister):
3905         (WebCore::RegisterAllocator::reserveCalleeSavedRegisters):
3906         (WebCore::RegisterAllocator::restoreCalleeSavedRegisters):
3907         (WebCore::RegisterAllocator::allocatedRegisters):
3908         (WebCore::RegisterAllocator::RegisterAllocator):
3909         (WebCore::RegisterAllocator::~RegisterAllocator):
3910         In the worst case, matching attributes can take up to 10 registers. On x86_64, we have
3911         8 caller-saved registers. The extra 2 registers are simply added by taking callee-saved registers.
3912
3913         RegisterAllocator is modified to know support saving and restoring callee saved registers.
3914         The list of available registers is changed from a vector to a HashSet because the registers
3915         are removed from arbitrary locations in restoreCalleeSavedRegisters(). The m_allocatedRegisters
3916         remain a vector since the allocation/release pattern remain ordered.
3917
3918         * cssjit/SelectorCompiler.cpp:
3919         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
3920
3921         (WebCore::SelectorCompiler::minimumRegisterRequirements):
3922         This new utility finds the minimum number of registers needed to compile the input. In most
3923         cases we have plenty enough. In rare cases we need to saved a few registers to the stack.
3924
3925         (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
3926         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementDataMatching):
3927         (WebCore::SelectorCompiler::testIsHTMLFlagOnNode):
3928         (WebCore::SelectorCompiler::canMatchStyleAttribute):
3929
3930         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSynchronizeStyleAttribute):
3931         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSynchronizeAllAnimatedSVGAttribute):
3932         The style attribute and certain SVG attributes can be modified lazily. In those cases,
3933         the element needs to be updated before querying the attributes.
3934
3935         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributesMatching):
3936         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeMatching):
3937         Generate the attribute matching. For each CSSSelector matching an attribute, we generate
3938         a loop over all the attributes of the element, maching the particular CSSSelector.
3939         This makes no attempt at grouping related queries since those do not seem to happen a lot
3940         in practice.
3941
3942         * dom/Attribute.h:
3943         (WebCore::Attribute::nameMemoryOffset):
3944         (WebCore::Attribute::nameMatchesFilter):
3945         (WebCore::Attribute::matches):
3946         * dom/ElementData.h:
3947         (WebCore::ElementData::isUniqueFlag):
3948         (WebCore::ElementData::arraySizeAndFlagsMemoryOffset):
3949         (WebCore::ElementData::styleAttributeIsDirtyFlag):
3950         (WebCore::ElementData::animatedSVGAttributesAreDirtyFlag):
3951         (WebCore::ElementData::arraySizeOffset):
3952         (WebCore::ShareableElementData::attributeArrayMemoryOffset):
3953         (WebCore::UniqueElementData::attributeVectorMemoryOffset):
3954         * dom/Node.h:
3955         (WebCore::Node::flagIsHTML):
3956         * dom/StyledElement.cpp:
3957         (WebCore::StyledElement::synchronizeStyleAttributeInternal):
3958         * dom/StyledElement.h:
3959         (WebCore::StyledElement::synchronizeStyleAttributeInternal):
3960         * svg/SVGElement.cpp:
3961         (WebCore::SVGElement::synchronizeAllAnimatedSVGAttribute):
3962         (WebCore::SVGElement::synchronizeAnimatedSVGAttribute):
3963         * svg/SVGElement.h:
3964
3965 2014-02-10  Brady Eidson  <beidson@apple.com>
3966
3967         IDB: storage/indexeddb/mozilla/indexes.html fails
3968         <rdar://problem/16031590> and https://bugs.webkit.org/show_bug.cgi?id=128563
3969
3970         Reviewed by Tim Horton.
3971
3972         Tested by storage/indexeddb/mozilla/indexes.html (and probably others)
3973
3974         * Modules/indexeddb/IDBGetResult.h:
3975         (WebCore::IDBGetResult::IDBGetResult): Add a constructor that takes an IDBKeyData argument.
3976
3977         * Modules/indexeddb/IDBRequest.cpp:
3978         (WebCore::IDBRequest::onSuccess): If there’s no keyPath then skip the injection step.
3979
3980 2014-02-10  Benjamin Poulain  <benjamin@webkit.org>
3981
3982         Speed up DatasetDOMStringMap::item() when the element has multiple attributes
3983         https://bugs.webkit.org/show_bug.cgi?id=128058
3984
3985         Reviewed by Darin Adler.
3986
3987         Accessing data attributes by name through DatasetDOMStringMap involes the conversion
3988         from JavaScript property name to attribute name (done with propertyNameMatchesAttributeName()).
3989
3990         When there is a single data attribute, that method is efficient. When there are several attributes,
3991         comparing names character by character becomes a bottleneck.
3992
3993         This patch add an efficent path for this case: instead of converting the attribute name on the fly,
3994         the JavaScript property name is converted to an attribute name so that it can compared by its
3995         AtomicStringImpl pointer.
3996
3997         This method puts a lot more pressure on convertPropertyNameToAttributeName()'s speed. The method was
3998         improved accordingly to compensate for its new caller.
3999
4000         When enumerating multiple attributes by name, this patch provides about 80% speedup.
4001         I could not measure any slow down on the simple cases.
4002
4003         * dom/DatasetDOMStringMap.cpp:
4004         (WebCore::convertPropertyNameToAttributeName):
4005         (WebCore::DatasetDOMStringMap::item):
4006         * dom/ElementData.h:
4007         (WebCore::AttributeIteratorAccessor::attributeCount):
4008
4009 2014-02-10  Ryosuke Niwa  <rniwa@webkit.org>
4010
4011         Address the review comments for r163825.
4012
4013         * html/HTMLTextFormControlElement.cpp:
4014         (WebCore::HTMLTextFormControlElement::indexForVisiblePosition):
4015         (WebCore::positionForIndex):
4016
4017 2014-02-10  Simon Fraser  <simon.fraser@apple.com>
4018
4019         Try to fix the 32-bit build.
4020
4021         * WebCore.exp.in:
4022
4023 2014-02-10  Filip Pizlo  <fpizlo@apple.com>
4024
4025         Rename Operations.h to JSCInlines.h
4026         https://bugs.webkit.org/show_bug.cgi?id=128543
4027
4028         Rubber stamped by Geoffrey Garen.
4029
4030         No new tests because no change in behavior.
4031
4032         * ForwardingHeaders/runtime/JSCInlines.h: Added.
4033         * bindings/js/JSCryptoAlgorithmBuilder.cpp: