[Replaceable] attributes must be readonly
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-05-06  Ryosuke Niwa  <rniwa@webkit.org>
2
3         [Replaceable] attributes must be readonly
4         https://bugs.webkit.org/show_bug.cgi?id=115692
5
6         Reviewed by Kentaro Hara.
7
8         Merge https://chromium.googlesource.com/chromium/blink/+/ac61fbfe875d3c3c37d529683139ceb0ad4330bb.
9
10         Web IDL specification says [Replaceable] attributes are readonly:
11         http://www.w3.org/TR/2012/CR-WebIDL-20120419/#Replaceable
12
13         Update the two instances of [Replaceable] in WebCore that didn't have readonly modifier to match
14         the specifcation and the rest of WebCore. There should be no behavioral changes as the code generator
15         already assumed [Replaceable] attributes are readonly.
16
17         * html/HTMLDocument.idl:
18         * page/DOMWindow.idl:
19
20 2013-05-06  Darin Adler  <darin@apple.com>
21
22         Use OwnPtr instead of deleteAllValues in DocumentMarkerController
23         https://bugs.webkit.org/show_bug.cgi?id=115655
24
25         Reviewed by Andreas Kling.
26
27         * dom/DocumentMarkerController.cpp:
28         (WebCore::DocumentMarkerController::~DocumentMarkerController): Added here
29         so the destructor isn't implicitly inline.
30         (WebCore::DocumentMarkerController::detach): Removed now-unneeded code to
31         call deleteAllValues. Also moved code to set m_possiblyExistingMarkerTypes
32         to after clearing m_markers to be consistent with how other functions do it.
33         (WebCore::DocumentMarkerController::addMarker): Changed code to use the
34         add idiom to avoid double hash table lookup. Changed to use adoptPtr since
35         the map now contains OwnPtr.
36         (WebCore::DocumentMarkerController::removeMarkers): Removed explicit calls
37         to delete list since removing the entry from the map now deletes the list.
38         Moved the code to check if m_markers has become empty so it's only called
39         when we actually remove something from m_markers.
40         (WebCore::DocumentMarkerController::markerContainingPoint): Added get().
41         (WebCore::DocumentMarkerController::renderedRectsForMarkers): Added get().
42         (WebCore::DocumentMarkerController::removeMarkers): Changed to use a new
43         interface to removeMarkersFromList. This eliminated the need to copy the
44         entire map when removing markers; instead we can just copy the keys.
45         (WebCore::DocumentMarkerController::removeMarkersFromList): Changed to use
46         an iterator instead of being passed the key/value pair from the map. Also
47         rearranged the logic so there is less repeated code and removed some now-
48         unneeded comments.
49         (WebCore::DocumentMarkerController::repaintMarkers): Added get().
50         (WebCore::DocumentMarkerController::invalidateRenderedRectsForMarkersInRect):
51         Added get().
52         (WebCore::DocumentMarkerController::showMarkers): Added get().
53
54         * dom/DocumentMarkerController.h: Removed implementation of the destructor
55         that called the detach function; that was just sharing the now-unneeded
56         call to deleteAllValues. Changed the type of the map to use an OwnPtr for
57         the value. Changed the interface of removeMarkersFromList to take a map
58         iterator instead of a key/value pair.
59
60 2013-05-06  Beth Dakin  <bdakin@apple.com>
61
62         Reproducible crash in RenderBoxModelObject::adjustedPositionRelativeToOffsetParent()
63         https://bugs.webkit.org/show_bug.cgi?id=115685
64         -and corresponding-
65         <rdar://problem/13700734>
66
67         Reviewed by Sam Weinig.
68
69         This fix here is just to rollout the change that caused this regression, which is 
70         http://trac.webkit.org/changeset/147395 . That change was not intended to cause any 
71         behavioral differences. The change made it so RenderObject::offsetParent() returned 
72         an Element* instead of a RenderBoxModelObject*. However, can muddle things when the 
73         object we are returning is a continuation. Multiple RenderObjects have the same 
74         Element in a continuation, so this new code can lead to a crash in 
75         adjustedPositionRelativeToOffsetParent() when we expect to walk the RenderObject 
76         chain and find the offsetParent in the Element’s parent chain. But we might crash in 
77         some complicated continuation scenarios because we lost this disambiguation of which 
78         RenderObject to start with.
79
80         Roll out.
81         * dom/Element.cpp:
82         (WebCore::Element::offsetParent):
83         * rendering/RenderBoxModelObject.cpp:
84         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
85         * rendering/RenderObject.cpp:
86         (WebCore::RenderObject::offsetParent):
87         * rendering/RenderObject.h:
88         (RenderObject):
89
90 2013-05-06  Ryosuke Niwa  <rniwa@webkit.org>
91
92         Unify ways to cache named item in HTMLCollections
93         https://bugs.webkit.org/show_bug.cgi?id=115584
94
95         Reviewed by Antti Koivisto.
96
97         Refactor the code to share the same infrastructure for both id and name attributes maps.
98
99         Also get rid of shouldRegisterAsNamedItem and shouldRegisterAsExtraNamedItem from various Element subclasses
100         as these member functions were duplicating the information in HTMLNameCollection.cpp. Nevertheless, HTMLImageElement
101         and HTMLObjectElement still update HTMLDocument's window and document name getter maps when their presence as named
102         item changes due to an attribute change and children changes respectively.
103
104         * bindings/js/JSDOMWindowCustom.cpp:
105         (WebCore::namedItemGetter): Use windowNamedItemMap().containsSingle() instead of collection->hasExactlyOneItem() to
106         avoid instantiating HTMLCollection until we know for sure we're returning multiple items.
107         (WebCore::JSDOMWindow::getOwnPropertySlot): Call windowNamedItemMap().contains() instead of document->hasNamedItem()
108         since the latter has been removed.
109         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex): Ditto.
110         (WebCore::JSDOMWindow::getOwnPropertyDescriptor): Ditto.
111
112         * bindings/js/JSHTMLDocumentCustom.cpp:
113         (WebCore::JSHTMLDocument::canGetItemsForName): Call documentNamedItemMap().contains() instead of
114         document->hasExtraNamedItem() since the latter has been removed.
115         (WebCore::JSHTMLDocument::nameGetter): Use documentNamedItemMap().containsSingle() instead of
116         collection->hasExactlyOneItem() to avoid instantiating HTMLCollection when we're returning the first item.
117
118         * dom/Document.cpp:
119         (WebCore::Document::windowNamedItems): Instantiate WindowNameCollection, which is a subclass of HTMLNameCollection,
120         instead of HTMLNameCollection since the latter class no longer has a public constructor.
121         (WebCore::Document::documentNamedItems): Ditto; instantiate DocumentNameCollection.
122
123         * dom/DocumentOrderedMap.cpp:
124         (WebCore::keyMatchesName): Added for name attribute.
125         (WebCore::keyMatchesWindowNamedItem): Added for window name getter.
126         (WebCore::keyMatchesDocumentNamedItem): Added for document name getter.
127         (WebCore::DocumentOrderedMap::getElementByName): Added for name attribute.
128         (WebCore::DocumentOrderedMap::getElementByWindowNamedItem): Added for window name getter.
129         (WebCore::DocumentOrderedMap::getElementByDocumentNamedItem): Added for document name getter.
130
131         * dom/DocumentOrderedMap.h:
132         (WebCore::DocumentOrderedMap::containsSingle): Added.
133         (WebCore::DocumentOrderedMap::containsMultiple): Fixed the bug that containsMultiple returns true even when
134         the duplicate count has been reduced to 1. Unfortunately this behavior change is not testable because the old code
135         worked properly (though less efficient) even if this function returned a wrong value.
136
137         * dom/Element.cpp:
138         (WebCore::Element::insertedInto):
139         (WebCore::Element::removedFrom):
140         (WebCore::Element::updateName): Added. Updates TreeScope's name attribute map as well as HTMLDocument's window name
141         and document name maps.
142         (WebCore::Element::updateId): Added the code to update HTMLDocument's window name and document name maps.
143
144         * dom/Element.h:
145         (Element): Removed shouldRegisterAsNamedItem, shouldRegisterAsExtraNamedItem, updateNamedItemRegistration, and
146         updateExtraNamedItemRegistration as they're no longer used.
147
148         * dom/TreeScope.cpp:
149         (SameSizeAsTreeScope):
150         (WebCore::TreeScope::getElementByName): Added.
151         (WebCore::TreeScope::addElementByName): Added.
152         (WebCore::TreeScope::removeElementByName): Added.
153
154         * dom/TreeScope.h:
155         (WebCore::TreeScope::hasElementWithName): Added.
156         (WebCore::TreeScope::containsMultipleElementsWithName): Added.
157
158         * html/HTMLAppletElement.h:
159         (HTMLAppletElement):
160
161         * html/HTMLCollection.cpp:
162         (WebCore::isMatchingElement): Use HTMLNameCollection subclasses' nodeMatches.
163         (WebCore::HTMLCollection::namedItem): Added a fast path for named item.
164         (WebCore::HTMLCollection::hasNamedItem): Use namedItem to avoid the work in the fast path.
165
166         * html/HTMLCollection.h:
167         (HTMLCollection): Removed checkForNameMatch.
168         * html/HTMLDocument.cpp:
169         (WebCore): Removed various member functions related to m_namedItemCounts and m_extraNamedItemCounts.
170
171         * html/HTMLDocument.h:
172         (WebCore::HTMLDocument::documentNamedItemMap): Added.
173         (WebCore::HTMLDocument::windowNamedItemMap): Added.
174         (HTMLDocument): Replaced m_namedItemCounts and m_extraNamedItemCounts by m_documentNamedItem and m_windowNamedItem.
175         Note that they're not one to one.
176
177         * html/HTMLEmbedElement.h:
178         (HTMLEmbedElement):
179
180         * html/HTMLFormElement.h:
181         (HTMLFormElement):
182
183         * html/HTMLIFrameElement.cpp: Removed the code to track the element's name since we already do this in Element.
184         (WebCore::HTMLIFrameElement::parseAttribute):
185
186         * html/HTMLIFrameElement.h:
187         (HTMLIFrameElement):
188
189         * html/HTMLImageElement.cpp:
190         (WebCore::HTMLImageElement::parseAttribute): Update the HTMLDocument's maps when the name attribute's existence
191         changes its presence on window and document name getters in turn. This behavior change, again, appears to be
192         untestable due to the old being more graceful when DocumentOrderedMap returned a wrong value.
193
194         * html/HTMLImageElement.h:
195
196         * html/HTMLNameCollection.cpp:
197         (WebCore::HTMLNameCollection::HTMLNameCollection): No longer overrides itemAfter. This enables backwards traversals
198         of the tree along with other optimizations in HTMLCollection.
199
200         (WebCore::WindowNameCollection::nodeMatchesIfNameAttributeMatch): Added. Used in Element::updateName to determine
201         whether add() or remove() should be called on HTMLDocument's maps.
202         (WebCore::WindowNameCollection::nodeMatches): Added.
203
204         (WebCore::DocumentNameCollection::nodeMatchesIfIdAttributeMatch): Added. Used in Element::updateName to determine
205         whether add() or remove() should be called on HTMLDocument's maps.
206         (WebCore::DocumentNameCollection::nodeMatchesIfNameAttributeMatch): Ditto.
207         (WebCore::DocumentNameCollection::nodeMatches): Added.
208
209         * html/HTMLNameCollection.h:
210         (HTMLNameCollection): Removed create since this class shouldn't be instantiated on its own.
211
212         (WebCore::WindowNameCollection): Added.
213         (WebCore::WindowNameCollection::create): Added.
214         (WebCore::WindowNameCollection::nodeMatches): Added.
215         (WebCore::WindowNameCollection::nodeMatchesIfIdAttributeMatch): Added.
216         (WebCore::WindowNameCollection::WindowNameCollection): Added.
217         (WebCore::DocumentNameCollection): Added.
218         (WebCore::DocumentNameCollection::create): Added.
219         (WebCore::DocumentNameCollection::nodeMatches): Added.
220         (WebCore::DocumentNameCollection::DocumentNameCollection): Added.
221
222         * html/HTMLObjectElement.cpp:
223         (WebCore::HTMLObjectElement::updateDocNamedItem): Update both window and document getter maps of HTMLDocument when
224         the visibility of this element changes due to the DOM mutations in the subtree.
225
226         * html/HTMLObjectElement.h:
227         (WebCore::HTMLObjectElement):
228         (WebCore::toHTMLObjectElement): Added.
229
230 2013-05-06  Andreas Kling  <akling@apple.com>
231
232         Flaky Test: fast/frames/crash-remove-iframe-during-object-beforeload.html
233         <http://webkit.org/b/115674>
234
235         Reviewed by Alexey Proskuryakov.
236
237         Don't cache the Document::renderer() in a local since layout may blow it away.
238
239         * dom/Document.cpp:
240         (WebCore::Document::implicitClose):
241
242 2013-05-06  Anders Carlsson  <andersca@apple.com>
243
244         More work on LocalStorageDatabaseTracker
245         https://bugs.webkit.org/show_bug.cgi?id=115680
246
247         Reviewed by Andreas Kling.
248
249         Export symbols needed by WebKit2.
250
251         * WebCore.exp.in:
252
253 2013-05-06  Manuel Rego Casasnovas  <rego@igalia.com>
254
255         [GTK] Add webkit_uri_scheme_request_finish_error
256         https://bugs.webkit.org/show_bug.cgi?id=94316
257
258         Reviewed by Anders Carlsson.
259
260         No behaviour change, covered by existing tests.
261
262         * platform/network/soup/ResourceError.h:
263         (ResourceError): Rename genericIOError() to genericGError().
264         * platform/network/soup/ResourceErrorSoup.cpp:
265         (WebCore::ResourceError::httpError): Use genercicGError() instead of
266         genericIOError().
267         (WebCore::ResourceError::genericGError): Use error domain instead of
268         always return a G_IO_ERROR.
269         * platform/network/soup/ResourceHandleSoup.cpp: Use genericGError()
270         instead of genericIOError().
271         (WebCore::redirectSkipCallback):
272         (WebCore::readCallback):
273
274 2013-05-06  Bem Jones-Bey  <bjonesbe@adobe.com>
275
276         Heap-use-after-free in WebCore::InlineFlowBox::deleteLine
277         https://bugs.webkit.org/show_bug.cgi?id=114772
278
279         Reviewed by David Hyatt.
280
281         Fix the new use after free issues in Ruby.
282
283         Test: fast/ruby/ruby-svg-crash.html
284
285         * rendering/RenderRubyRun.cpp:
286         (WebCore::RenderRubyRun::removeChild):
287
288 2013-05-06  Robert Hogan  <robert@webkit.org>
289
290         REGRESSION(r140024): child of fixed div inside of absolute div does not get resized when window is resized
291         https://bugs.webkit.org/show_bug.cgi?id=115379
292
293         Reviewed by David Hyatt.
294
295         When detecting whether a fixed pos object needed to move with an absolute ancestor we checked
296         whether the logical width of the fixed pos object had changed. This check prevented the fixed pos
297         object from detecting later on that it needed to relayout its children in layoutBlock(). So recompute the width
298         for our check instead of updating it.
299
300         Test: fast/block/positioning/child-of-fixed-pos-after-movement.html
301
302         * rendering/RenderBlock.cpp:
303         (WebCore::RenderBlock::markFixedPositionObjectForLayoutIfNeeded):
304
305 2013-05-06  Mike Lattanzio  <mlattanzio@blackberry.com>
306
307         [BlackBerry] Enable and Expose Text Autosizing through BlackBerry::WebKit::WebSettings
308         https://bugs.webkit.org/show_bug.cgi?id=113808
309
310         Reviewed by Rob Buis.
311
312         Added TextAutosizer.cpp to the BlackBerry build.
313
314         * PlatformBlackBerry.cmake:
315
316 2013-05-06  Darin Adler  <darin@apple.com>
317
318         Use OwnPtr instead of deleteAllValues in SVGAttributeToPropertyMap
319         https://bugs.webkit.org/show_bug.cgi?id=115653
320
321         Reviewed by Andreas Kling.
322
323         Also made a few style fixes to the code at the same time.
324
325         * svg/properties/SVGAttributeToPropertyMap.cpp:
326         (WebCore::SVGAttributeToPropertyMap::addProperties): Changed argument to
327         const because there was no reason for it to be non-const. Added calls to
328         get() since the items in the map are now OwnPtr. Added a couple FIXMEs
329         about performance mistakes.
330         (WebCore::SVGAttributeToPropertyMap::addProperty): Added a FIXME about
331         a small performance mistake, and updated to use OwnPtr instead of raw
332         pointers.
333         (WebCore::SVGAttributeToPropertyMap::synchronizeProperties): Added a call
334         to get().
335
336         * svg/properties/SVGAttributeToPropertyMap.h: Removed now-unneeded
337         constructor and destructor definitions. Changed the type for the
338         addProperties to be const&. Added a comment about incorrect function
339         naming. Changed the type of the map data member to use OwnPtr.
340
341 2013-05-06  Antti Koivisto  <antti@apple.com>
342
343         Remove more code that was only needed for younger/older shadow trees
344         https://bugs.webkit.org/show_bug.cgi?id=115662
345
346         Reviewed by Andreas Kling.
347
348         This is dead code.
349
350         * WebCore.exp.in:
351         * dom/ComposedShadowTreeWalker.cpp:
352         (WebCore::nodeCanBeDistributed):
353         (WebCore::ComposedShadowTreeWalker::traverseParentBackToShadowRootOrHost):
354         * dom/EventPathWalker.cpp:
355         (WebCore::EventPathWalker::moveToParent):
356         * html/shadow/ContentDistributor.cpp:
357         (WebCore::ScopeContentDistribution::ScopeContentDistribution):
358         (WebCore::ScopeContentDistribution::registerInsertionPoint):
359         (WebCore::ScopeContentDistribution::unregisterInsertionPoint):
360         (WebCore):
361         (WebCore::ScopeContentDistribution::hasInsertionPoint):
362         (WebCore::ContentDistributor::invalidate):
363         * html/shadow/ContentDistributor.h:
364         (ScopeContentDistribution):
365         * html/shadow/InsertionPoint.cpp:
366         (WebCore::InsertionPoint::contains):
367         (WebCore::resolveReprojection):
368         (WebCore::collectInsertionPointsWhereNodeIsDistributed):
369         * html/shadow/InsertionPoint.h:
370         * testing/Internals.cpp:
371         (WebCore):
372         * testing/Internals.h:
373         (Internals):
374         * testing/Internals.idl:
375
376 2013-05-06  Tiancheng Jiang  <tijiang@rim.com>
377
378         [BlackBerry] Update HTML5 progress bar UX.
379         https://bugs.webkit.org/show_bug.cgi?id=115284.
380
381         Reviewed by Rob Buis.
382
383         BlackBerry PR 331729.
384         Internally Reviewed by Jeff Rogers.
385
386         Use GL render to paint progress bar to meet UX specs.
387         Also change the slider range to GL render.
388
389         * platform/blackberry/RenderThemeBlackBerry.cpp:
390         (WebCore):
391         (WebCore::RenderThemeBlackBerry::paintSliderTrack):
392         (WebCore::RenderThemeBlackBerry::paintProgressTrackRect):
393         (WebCore::drawProgressTexture):
394         (WebCore::RenderThemeBlackBerry::paintProgressBar):
395         * platform/blackberry/RenderThemeBlackBerry.h:
396         (RenderThemeBlackBerry):
397
398 2013-05-06  Bem Jones-Bey  <bjonesbe@adobe.com>
399
400         [CSS Exclusions] remove unused -webkit-wrap property
401         https://bugs.webkit.org/show_bug.cgi?id=102105
402
403         Reviewed by Darin Adler.
404
405         Remove -webkit-wrap property and all mentions. This property doesn't
406         exist in the spec anymore, and was never implemented more than just
407         parsing the property.
408
409         * WebCore.order:
410         * css/CSSComputedStyleDeclaration.cpp:
411         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
412         * css/CSSParser.cpp:
413         (WebCore::CSSParser::parseValue):
414         * css/CSSProperty.cpp:
415         (WebCore::CSSProperty::isInheritedProperty):
416         * css/CSSPropertyNames.in:
417         * css/StylePropertySet.cpp:
418         (WebCore::StylePropertySet::getPropertyValue):
419         (WebCore::StylePropertySet::asText):
420         * css/StylePropertyShorthand.cpp:
421         (WebCore::shorthandForProperty):
422         * css/StylePropertyShorthand.h:
423         (WebCore):
424         * css/StyleResolver.cpp:
425         (WebCore::StyleResolver::applyProperty):
426
427 2013-05-06  Anders Carlsson  <andersca@apple.com>
428
429         Write storage changes to disk
430         https://bugs.webkit.org/show_bug.cgi?id=115660
431
432         Reviewed by Andreas Kling.
433
434         Export symbols needed by WebKit2.
435
436         * WebCore.exp.in:
437
438 2013-05-06  Tiancheng Jiang  <tijiang@rim.com>
439
440         [BlackBerry] Update HTML5 progress bar UX.
441         https://bugs.webkit.org/show_bug.cgi?id=115284.
442
443         Reviewed by Rob Buis.
444
445         BlackBerry PR 331729.
446         Internally Reviewed by Jeff Rogers.
447
448         * platform/blackberry/RenderThemeBlackBerry.cpp:
449         (WebCore):
450         (WebCore::createLinearGradient):
451         (WebCore::RenderThemeBlackBerry::paintSliderTrack):
452         (WebCore::RenderThemeBlackBerry::paintSliderTrackRect):
453         (WebCore::RenderThemeBlackBerry::paintProgressBar):
454         * platform/blackberry/RenderThemeBlackBerry.h:
455         (RenderThemeBlackBerry):
456
457 2013-05-06  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
458
459         [texmap] draw content if graphics layer displays a video
460         https://bugs.webkit.org/show_bug.cgi?id=114742
461
462         Reviewed by Noam Rosenthal.
463
464         Bug #86410 focuses on having composited/accelerated video using the
465         TextureMapper. But the video is not rendered fast by using the
466         repaint() method. In the case of the TextureMapper it is required to
467         call a content display as fast as possible.
468
469         This patch adds the class TextureMapperPlatformLayer::Client with the
470         method setLayerNeedsDisplay(). The GraphicsLayerTextureMapper
471         implements this new class and the new method calls
472         setContentsNeedsDisplay(), causing a faster content display when
473         requested.
474
475         No new tests. Covered by existing tests.
476
477         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
478         (WebCore::GraphicsLayerTextureMapper::setContentsToMedia): sets itself
479         as the TextureMapperPlatformLayer's client
480         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
481         (WebCore::GraphicsLayerTextureMapper::setLayerNeedsDisplay):
482         TextureMapperPlatformLayer::Client::setLayerNeedsDisplay implementation
483         (GraphicsLayerTextureMapper):
484         * platform/graphics/texmap/TextureMapperPlatformLayer.h:
485         (Client): New class
486         (WebCore::TextureMapperPlatformLayer::TextureMapperPlatformLayer):
487         (WebCore::TextureMapperPlatformLayer::setClient): client setter
488         (WebCore::TextureMapperPlatformLayer::setLayerNeedsDisplay): facade
489         for client's method
490
491 2013-05-02  David Hyatt  <hyatt@apple.com>
492
493         Improve the performance of RenderDeprecatedFlexibleBox.
494         https://bugs.webkit.org/show_bug.cgi?id=115543.
495
496         Optimize deprecated flexible box layout to be much faster. This patch implements
497         the following optimizations in the deprecated flexible box:
498         
499         (1) Defer repainting of children until they have been placed into their final
500         positions. This is done by collecting all of the old frame rects into a Vector
501         and then doing a walk after layout is finished to repaint any of the children if
502         they moved from that position. This code matches the new RenderFlexibleBox's system
503         for repainting moved children.
504         
505         (2) Implement support for layout deltas. We keep a Vector of layout deltas for each
506         child as we shift them around, and every time we lay a child out again, we apply that
507         child's current layout delta to avoid repainting at the new position. RenderFlexibleBox
508         does not have support for layout deltas yet, so we'll need to implement this in the
509         new flexbox code as well.
510         
511         (3) Optimize flexible objects to avoid laying them out unflexed. When laying out
512         horizontal and vertical boxes now, we lay out the inflexible items first. We then
513         check to see if the inflexible extent of all those children has changed.
514         
515         If this extent didn't change, and the flexible items either don't need layout or there
516         is only one flexing item, then we avoid laying out the item in an unflexed state
517         and simply lay out one time with the flex applied instead. The new RenderFlexibleBox
518         does not have these optimizations and would benefit from them in the block-direction box
519         case (it uses preferred logical widths in the inline-direction box case, and so avoided
520         layouts in that direction already).
521         
522         Reviewed by Beth Dakin.
523
524         * rendering/RenderDeprecatedFlexibleBox.cpp:
525         (WebCore::appendChildFrameRects):
526         Cache all of the old child frame rects so that we can compare them with the final
527         positions for repaintDuringLayoutIfMoved. This collection is identical to what the
528         new flexbox code does.
529         
530         (WebCore::appendChildLayoutDeltas):
531         Build up a vector that tracks layout deltas. We apply these layout deltas every
532         time we lay out a child so that any repainting done during layout ignores our shifted
533         position and just keeps using the old position. The new flexbox does not have this
534         code yet.
535
536         (WebCore::repaintChildrenDuringLayoutIfMoved):
537         After final placement of children, we do a single pass over all of the children and
538         repaint them if they shifted their positions. This matches how the new flexbox works.
539         
540         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
541         Collect the frame rects and layout deltas, and defer repainting of children to the
542         end of layout.
543         
544         (WebCore::gatherFlexChildrenInfo):
545         Don't clear flex overrides when gathering flex information. Add additional information
546         such as the number of flexing items so that we can use it to optimize flex layout.
547         
548         (WebCore::layoutChildIfNeededApplyingDelta):
549         A helper for applying your current layout delta for a child when laying that child out.
550         
551         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
552         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
553         Both methods are patched to aggregate layout deltas as children move around during
554         the multiple passes. In addition we now optimize layout in a couple of cases, such
555         as when the inflexible space stays the same (thus giving a flexible object the
556         same amount of available space, avoiding a need to lay out unflexed first).
557         
558         (WebCore::RenderDeprecatedFlexibleBox::placeChild):
559         Patched to add to our cached layout delta for that child when we do a movement.
560
561         * rendering/RenderDeprecatedFlexibleBox.h:
562         Changes to method signatures.
563
564 2013-05-04  Andy Estes  <aestes@apple.com>
565
566         REGRESSION (r125592): Reproducible crash in DOMWindow::open when a delegate closes the new window in decidePolicyForNavigationAction
567         https://bugs.webkit.org/show_bug.cgi?id=115609
568
569         Reviewed by Oliver Hunt.
570
571         When a window created by window.open() is navigated, the embedder might
572         close it in decidePolicyForNavigationAction. If this happens, we end up
573         with a pointer to a deleted Frame.
574
575         Fix this by keeping a strong reference to the Frame created by
576         createWindow(). We can later determine if the window was closed by
577         checking if the new Frame has a detached Page.
578
579         Added an API test: WebKit1.CloseNewWindowInNavigationPolicyDelegate.
580
581         * page/DOMWindow.cpp:
582         (WebCore::DOMWindow::createWindow):
583
584 2013-05-06  Zan Dobersek  <zdobersek@igalia.com>
585
586         [GTK] Move GeolocationProviderGeoclue into libPlatform
587         https://bugs.webkit.org/show_bug.cgi?id=115591
588
589         Reviewed by Martin Robinson.
590
591         No new tests - no new functionality.
592
593         * GNUmakefile.am: Remove the Source/WebCore/platform/geoclue directory from the webkitgtk_cppflags list.
594         * GNUmakefile.list.am: Move the GeolocationProviderGeoclue(Client) sources under platform_sources.
595
596 2013-05-06  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
597
598         [Qt][Win] Unreviewed buildfix after r149579.
599
600         * plugins/win/PluginDatabaseWin.cpp:
601         (WebCore::addQtWebKitPluginPath):
602
603 2013-05-06  Antoine Quint  <graouts@apple.com>
604
605         Manage the presentation of the snapshotted plug-in using JavaScript
606         https://bugs.webkit.org/show_bug.cgi?id=115548
607
608         Reviewed by Dean Jackson.
609
610         * Resources/plugIns.js:
611         (createOverlay):
612         Implement the createOverlay(shadowRoot, titleText, subtitleText) method
613         that is called from WebCore (HTMLPlugInImageElement::didAddUserAgentShadowRoot)
614         to allow the injected script to customize the shadow root for a snapshotted
615         plug-in. This is a default implementation, clients are expected to customize
616         this by providing their own JS file with enhanced behavior.
617
618         * css/CSSDefaultStyleSheets.cpp:
619         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
620         Since we no longer have a default shadow tree generated in C++, it makes little
621         sense for clients to extend the default snapshotted plug-in stylesheet, so we
622         only insert it if no custom one is provided by the chrome client.
623
624         * css/plugIns.css:
625         Better styling of the default snapshotted plug-in overlay look by using CSS
626         flex boxes. Also using more explicit selector as an optimization.
627
628         * dom/Document.cpp:
629         (WebCore::Document::ensurePlugInsInjectedScript):
630         Expose a new method to allow HTMLPlugInImageElement instances to ensure that
631         the JavaScript code required to customize the snapshotted plug-in's shadow root
632         is indeed injected in the current document. The actual injection would only
633         happen once per document so all snapshotted plug-ins share the same scripting
634         context.
635
636         * dom/Document.h:
637         Expose the new ensurePlugInsInjectedScript method and the m_hasInjectedPlugInsScript
638         property used to ensure injection happens only once per document.
639
640         * html/HTMLPlugInImageElement.cpp:
641         (WebCore::titleText):
642         (WebCore::subtitleText):
643         Store the localized strings for each mime-type in a static hash map as it can be
644         costly to retrieve them each time from the client. It is expected the chrome client
645         will want to provide localized strings taking into account the snapshotted plug-in's
646         mime-type, so we're adding this as a parameter.
647         (WebCore::HTMLPlugInImageElement::checkSnapshotStatus):
648         Dispatch a "resize" event to the shadow root to notify the injected script that the
649         snapshotted plug-in's metrics have changed and to allow the overlay to update itself
650         as a result.
651         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
652         Remove all the DOM generation code in favor of an approach where we create a shared
653         DOM scripting world in which we inject JavaScript code that will perform the same
654         task but will additionally be provided by the client in order to provide a completely
655         custom overlay for the snapshotted plug-in. The sole contract is for the JavaScript
656         to implement a createOverlay(shadowRoot, titleText, subtitleText) method.
657         (WebCore::HTMLPlugInImageElement::partOfSnapshotOverlay):
658         Renamed method to be generic to the overlay as opposed to text labels and use the
659         element with CSS class name "snapshot-overlay" as the comparison node.
660
661         * html/HTMLPlugInImageElement.h:
662         (HTMLPlugInImageElement):
663         Removing a couple of unused members since we no longer generate the shadow DOM from C++
664         and rename the partOfSnapshotLabel method to partOfSnapshotOverlay.
665
666         * page/ChromeClient.h:
667         (WebCore::ChromeClient::plugInStartLabelTitle):
668         (WebCore::ChromeClient::plugInStartLabelSubtitle):
669         (WebCore::ChromeClient::plugInExtraScript):
670         Pass in the mime-type to plugInStartLabelTitle and plugInStartLabelSubtitle and expose
671         a new plugInExtraScript method to allow the chrome client to provide a custom JS file
672         for the management of the shadow root.
673
674         * rendering/RenderSnapshottedPlugIn.cpp:
675         (WebCore::RenderSnapshottedPlugIn::handleEvent):
676         Update the terminology from "label" to "overlay" per the changes made in HTMLPlugInImageElement.
677
678 2013-05-06  Robert Hogan  <robert@webkit.org>
679
680         REGRESSION(r140907) - Backport blink r149612 to fix vertical-align and rowspan issue
681         https://bugs.webkit.org/show_bug.cgi?id=115611
682
683         Patch by Julien Chaffraix.
684         Reviewed by Benjamin Poulain.
685
686         Backport phttps://src.chromium.org/viewvc/blink?view=rev&revision=149612 from 
687         https://chromiumcodereview.appspot.com/14105010
688         
689         Fix the rows' height computation with vertical-align: baseline and rowspan.
690         r140907 was careful in avoiding updating the baseline descent for
691         spanning cells. However it still added the non-spanning cells baseline
692         descent to the spanning cells' row height computation.
693         This change avoids the previous issue by not adding the baseline
694         descent in this case.
695
696         Test: fast/table/baseline-align-rowspan.html
697
698         * rendering/RenderTableSection.cpp:
699         (WebCore::RenderTableSection::calcRowLogicalHeight):
700
701 2013-05-05  Anders Carlsson  <andersca@apple.com>
702
703         Remove Vector::prepend
704         https://bugs.webkit.org/show_bug.cgi?id=115618
705
706         Reviewed by Geoffrey Garen.
707
708         Replace calls to Vector::prepend with either Vector::insert,
709         or a combination of Vector::append and Vector::reverse.
710
711         * accessibility/AccessibilityObject.cpp:
712         (WebCore::AccessibilityObject::scrollToGlobalPoint):
713         * css/CSSGradientValue.cpp:
714         (WebCore::CSSGradientValue::addStops):
715         * css/CSSValueList.h:
716         (WebCore::CSSValueList::prepend):
717         * dom/Document.cpp:
718         (WebCore::Document::iconURLs):
719         * editing/TextIterator.cpp:
720         (WebCore::SearchBuffer::prependContext):
721         * editing/VisibleUnits.cpp:
722         (WebCore::previousBoundary):
723         (WebCore::nextBoundary):
724         * history/HistoryItem.cpp:
725         (WebCore::HistoryItem::padDailyCountsForNewVisit):
726         (WebCore::HistoryItem::collapseDailyVisitsToWeekly):
727         * inspector/InjectedScriptHost.cpp:
728         (WebCore::InjectedScriptHost::addInspectedObject):
729         * platform/graphics/SVGGlyph.cpp:
730         (WebCore::charactersWithArabicForm):
731
732 2013-05-05  Sam Weinig  <sam@webkit.org>
733
734         Remove empty function SQLiteFileSystem::registerSQLiteVFS() and its callers
735         https://bugs.webkit.org/show_bug.cgi?id=115619
736
737         Reviewed by Dan Bernstein.
738
739         * Modules/webdatabase/DatabaseTracker.cpp:
740         * platform/sql/SQLiteFileSystem.cpp:
741         * platform/sql/SQLiteFileSystem.h:
742         * storage/StorageTracker.cpp:
743
744 2013-05-05  Chris Fleizach  <cfleizach@apple.com>
745
746         AX: aria-checked not exposed correctly on menuitemcheckbox or menuitemradio roles
747         https://bugs.webkit.org/show_bug.cgi?id=115499
748
749         Reviewed by Tim Horton.
750
751         Expose isChecked() for menu item objects.
752         Return the Mac-platform specific value that you find on menu items for "checked" menu items.
753
754         Test: platform/mac/accessibility/aria-menuitem-checked-value.html
755
756         * accessibility/AccessibilityNodeObject.cpp:
757         (WebCore::AccessibilityNodeObject::isChecked):
758         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
759         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
760
761 2013-05-05  Tim Horton  <timothy_horton@apple.com>
762
763         [wk2] Page Overlays: deviceScaleFactor doesn't update when the display changes
764         https://bugs.webkit.org/show_bug.cgi?id=115577
765         <rdar://problem/13762583>
766
767         Reviewed by Darin Adler.
768
769         * WebCore.exp.in:
770         Export GraphicsLayer::noteDeviceOrPageScaleFactorChangedIncludingDescendants
771
772 2013-05-05  Anders Carlsson  <andersca@apple.com>
773
774         Remove the Vector::append overload that takes a Vector
775         https://bugs.webkit.org/show_bug.cgi?id=115535
776
777         Reviewed by Andreas Kling.
778
779         Use Vector::appendVector instead.
780
781         * Modules/indexeddb/IDBBackingStore.cpp:
782         (WebCore::IDBBackingStore::putRecord):
783         (WebCore::IDBBackingStore::putIndexDataForRecord):
784         * Modules/indexeddb/IDBLevelDBCoding.cpp:
785         (WebCore::IDBLevelDBCoding::encodeStringWithLength):
786         (WebCore::IDBLevelDBCoding::encodeIDBKey):
787         (WebCore::IDBLevelDBCoding::encodeIDBKeyPath):
788         (WebCore::IDBLevelDBCoding::SchemaVersionKey::encode):
789         (WebCore::IDBLevelDBCoding::MaxDatabaseIdKey::encode):
790         (WebCore::IDBLevelDBCoding::DataVersionKey::encode):
791         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::encode):
792         (WebCore::IDBLevelDBCoding::DatabaseNameKey::encode):
793         (WebCore::IDBLevelDBCoding::DatabaseMetaDataKey::encode):
794         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encode):
795         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::encode):
796         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::encode):
797         (WebCore::IDBLevelDBCoding::IndexFreeListKey::encode):
798         (WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::encode):
799         (WebCore::IDBLevelDBCoding::IndexNamesKey::encode):
800         (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::encode):
801         (WebCore::IDBLevelDBCoding::ExistsEntryKey::encode):
802         (WebCore::IDBLevelDBCoding::IndexDataKey::encode):
803         * Modules/webaudio/AudioContext.cpp:
804         (WebCore::AudioContext::clear):
805         (WebCore::AudioContext::scheduleNodeDeletion):
806         * accessibility/AccessibilityARIAGrid.cpp:
807         (WebCore::AccessibilityARIAGrid::addTableCellChild):
808         * accessibility/AccessibilityTable.cpp:
809         (WebCore::AccessibilityTable::cells):
810         * css/RuleFeature.cpp:
811         (WebCore::RuleFeatureSet::add):
812         * css/StyleResolver.cpp:
813         (WebCore::StyleResolver::addToMatchedPropertiesCache):
814         * dom/DocumentStyleSheetCollection.cpp:
815         (WebCore::collectActiveCSSStyleSheetsFromSeamlessParents):
816         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
817         * dom/Range.cpp:
818         (WebCore::Range::getBorderAndTextQuads):
819         * html/FormController.cpp:
820         (WebCore::FormController::getReferencedFilePaths):
821         * html/canvas/CanvasRenderingContext2D.cpp:
822         (WebCore::CanvasRenderingContext2D::setLineDash):
823         * html/parser/HTMLFormattingElementList.cpp:
824         (WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly):
825         * html/track/WebVTTToken.h:
826         (WebCore::WebVTTToken::addNewClass):
827         (WebCore::WebVTTToken::addNewAnnotation):
828         * page/CaptionUserPreferencesMac.mm:
829         (WebCore::CaptionUserPreferencesMac::preferredLanguages):
830         * platform/FileChooser.cpp:
831         (WebCore::FileChooserSettings::acceptTypes):
832         * platform/SharedBufferChunkReader.cpp:
833         (WebCore::SharedBufferChunkReader::nextChunk):
834         * platform/graphics/MediaPlayer.cpp:
835         (WebCore::MediaPlayer::getSitesInMediaCache):
836         * platform/graphics/ca/GraphicsLayerCA.cpp:
837         (WebCore::GraphicsLayerCA::updateSublayerList):
838         * platform/mac/PasteboardMac.mm:
839         (WebCore::createWritableTypesForImage):
840         (WebCore::writableTypesForImage):
841         (WebCore::Pasteboard::writeSelectionForTypes):
842         * platform/network/FormDataBuilder.cpp:
843         (WebCore::FormDataBuilder::generateUniqueBoundaryString):
844         * plugins/PluginDatabase.cpp:
845         (WebCore::PluginDatabase::defaultPluginDirectories):
846         * rendering/RenderBlockLineLayout.cpp:
847         (WebCore::constructBidiRunsForSegment):
848         * rendering/RenderLayerCompositor.cpp:
849         (WebCore::RenderLayerCompositor::OverlapMap::popCompositingContainer):
850         * rendering/RenderTableSection.cpp:
851         (WebCore::RenderTableSection::splitColumn):
852         * svg/SVGGlyphMap.h:
853         (WebCore::SVGGlyphMap::collectGlyphsForString):
854         * xml/XPathNodeSet.h:
855         (WebCore::XPath::NodeSet::append):
856
857 2013-05-05  Anders Carlsson  <andersca@apple.com>
858
859         Try to fix the Windows build.
860
861         Make plugIns.js have a non-zero length.
862
863         * Resources/plugIns.js:
864
865 2013-05-04  Dean Jackson  <dino@apple.com>
866
867         Animations and Transitions should not start when globally suspended
868         https://bugs.webkit.org/show_bug.cgi?id=114915
869
870         Reviewed by Sam Weinig.
871
872         When the Document's AnimationController was suspended, we still
873         started new transitions and animations. Change this so that
874         animations enter a paused-but-new state, where they are frozen
875         until the AnimationController resumes. At that time, it is as
876         if they had just appeared: any delay counts down before
877         the animation starts.
878
879         For transitions, the change in value must still happen, but
880         it does so immediately. No transitionend event should be fired.
881         This produces a slightly confusing behaviour, because any
882         in-progress transitions are suspended, but any new style changes
883         happen instantly. This might sound contradictory, but in general
884         suspending the document is a rare (and dangerous) thing to do.
885
886         Previously, the Document would call resumeAnimations as it loaded,
887         effectively starting all the animations. This meant if you suspended
888         animations before loading a document, it was ignored as soon as the
889         load finished. Now there is a separate method startAnimationsIfNotSuspended
890         which checks to see if the document is suspended as it loads.
891
892         In order to handle this case, I added a new state to the Animation
893         machinery: AnimationStatePausedNew. This is an animation that was created
894         in the suspended state.
895
896         Tests: animations/added-while-suspended.html
897                transitions/started-while-suspended.html
898
899         * WebCore.exp.in: Export AnimationController::isSuspended().
900
901         * dom/Document.cpp:
902         (WebCore::Document::implicitClose):
903             resumeAnimationsForDocument() -> startAnimationsIfNotSuspended()
904
905         * page/animation/AnimationBase.cpp:
906         (WebCore::nameForState): New name for AnimationStatePausedNew.
907         (WebCore::AnimationBase::updateStateMachine): Handle new state AnimationStatePausedNew. The
908             most important change is that when go from PausedNew to Running, we jump back into
909             the New state and continue from there.
910         (WebCore::AnimationBase::updatePlayState): suspended -> isSuspended
911         * page/animation/AnimationBase.h: New state: AnimationStatePausedNew
912         (WebCore::AnimationBase::waitingToStart): Add AnimationStatePausedNew.
913         (WebCore::AnimationBase::paused): Add AnimationStatePausedNew.
914         (WebCore::AnimationBase::isNew): Add AnimationStatePausedNew.
915
916         * page/animation/AnimationController.cpp:
917         (WebCore::AnimationControllerPrivate::AnimationControllerPrivate): Initialise m_suspended.
918         (WebCore::AnimationControllerPrivate::clear): suspended -> isSuspended
919         (WebCore::AnimationControllerPrivate::updateAnimations): Ditto.
920         (WebCore::AnimationControllerPrivate::updateAnimationTimerForRenderer): Ditto.
921         (WebCore::AnimationControllerPrivate::suspendAnimations): Update m_suspended.
922         (WebCore::AnimationControllerPrivate::resumeAnimations): Ditto.
923         (WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
924         (WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
925         (WebCore::AnimationControllerPrivate::startAnimationsIfNotSuspended): New method that will
926             only resume animations if we were not globally suspended.
927         (WebCore::AnimationController::isSuspended): New method.
928         (WebCore::AnimationController::suspendAnimations): Add logging.
929         (WebCore::AnimationController::resumeAnimations): Add logging.
930         (WebCore::AnimationController::suspendAnimationsForDocument): Add logging.
931         (WebCore::AnimationController::resumeAnimationsForDocument): Add logging.
932         (WebCore::AnimationController::startAnimationsIfNotSuspended): Calls private method.
933         * page/animation/AnimationController.h:
934         (AnimationController): Add isSuspended() and animationsForDocumentMayStart().
935         * page/animation/AnimationControllerPrivate.h:
936         (WebCore::AnimationControllerPrivate::isSuspended): New method.
937         (AnimationControllerPrivate): Add m_isSuspended member.
938
939         * page/animation/CompositeAnimation.cpp:
940         (WebCore::CompositeAnimation::CompositeAnimation): Moved from header - initialise m_isSuspended.
941         (WebCore::CompositeAnimation::updateTransitions): Do not create ImplicitAnimation if suspended.
942         (WebCore::CompositeAnimation::updateKeyframeAnimations): Move to AnimationStatePausedNew if suspended.
943         (WebCore::CompositeAnimation::suspendAnimations): m_suspended -> m_isSuspended
944         (WebCore::CompositeAnimation::resumeAnimations): Ditto.
945         * page/animation/CompositeAnimation.h:
946         (WebCore::CompositeAnimation::isSuspended): Renamed from suspended()
947
948         * page/animation/KeyframeAnimation.cpp:
949         (WebCore::KeyframeAnimation::animate): If we're in the AnimationStatePausedNew state, then
950             we need to go to the first frame (to handle fill mode).
951
952         * testing/Internals.cpp:
953         (WebCore::Internals::animationsAreSuspended): New exposed method to reflect AnimationController.
954         * testing/Internals.h: Add animationsAreSuspended.
955         * testing/Internals.idl: Ditto.
956
957 2013-05-04  Sam Weinig  <sam@webkit.org>
958
959         Move PopupMenuMac and SearchPopupMenuMac to Source/WebKit/mac
960         matching where they are in WebKit2.
961
962         Reviewed by Anders Carlsson.
963
964         * WebCore.exp.in:
965         * WebCore.xcodeproj/project.pbxproj:
966         * platform/mac/PopupMenuMac.h: Removed.
967         * platform/mac/PopupMenuMac.mm: Removed.
968         * platform/mac/SearchPopupMenuMac.h: Removed.
969         * platform/mac/SearchPopupMenuMac.mm: Removed.
970
971 2013-05-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
972
973         Get rid of special cases in AddIncludesForTypeInImpl
974         https://bugs.webkit.org/show_bug.cgi?id=115602
975
976         Reviewed by Benjamin Poulain.
977
978         Get rid of the special cases in AddIncludesForTypeInImpl subroutine in the
979         JS bindings generator. Those are no longer needed and special cases should
980         be avoided in the generator.
981
982         No new tests, no behavior change.
983
984         * bindings/scripts/CodeGeneratorJS.pm:
985         (AddIncludesForTypeInImpl):
986
987 2013-05-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
988
989         Get rid of AddIncludesForSVGAnimatedType in bindings generator
990         https://bugs.webkit.org/show_bug.cgi?id=115603
991
992         Reviewed by Benjamin Poulain.
993
994         Remove AddIncludesForSVGAnimatedType subroutine from the bindings generator
995         as it is a special case which is no longer needed.
996
997         No new tests, no behavior change.
998
999         * bindings/scripts/CodeGeneratorJS.pm:
1000         (GenerateImplementation):
1001
1002 2013-05-04  Antoine Quint  <graouts@apple.com>
1003
1004         Update code generators to handle a new JavaScript file for snapshotted plug-ins
1005         https://bugs.webkit.org/show_bug.cgi?id=115596
1006
1007         Reviewed by Dean Jackson.
1008
1009         In preparation for https://webkit.org/b/115548, adding a new JS file at
1010         Resources/plugIns.js that we will use to provide presentation for the
1011         snapshotted plug-ins overlay.
1012
1013         * CMakeLists.txt:
1014         * DerivedSources.cpp:
1015         * DerivedSources.make:
1016         * DerivedSources.pri:
1017         * GNUmakefile.am:
1018         * GNUmakefile.list.am:
1019         * Resources/plugIns.js: Added.
1020         * WebCore.vcproj/WebCore.vcproj:
1021         * WebCore.vcxproj/WebCore.vcxproj:
1022         * WebCore.vcxproj/WebCore.vcxproj.filters:
1023         * WebCore.xcodeproj/project.pbxproj:
1024
1025 2013-05-04  Andreas Kling  <akling@apple.com>
1026
1027         REGRESSION(r142647): Flaky Test: fast/frames/crash-remove-iframe-during-object-beforeload.html
1028         <http://webkit.org/b/115322>
1029         <rdar://problem/13810719>
1030
1031         Reviewed by Anders Carlsson.
1032
1033         Don't cache the FrameView::renderView() in a local since updating Widgets may blow it away.
1034
1035         * page/FrameView.cpp:
1036         (WebCore::FrameView::performPostLayoutTasks):
1037
1038 2013-05-04  Andreas Kling  <akling@apple.com>
1039
1040         Remove GraphicsContext::strokeArc(), which is unused.
1041
1042         From Blink r149608 by <jbroman@chromium.org>
1043         <http://src.chromium.org/viewvc/blink?view=revision&revision=149608>
1044
1045         This is no longer used since almost a year ago, when HAVE(PATH_BASED_BORDER_RADIUS_DRAWING) was inlined.
1046
1047         * platform/graphics/GraphicsContext.h:
1048         * platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
1049         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1050         * platform/graphics/cg/GraphicsContextCG.cpp:
1051         * platform/graphics/wince/GraphicsContextWinCE.cpp:
1052
1053 2013-05-04  Andreas Kling  <akling@apple.com>
1054
1055         Remove unused CSSSelector::isCustomPseudoType().
1056
1057         From Blink r149574 by <dominicc@chromium.org>
1058         <http://src.chromium.org/viewvc/blink?view=revision&revision=149574>
1059
1060         * css/CSSSelector.h:
1061         * css/CSSSelector.cpp:
1062
1063 2013-05-04  Andreas Kling  <akling@apple.com>
1064
1065         Remove ShadowRoot's previous/next ShadowRoot pointers.
1066         <http://webkit.org/b/115588>
1067
1068         Reviewed by Anders Carlsson.
1069
1070         ShadowRoot no longer inherits from DoublyLinkedListNode<ShadowRoot> because that code wasn't
1071         doing anything anymore. Shrinks ShadowRoot by two pointers.
1072
1073         * dom/ElementShadow.h:
1074         * dom/ShadowRoot.cpp:
1075         (SameSizeAsShadowRoot):
1076         (WebCore::ShadowRoot::ShadowRoot):
1077         (WebCore::ShadowRoot::~ShadowRoot):
1078         * dom/ShadowRoot.h:
1079
1080 2013-05-04  Andreas Kling  <akling@apple.com>
1081
1082         RenderObject: don't change GraphicsContext state when not drawing dashed/dotted lines.
1083
1084         From Blink r149546 by <jbroman@chromium.org>
1085         <http://src.chromium.org/viewvc/blink?view=revision&revision=149546>
1086
1087         Previously, there was asymmetry between changing and restoring state (certain state
1088         would be restored only if thickness was positive, i.e. a line was actually drawn.)
1089
1090         * rendering/RenderObject.cpp:
1091         (WebCore::RenderObject::drawLineForBoxSide):
1092
1093 2013-05-03  Andreas Kling  <akling@apple.com>
1094
1095         Remove CSS selector profiler branches from ElementRuleCollector loop.
1096         <http://webkit.org/b/115581>
1097
1098         Reviewed by Antti Koivisto.
1099
1100         Templatize the method so we don't have to check for active inspector frontends on every
1101         pass through the loop.
1102
1103         Time spent in this loop goes down from 0.5% to 0.2% on iTunes Store, WebCore binary size
1104         goes up 480 bytes (sorry Benjamin, I'll make it up to you.)
1105
1106         * css/ElementRuleCollector.h:
1107         * css/ElementRuleCollector.cpp:
1108         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
1109         (WebCore::ElementRuleCollector::doCollectMatchingRulesForList):
1110
1111 2013-04-30  Robert Hogan  <robert@webkit.org>
1112
1113         REGRESSION(r140907): Incorrect baseline on cells after updating vertical-align
1114         https://bugs.webkit.org/show_bug.cgi?id=115432
1115
1116         Reviewed by Julien Chaffraix.
1117
1118         If a cell changes vertical-align any intrinsic padding it has is now redundant. It
1119         needs to calculate its new height from RenderTableRow::layout() and then find its
1120         new intrinsic padding in RenderTableSection::layoutRows().
1121
1122         Test: fast/table/correct-baseline-after-style-change.html
1123
1124         * rendering/RenderTableCell.cpp:
1125         (WebCore::RenderTableCell::styleDidChange):
1126
1127 2013-05-03  Arnaud Renevier  <a.renevier@sisa.samsung.com>
1128
1129         incorrect repainting when a table has a transform
1130         https://bugs.webkit.org/show_bug.cgi?id=109867
1131
1132         Reviewed by Simon Fraser.
1133
1134         Disable LayoutState when table, tableRow or tableSection render
1135         objects have transforms or reflections.
1136
1137         Tests: fast/repaint/reflection-table-layout.html
1138                fast/repaint/transform-table-layout.html
1139
1140         * rendering/RenderTable.cpp:
1141         (WebCore::RenderTable::layout):
1142         * rendering/RenderTableRow.cpp:
1143         (WebCore::RenderTableRow::layout):
1144         * rendering/RenderTableSection.cpp:
1145         (WebCore::RenderTableSection::layout):
1146         (WebCore::RenderTableSection::layoutRows):
1147
1148 2013-05-03  Antti Koivisto  <antti@apple.com>
1149
1150         Remove concept of younger and older shadow trees
1151         https://bugs.webkit.org/show_bug.cgi?id=115570
1152
1153         Reviewed by Andreas Kling.
1154
1155         Younger and older shadow trees are an obscure corner of the Shadow DOM spec.
1156         
1157         Support only one shadow tree per element. This simplifies many things. 
1158
1159         * dom/ComposedShadowTreeWalker.cpp:
1160         (WebCore::ComposedShadowTreeWalker::traverseChild):
1161         (WebCore::ComposedShadowTreeWalker::traverseSiblingInCurrentTree):
1162         (WebCore):
1163         (WebCore::ComposedShadowTreeWalker::traverseParent):
1164         (WebCore::ComposedShadowTreeWalker::traverseParentInCurrentTree):
1165         (WebCore::ComposedShadowTreeWalker::traverseParentBackToShadowRootOrHost):
1166         * dom/ComposedShadowTreeWalker.h:
1167         (WebCore::ComposedShadowTreeWalker::assertPrecondition):
1168         (ComposedShadowTreeWalker):
1169         * dom/ContainerNodeAlgorithms.cpp:
1170         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
1171         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoTree):
1172         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
1173         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree):
1174         (WebCore::ChildFrameDisconnector::collectFrameOwners):
1175         (WebCore::assertConnectedSubrameCountIsConsistent):
1176         * dom/Document.cpp:
1177         (WebCore::Document::buildAccessKeyMap):
1178         * dom/Element.cpp:
1179         (WebCore::Element::authorShadowRoot):
1180         (WebCore::Element::userAgentShadowRoot):
1181         (WebCore::Element::ensureUserAgentShadowRoot):
1182         * dom/Element.h:
1183         (Element):
1184         (WebCore::Element::hasAuthorShadowRoot):
1185         * dom/Element.idl:
1186         * dom/ElementShadow.cpp:
1187         (WebCore::ElementShadow::addShadowRoot):
1188         
1189         Allow only one ShadowRoot per ElementShadow. Remove linked list handling.
1190         
1191         (WebCore::ElementShadow::removeAllShadowRoots):
1192         (WebCore::ElementShadow::attach):
1193         (WebCore::ElementShadow::detach):
1194         (WebCore::ElementShadow::childNeedsStyleRecalc):
1195         (WebCore::ElementShadow::needsStyleRecalc):
1196         (WebCore::ElementShadow::recalcStyle):
1197         (WebCore::ElementShadow::removeAllEventListeners):
1198         * dom/ElementShadow.h:
1199         (WebCore::ElementShadow::shadowRoot):
1200         (ElementShadow):
1201         (WebCore::ElementShadow::host):
1202         (WebCore::Node::shadowRoot):
1203         (WebCore):
1204         * dom/Node.cpp:
1205         (WebCore):
1206         (WebCore::Node::showNodePathForThis):
1207         (WebCore::traverseTreeAndMark):
1208         (WebCore::showSubTreeAcrossFrame):
1209         * dom/Node.h:
1210         (Node):
1211         * dom/ShadowRoot.cpp:
1212         (WebCore::ShadowRoot::insertedInto):
1213         * dom/ShadowRoot.h:
1214         (ShadowRoot):
1215         
1216             Remove LinkedList base.
1217         
1218         * dom/TreeScopeAdopter.cpp:
1219         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
1220         (WebCore::TreeScopeAdopter::moveTreeToNewDocument):
1221         * html/shadow/ContentDistributor.cpp:
1222         (WebCore::ContentDistributor::distribute):
1223         (WebCore::ContentDistributor::invalidate):
1224         (WebCore::ContentDistributor::ensureSelectFeatureSet):
1225         * inspector/InspectorDOMAgent.cpp:
1226         (WebCore::InspectorDOMAgent::unbind):
1227         (WebCore::InspectorDOMAgent::buildObjectForNode):
1228         * page/FocusController.cpp:
1229         (WebCore::FocusNavigationScope::FocusNavigationScope):
1230         (WebCore::FocusNavigationScope::focusNavigationScopeOwnedByShadowHost):
1231         * rendering/RenderFileUploadControl.cpp:
1232         (WebCore::RenderFileUploadControl::uploadButton):
1233         * svg/SVGTRefElement.cpp:
1234         (WebCore::SVGTRefElement::updateReferencedText):
1235         (WebCore::SVGTRefElement::detachTarget):
1236         * svg/SVGUseElement.cpp:
1237         (WebCore::SVGUseElement::clearResourceReferences):
1238         (WebCore::SVGUseElement::buildShadowAndInstanceTree):
1239         (WebCore::SVGUseElement::buildShadowTree):
1240         * testing/Internals.cpp:
1241         (WebCore::Internals::ensureShadowRoot):
1242         (WebCore::Internals::shadowRoot):
1243         (WebCore):
1244         * testing/Internals.h:
1245         (Internals):
1246         * testing/Internals.idl:
1247
1248 2013-05-03  Martin Robinson  <mrobinson@igalia.com>
1249
1250         Simplify the #ifdefs in GraphicsContext3D.h
1251         https://bugs.webkit.org/show_bug.cgi?id=115568
1252
1253         Reviewed by Daniel Bates.
1254
1255         * platform/graphics/GraphicsContext3D.h:
1256         (GraphicsContext3D): Combine #ifdefs paths that have a common
1257         implementation. This reduces the #ifdef paths from many to just three.
1258         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
1259         (WebCore::GraphicsContext3D::platformTexture): Move the implementation
1260         here to simplify the header.
1261         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
1262         (WebCore::GraphicsContext3D::platformTexture): Ditto.
1263         (WebCore):
1264
1265 2013-05-03  Brendan Long  <b.long@cablelabs.com>
1266
1267         [Qt] Build with --video-track fails because String(AtomicString) is ambiguous
1268         https://bugs.webkit.org/show_bug.cgi?id=115551
1269
1270         Reviewed by Benjamin Poulain.
1271
1272         * html/HTMLMediaElement.cpp:
1273         (WebCore::HTMLMediaElement::configureTextTrackGroup):
1274         Change String(textTrack->kind()) to textTrack->kind().string(), and same thing with language.
1275
1276 2013-05-03  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1277
1278         [GStreamer] GStreamer log crashes in MediaPlayerPrivateGStreamerBase because of uninitialized category
1279         https://bugs.webkit.org/show_bug.cgi?id=115575
1280
1281         Reviewed by Philippe Normand.
1282
1283         No new tests needed.
1284
1285         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1286         Using extern debug category.
1287         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1288         Declaring debug category as not static.
1289
1290 2013-05-03  Brent Fulgham  <bfulgham@webkit.org>
1291
1292         [WinCairo] Unreviewed VS2010 Build Correction.
1293
1294         * WebCore.vcxproj/WebCore.vcxproj: Exclude CG-only
1295         SubimageCacheWithTimer.cpp from WinCairo build.
1296
1297 2013-05-03  Viatcheslav Ostapenko  <viatchslav.o@samsung.com>
1298
1299         [Cairo] Anti-aliasing should not be always disabled for lines
1300         https://bugs.webkit.org/show_bug.cgi?id=109535
1301
1302         Reviewed by Martin Robinson.
1303
1304         Don't disable antialiasing for text lines because it produces ugly picture if
1305         page is scaled.
1306
1307         Test: fast/css3-text/css3-text-decoration/text-decoration-line-scaled.html
1308
1309         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1310         (WebCore::drawLineOnCairoContext):
1311
1312 2013-05-03  Daniel Bates  <dbates@webkit.org>
1313
1314         Remove unnecessary include HTMLNames.h from RenderThemeGtk.cpp
1315         https://bugs.webkit.org/show_bug.cgi?id=115571
1316
1317         Reviewed by Martin Robinson.
1318
1319         * platform/gtk/RenderThemeGtk.cpp:
1320
1321 2013-05-03  Alexey Proskuryakov  <ap@apple.com>
1322
1323         [Mac] setMetadataURL incorrectly treats path bytes as Latin-1
1324         https://bugs.webkit.org/show_bug.cgi?id=115557
1325
1326         Reviewed by Sam Weinig.
1327
1328         * platform/mac/FileSystemMac.mm: (WebCore::setMetaData): Use the correct constructor.
1329
1330 2013-05-03  Andrei Bucur  <abucur@adobe.com>
1331
1332         Move pixelSnappedLayoutOverflowRect and maxLayoutOverflow from RenderBox
1333         https://bugs.webkit.org/show_bug.cgi?id=115550
1334
1335         Reviewed by Simon Fraser.
1336
1337         The patch moves pixelSnappedLayoutOverflowRect and maxLayoutOverflow out
1338         of RenderBox somewhere logically closer to their usage place.
1339
1340         pixelSnappedLayoutOverflowRect - moved to RenderView because it's called only
1341         for RenderView at this moment.
1342         There are other places when the overflow rect is pixel snapped but only after
1343         the rect is adjusted for writing modes or inflated.
1344
1345         maxLayoutOverflow - moved to RenderTreeAsText.cpp as a static function because
1346         it's used only there.
1347
1348         Tests: no new functional change.
1349
1350         * rendering/RenderBox.h: The functions declarations are removed.
1351         * rendering/RenderTreeAsText.cpp:
1352         (WebCore::maxLayoutOverflow): 
1353         * rendering/RenderView.h:
1354         (WebCore::RenderView::pixelSnappedLayoutOverflowRect):
1355
1356 2013-05-03  Andreas Kling  <akling@apple.com>
1357
1358         StyleResolver: Have "list of matched rules" API vend internal types instead of CSSOM wrappers.
1359         <http://webkit.org/b/115563>
1360
1361         Reviewed by Antti Koivisto.
1362
1363         Change styleRulesForElement() and pseudoStyleRulesForElement() to return Vectors of StyleRuleBase
1364         instead of CSSRuleLists. This defers instantiating CSSOM wrappers until they're actually needed
1365         for exposure to web API.
1366
1367         * page/DOMWindow.cpp:
1368         (WebCore::DOMWindow::getMatchedCSSRules):
1369
1370             Create a StaticCSSRuleList and populate it with CSSOM wrappers for the matched rules.
1371             This is the one place where we expose this functionality to the web.
1372
1373         * css/ElementRuleCollector.h:
1374         * css/ElementRuleCollector.cpp:
1375         (WebCore::ElementRuleCollector::matchedRuleList):
1376         (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
1377
1378             Collect internal StyleRuleBase pointers here instead of creating wrappers.
1379
1380         * css/StyleResolver.h:
1381         * css/StyleResolver.cpp:
1382         (WebCore::StyleResolver::styleRulesForElement):
1383         (WebCore::StyleResolver::pseudoStyleRulesForElement):
1384
1385             Vend said pointers.
1386
1387         * editing/EditingStyle.cpp:
1388         (WebCore::styleFromMatchedRulesForElement):
1389
1390             Dodge CSSOM wrapper instantiation (Woop woop!)
1391
1392         * inspector/InspectorCSSAgent.h:
1393         * inspector/InspectorCSSAgent.cpp:
1394         (WebCore::InspectorCSSAgent::buildObjectForRule):
1395
1396             Split buildObjectForRule() into two versions, one for CSSStyleRule and one for StyleRule.
1397             The CSSStyleRule one doesn't need a special path for parent-less rules, since those always
1398             come in through the StyleRule interface instead. This factoring can be improved further
1399             after this change.
1400
1401         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
1402         (WebCore::InspectorCSSAgent::buildArrayForRuleList):
1403         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
1404
1405             Tweaked for changes in StyleResolver API.
1406
1407 2013-05-03  Alexey Proskuryakov  <ap@apple.com>
1408
1409         REGRESSION (r145042): Downloading a file sometimes results in could not create
1410         a sandbox extension Console message and file stays as a .download file
1411         https://bugs.webkit.org/show_bug.cgi?id=115559
1412         <rdar://problem/13785101>
1413
1414         Reviewed by Sam Weinig.
1415
1416         CString is evil, it has two lengths which can be different - specifically, fileSystemRepresentation()
1417         creates a string with maximum possible buffer size. This was confusing resolveSymlinksInPath().
1418
1419         * platform/cf/FileSystemCF.cpp: (WebCore::fileSystemRepresentation):
1420         Change fileSystemRepresentation to be less surprising. Really, we should rip apart
1421         CString and update callers to use better defined semantics, but this is the one function
1422         that repeatedly causes problems in practice.
1423
1424 2013-05-03  Andreas Kling  <akling@apple.com>
1425
1426         CSSRule style declarations getters shouldn't be const.
1427         <http://webkit.org/b/115572>
1428
1429         Reviewed by Antti Koivisto.
1430
1431         Accessing the CSSStyleDeclaration for a CSSRule is a potentially mutating operation,
1432         and should not be const.
1433
1434         * css/CSSFontFaceRule.cpp:
1435         (WebCore::CSSFontFaceRule::style):
1436         * css/CSSFontFaceRule.h:
1437         * css/CSSPageRule.cpp:
1438         (WebCore::CSSPageRule::style):
1439         * css/CSSPageRule.h:
1440         * css/CSSStyleRule.cpp:
1441         (WebCore::CSSStyleRule::style):
1442         * css/CSSStyleRule.h:
1443         (CSSStyleRule):
1444         * css/WebKitCSSFilterRule.cpp:
1445         (WebCore::WebKitCSSFilterRule::style):
1446         * css/WebKitCSSFilterRule.h:
1447         * css/WebKitCSSKeyframeRule.cpp:
1448         (WebCore::WebKitCSSKeyframeRule::style):
1449         * css/WebKitCSSKeyframeRule.h:
1450         (WebKitCSSKeyframeRule):
1451         * css/WebKitCSSViewportRule.cpp:
1452         (WebCore::WebKitCSSViewportRule::style):
1453         * css/WebKitCSSViewportRule.h:
1454
1455 2013-05-03  Andreas Kling  <akling@apple.com>
1456
1457         Use NotNull tag for placement new in WebCore.
1458         <http://webkit.org/b/115569>
1459
1460         Reviewed by Antti Koivisto.
1461
1462         Avoid emitting null checks where we use placement new to construct objects into safe locations.
1463
1464         * css/StylePropertySet.cpp:
1465         (WebCore::ImmutableStylePropertySet::create):
1466         * dom/Element.cpp:
1467         (WebCore::ShareableElementData::createWithAttributes):
1468         (WebCore::ShareableElementData::ShareableElementData):
1469         (WebCore::UniqueElementData::makeShareableCopy):
1470         * dom/QualifiedName.cpp:
1471         (WebCore::QualifiedName::init):
1472         (WebCore::createQualifiedName):
1473         * dom/make_names.pl:
1474         (printNamesCppFile):
1475         * platform/ThreadGlobalData.h:
1476         (WebCore::threadGlobalData):
1477         * platform/graphics/GlyphPage.h:
1478         (WebCore::GlyphPage::createForMixedFontData):
1479
1480 2013-01-11  Andreas Kling  <akling@apple.com>
1481
1482         Simplify CSSSelectorList creation/adoption.
1483         <http://webkit.org/b/106649>
1484
1485         Reviewed by Antti Koivisto.
1486
1487         Remove the optimization that special-cased construction of CSSSelectorLists with a single entry.
1488         This is in preparation for changing the way we store the selector lists on style rules.
1489
1490         * css/CSSParser.h:
1491         * css/CSSSelector.h:
1492
1493             Remove move(PassOwnPtr<CSSSelector> from, CSSSelector* to), inlining it into
1494             CSSSelectorList::adoptSelectorVector instead.
1495
1496         * css/CSSSelectorList.cpp:
1497         (WebCore::CSSSelectorList::CSSSelectorList):
1498         (WebCore::CSSSelectorList::deleteSelectors):
1499
1500             Handle all selector list lengths the same way.
1501
1502         (WebCore::CSSSelectorList::adoptSelectorVector):
1503
1504             Merge move() from CSSSelector.h into this code since it was the only call site.
1505             Also some minor readability cleanups.
1506
1507 2013-05-03  Antti Koivisto  <antti@apple.com>
1508
1509         Remove HTMLShadowElement
1510         https://bugs.webkit.org/show_bug.cgi?id=115555
1511
1512         Reviewed by Andreas Kling.
1513
1514         This is not used internally.
1515
1516         * CMakeLists.txt:
1517         * DerivedSources.cpp:
1518         * DerivedSources.make:
1519         * DerivedSources.pri:
1520         * GNUmakefile.list.am:
1521         * Target.pri:
1522         * WebCore.vcproj/WebCore.vcproj:
1523         * WebCore.vcxproj/WebCore.vcxproj:
1524         * WebCore.vcxproj/WebCore.vcxproj.filters:
1525         * WebCore.xcodeproj/project.pbxproj:
1526         * dom/ComposedShadowTreeWalker.cpp:
1527         * dom/NodeRenderingContext.cpp:
1528         * html/HTMLElementsAllInOne.cpp:
1529         * html/HTMLTagNames.in:
1530         * html/InputType.cpp:
1531         (WebCore::InputType::destroyShadowSubtree):
1532         * html/shadow/ContentDistributor.cpp:
1533         (WebCore::ContentDistributor::distribute):
1534         * html/shadow/HTMLShadowElement.cpp: Removed.
1535         * html/shadow/HTMLShadowElement.h: Removed.
1536         * html/shadow/HTMLShadowElement.idl: Removed.
1537         * page/DOMWindow.idl:
1538
1539 2013-05-03  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
1540
1541         Remove WTF::ListRefPtr class
1542         https://bugs.webkit.org/show_bug.cgi?id=115516
1543
1544         Reviewed by Anders Carlsson.
1545
1546         ListRefPtr was used only by FontFamily class, besides it strongly depended
1547         on FontFamily class semantics which made it non-generic and inappropriate
1548         for being present inside WTF.
1549
1550         This patch removes WTF::ListRefPtr class and moves its the functionality
1551         into FontFamily class.
1552
1553         No new tests, no change in the behavior.
1554
1555         * page/FrameTree.h:
1556         (FrameTree):
1557         * platform/graphics/FontFamily.h:
1558         (FontFamily):
1559         (WebCore::FontFamily::~FontFamily):
1560         (WebCore):
1561
1562 2013-05-03  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1563
1564         Crash when calling QWebFrame::evaluateJavaScript
1565         https://bugs.webkit.org/show_bug.cgi?id=113434
1566
1567         Reviewed by Simon Hausmann.
1568
1569         We must take the JS API lock before accessing internal JS methods.
1570
1571         * bridge/qt/qt_runtime.cpp:
1572         (JSC::Bindings::unwrapBoxedPrimitive):
1573         (JSC::Bindings::getGregorianDateTimeUTC):
1574         (JSC::Bindings::convertQVariantToValue):
1575
1576 2013-05-02  Xan Lopez  <xlopez@igalia.com>
1577
1578         [GTK] Fine tune dependencies for glslang generated files
1579         https://bugs.webkit.org/show_bug.cgi?id=115537
1580
1581         Reviewed by Martin Robinson.
1582
1583         Make glslang.* explictly depend on glslang_tab.*, since the
1584         dependency does exist. Otherwise Make might decide to compile
1585         things ahead of time and fail.
1586
1587         * GNUmakefile.am:
1588
1589 2013-05-02  KyungTae Kim  <ktf.kim@samsung.com>
1590
1591         Fix build warnings on ResourceHandleClient.h
1592         https://bugs.webkit.org/show_bug.cgi?id=115540
1593
1594         Reviewed by Alexey Proskuryakov.
1595
1596         Comment out the parameter names for 'getOrCreateReadBuffer' to fix -Wunused-parameter build warnings.
1597
1598         * platform/network/ResourceHandleClient.h:
1599         (WebCore::ResourceHandleClient::getOrCreateReadBuffer):
1600
1601 2013-05-02  Roger Fong  <roger_fong@apple.com>
1602
1603         Following r149463, set Path for WebCore makefile as well.
1604
1605         * WebCore.vcxproj/WebCore.make:
1606
1607 2013-05-02  Eric Carlson  <eric.carlson@apple.com>
1608
1609         Unreviewed fix for Mac Lion build after r149503.
1610
1611         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.h:
1612         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
1613
1614 2013-05-02  David Kilzer  <ddkilzer@apple.com>
1615
1616         BUILD FIX: Move Mac-only symbols into the shared symbol list
1617
1618         * WebCore.exp.in: Move symbols.
1619
1620 2013-05-02  Antti Koivisto  <antti@apple.com>
1621
1622         Shadow DOM removal: Get rid of ContentSelectorQuery
1623         https://bugs.webkit.org/show_bug.cgi?id=115533
1624
1625         Reviewed by Anders Carlsson.
1626
1627         This is only used for Shadow DOM distribution. <details> element works fine without it.
1628
1629         * CMakeLists.txt:
1630         * GNUmakefile.list.am:
1631         * Target.pri:
1632         * WebCore.vcproj/WebCore.vcproj:
1633         * WebCore.vcxproj/WebCore.vcxproj:
1634         * WebCore.vcxproj/WebCore.vcxproj.filters:
1635         * WebCore.xcodeproj/project.pbxproj:
1636         * html/shadow/ContentDistributor.cpp:
1637         (WebCore::ContentDistributor::distributeSelectionsTo):
1638         * html/shadow/ContentSelectorQuery.cpp: Removed.
1639         * html/shadow/ContentSelectorQuery.h: Removed.
1640         * html/shadow/HTMLContentElement.cpp:
1641
1642 2013-05-02  Arnaud Renevier  <a.renevier@sisa.samsung.com>
1643
1644         border-radius clipping a canvas does not always clip
1645         https://bugs.webkit.org/show_bug.cgi?id=113343
1646
1647         Reviewed by Simon Fraser.
1648
1649         clipToRect method clip context to clipRect, and then clip to rounded
1650         rect if clipRect has a radius. But currently, clipToRect exit early if
1651         clipToRect is equal to paintDirtyRect.
1652
1653         This patch allows clipping to rounded corner ever if clipToRect is
1654         equal to paintDirtyRect.
1655
1656         Test: fast/overflow/border-radius-clipping-2.html
1657
1658         * rendering/RenderLayer.cpp:
1659         (WebCore::RenderLayer::clipToRect):
1660
1661 2013-05-02  Eric Carlson  <eric.carlson@apple.com>
1662
1663         Caption menu does not include in-band captions
1664         https://bugs.webkit.org/show_bug.cgi?id=111934
1665
1666         Reviewed by Dean Jackson.
1667
1668         No new tests, upated existing tests for these changes.
1669
1670         * WebCore.xcodeproj/project.pbxproj: Add new files.
1671
1672         * html/HTMLMediaElement.cpp:
1673         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_legacyWebKitClosedCaptionsVisible.
1674         (WebCore::HTMLMediaElement::loadInternal): Clear the LoadMediaResource from m_pendingActionFlags
1675             in case there is a pending async load.
1676         (WebCore::HTMLMediaElement::configureTextTrackGroup): Always log the track score.
1677         (WebCore::HTMLMediaElement::configureTextTracks): Call configureTextTrackDisplay so 
1678             m_legacyWebKitClosedCaptionsVisible is always updated immediately.
1679         (WebCore::HTMLMediaElement::setWebkitClosedCaptionsVisible): Use m_legacyWebKitClosedCaptionsVisible.
1680         (WebCore::HTMLMediaElement::webkitClosedCaptionsVisible): Ditto.
1681         * html/HTMLMediaElement.h:
1682
1683         * page/CaptionUserPreferences.cpp:
1684         (WebCore::CaptionUserPreferences::CaptionUserPreferences): Initialize m_displayMode to ForcedOnly
1685             because it is no longer used for testing only.
1686         (WebCore::CaptionUserPreferences::notify): Post notifications when not in testing-only mode.
1687
1688         * page/CaptionUserPreferencesMac.h:
1689         * page/CaptionUserPreferencesMac.mm:
1690         (WebCore::CaptionUserPreferencesMac::textTrackSelectionScore): Calculate a track score when
1691             webkitClosedCaptionsVisible has been set.
1692         (WebCore::CaptionUserPreferencesMac::sortedTrackListForMenu): Don't filter track list when we
1693             don't have the media accessibility framework. Make logging more informative.
1694         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
1695
1696         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1697
1698         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h:
1699         (WebCore::InbandTextTrackPrivateAVFObjC::create): Take a AVFInbandTrackParent instead of a
1700             MediaPlayerPrivateAVFoundationObjC.
1701         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
1702         (WebCore::InbandTextTrackPrivateAVFObjC::InbandTextTrackPrivateAVFObjC): Ditto.
1703
1704         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.h: Added.
1705         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm: Added.
1706
1707         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1708         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1709         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): We only have legible output when
1710             HAVE_AVFOUNDATION_LEGIBLE_OUTPUT_SUPPORT is defined.
1711         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Ditto.
1712         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Ditto.
1713         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Create a legacy CC track if
1714             there are no media selection options and there is a CC AVAssetTrack.
1715         (WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyCCTracks): New, process CC tracks.
1716         (WebCore::MediaPlayerPrivateAVFoundationObjC::processNewAndRemovedTextTracks): New, refactored
1717             common setup/cleanup code from processMediaSelectionOptions.
1718         (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions): Renamed from 
1719             processTextTracks. Move common setup/cleanup code to processNewAndRemovedTextTracks.
1720         (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Deal with legacy CC tracks.
1721
1722 2013-05-02  Eric Carlson  <eric.carlson@apple.com>
1723
1724         [Mac] caption track menu includes "easy to read" in-band tracks twice
1725         https://bugs.webkit.org/show_bug.cgi?id=115529
1726
1727         Reviewed by Dean Jackson.
1728
1729         * page/CaptionUserPreferencesMac.mm:
1730         (WebCore::CaptionUserPreferencesMac::sortedTrackListForMenu): Check to see if a track is
1731              easy-to-read after checking if it is forced only.
1732
1733 2013-05-02  Antti Koivisto  <antti@apple.com>
1734
1735         Remove SiblingTraversalStrategies.h
1736         https://bugs.webkit.org/show_bug.cgi?id=115532
1737
1738         Reviewed by Andreas Kling.
1739
1740         * GNUmakefile.list.am:
1741         * Target.pri:
1742         * WebCore.vcproj/WebCore.vcproj:
1743         * WebCore.vcxproj/WebCore.vcxproj:
1744         * WebCore.vcxproj/WebCore.vcxproj.filters:
1745         * WebCore.xcodeproj/project.pbxproj:
1746         * css/SiblingTraversalStrategies.h: Removed.
1747
1748 2013-05-02  Antti Koivisto  <antti@apple.com>
1749
1750         Shadow DOM removal: Make SelectorChecker non-generic
1751         https://bugs.webkit.org/show_bug.cgi?id=115526
1752
1753         Reviewed by Andreas Kling.
1754
1755         Without Shadow DOM distribution we don't need SiblingTraversalStrategies anymore.
1756
1757         * css/ElementRuleCollector.cpp:
1758         (WebCore::ElementRuleCollector::ruleMatches):
1759         * css/SelectorChecker.cpp:
1760         (WebCore):
1761         (WebCore::isFirstChildElement):
1762         (WebCore::isLastChildElement):
1763         (WebCore::isFirstOfType):
1764         (WebCore::isLastOfType):
1765         (WebCore::countElementsBefore):
1766         (WebCore::countElementsOfTypeBefore):
1767         (WebCore::countElementsAfter):
1768         (WebCore::countElementsOfTypeAfter):
1769         (WebCore::SelectorChecker::match):
1770         (WebCore::SelectorChecker::checkOne):
1771         * css/SelectorChecker.h:
1772         (SelectorChecker):
1773         * css/SiblingTraversalStrategies.h:
1774         * css/StyleResolver.h:
1775         (WebCore::checkRegionSelector):
1776         * dom/SelectorQuery.cpp:
1777         (WebCore::SelectorDataList::selectorMatches):
1778         * html/shadow/ContentSelectorQuery.cpp:
1779         (WebCore::ContentSelectorDataList::checkContentSelector):
1780
1781 2013-05-02  Anders Carlsson  <andersca@apple.com>
1782
1783         Simplify WebCoreObjCExtras by using WTF::bind
1784         https://bugs.webkit.org/show_bug.cgi?id=115524
1785
1786         Reviewed by Andreas Kling.
1787
1788         * platform/mac/WebCoreObjCExtras.mm:
1789         (deallocCallback):
1790         (WebCoreObjCScheduleDeallocateOnMainThread):
1791
1792 2013-05-02  Alexey Proskuryakov  <ap@apple.com>
1793
1794         <rdar://problem/13740375> Non-ASCII downloaded file names are garbled when using NetworkProcess
1795         https://bugs.webkit.org/show_bug.cgi?id=115520
1796
1797         Reviewed by Darin Adler.
1798
1799         Covered by existing tests when using NetworkProcess.
1800
1801         * WebCore.exp.in:
1802         * platform/network/ResourceRequestBase.h:
1803         (WebCore::ResourceRequestBase::responseContentDispositionEncodingFallbackArray):
1804         Added a getter for encoding fallback array.
1805
1806         * platform/network/mac/ResourceRequestMac.mm:
1807         (WebCore::ResourceRequest::doUpdateResourceRequest):
1808         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1809         Removed obsolete checks for presence of fallback array methods, they were available
1810         since 10.6.8.
1811
1812 2013-05-01  Enrica Casucci  <enrica@apple.com>
1813
1814         text-combine: horizontal does not work properly for some fonts.
1815         https://bugs.webkit.org/show_bug.cgi?id=115503.
1816
1817         Reviewed by Dave Hyatt.
1818
1819         For some fonts that don't have width variants, we fail to combine glyphs
1820         because we believe they don't fit. That decision is made comparing the run width
1821         with the font computed size multiplied by a margin factor.
1822         I've increased the margin from 10% to 15%.
1823          
1824         Test: fast/text/text-combine-different-fonts.html
1825
1826         * rendering/RenderCombineText.cpp:
1827
1828 2013-05-01  Joseph Pecoraro  <pecoraro@apple.com>
1829
1830         Null check plugInClient earlier in snapshotting path
1831         https://bugs.webkit.org/show_bug.cgi?id=115498
1832
1833         Reviewed by Darin Adler.
1834
1835         * html/HTMLPlugInImageElement.cpp:
1836         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
1837
1838 2013-05-01  Seokju Kwon  <seokju.kwon@gmail.com>
1839
1840         Web Inspector: Fix check-inspector-strings script and fix localized strings
1841         https://bugs.webkit.org/show_bug.cgi?id=115495
1842
1843         Reviewed by Joseph Pecoraro.
1844
1845         No new tests, because there is no change in behavior.
1846
1847         * English.lproj/localizedStrings.js:
1848
1849 2013-05-01  Tim Horton  <timothy_horton@apple.com>
1850
1851         <object data="<some data URL>"> MIME types aren't case-insensitive
1852         https://bugs.webkit.org/show_bug.cgi?id=115494
1853
1854         Reviewed by Darin Adler.
1855
1856         Test: fast/images/object-data-url-case-insensitivity.html
1857
1858         MIME types are defined to be case-insensitive, but many places in WebCore
1859         only compare them against lower-case strings. Most entry points for MIME
1860         types lower-case them, but mimeTypeFromDataURL doesn't, causing, for example,
1861         data:image/png;... to work, but data:iMaGe/PNG;... to fail.
1862
1863         To fix this, lower-case the string returned from mimeTypeFromDataURL.
1864
1865         * platform/KURL.cpp:
1866         (WebCore::mimeTypeFromDataURL):
1867
1868 2013-05-01  Ryosuke Niwa  <rniwa@webkit.org>
1869
1870         [Mac] Text replacement should use correction indicator
1871         https://bugs.webkit.org/show_bug.cgi?id=115471
1872
1873         Reviewed by Darin Adler.
1874
1875         Support autocorrection panel for text replacements by making AlternativeTextTypeCorrection
1876         handle text replacements as well as automatic spelling correction.
1877
1878         No new tests. Unfortunately this feature is not testable as is. We need to provide some
1879         internals or testRunner methods to make this feature testable in the long term.
1880
1881         * editing/AlternativeTextController.cpp:
1882         (WebCore::AlternativeTextController::timerFired): Trigger both TextCheckingTypeReplacement
1883         and TextCheckingTypeShowCorrectionPanel.
1884
1885         * editing/Editor.cpp:
1886         (WebCore::Editor::markAndReplaceFor): Autocorrection panel maybe used for both
1887         TextCheckingTypeReplacement and TextCheckingTypeShowCorrectionPanel.
1888
1889 2013-05-01  Tim Horton  <timothy_horton@apple.com>
1890
1891         Move knowledge of PDF/PostScript MIME types into MIMETypeRegistry
1892         https://bugs.webkit.org/show_bug.cgi?id=115487
1893
1894         Reviewed by Darin Adler.
1895
1896         No new tests, just a refactoring.
1897
1898         * WebCore.exp.in:
1899         Export newly-added isPDFOrPostScriptMIMEType and getPDFAndPostScriptMIMETypes.
1900
1901         * dom/DOMImplementation.cpp:
1902         (WebCore::DOMImplementation::createDocument):
1903         Adopt MIMETypeRegistry::isPDFOrPostScriptMIMEType instead of duplicating
1904         the list of MIME types. The previous list did not include PostScript, but
1905         it seems reasonable to put plugins ahead of built-in support for it in addition to PDF.
1906
1907         * platform/MIMETypeRegistry.cpp:
1908         (WebCore::initializePDFAndPostScriptMIMETypes): Added.
1909         (WebCore::initializeMIMETypeRegistry): Call initializePDFAndPostScriptMIMETypes.
1910         (WebCore::MIMETypeRegistry::isPDFOrPostScriptMIMEType):
1911         Consult our new HashSet to see if the given MIME type is one of those used for PDF or PS.
1912
1913         (WebCore::MIMETypeRegistry::getPDFAndPostScriptMIMETypes): Added.
1914         * platform/MIMETypeRegistry.h:
1915         (MIMETypeRegistry): Add isPDFOrPostScriptMIMEType and getPDFAndPostScriptMIMETypes.
1916
1917 2013-05-01  Anders Carlsson  <andersca@apple.com>
1918
1919         Implement LocalStorageDatabase::importItems
1920         https://bugs.webkit.org/show_bug.cgi?id=115493
1921
1922         Reviewed by Andreas Kling.
1923
1924         Export symbols needed by WebKit2.
1925
1926         * WebCore.exp.in:
1927
1928 2013-05-01  Anders Carlsson  <andersca@apple.com>
1929
1930         Begin work on loading items from the local storage database
1931         https://bugs.webkit.org/show_bug.cgi?id=115489
1932
1933         Reviewed by Andreas Kling.
1934
1935         Export symbols and SQLite headers needed.
1936
1937         * WebCore.exp.in:
1938         * WebCore.xcodeproj/project.pbxproj:
1939
1940 2013-05-01  Hans Muller  <hmuller@adobe.com>
1941         [CSS Exclusions] Programmatic layout tests fail when subpixel layout is disabled
1942         https://bugs.webkit.org/show_bug.cgi?id=115455
1943
1944         First round of changes to restore platform/mac exclusion tests that started failing when
1945         subpixel layout was turned off.
1946
1947         Reviewed by Dirk Schulze.
1948
1949         * rendering/ExclusionPolygon.cpp:
1950         (WebCore::appendArc): Ensure that the 3rd of 5 added vertices is in the center of the arc.
1951         (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): Use ceiledLayoutUnit() for downwards-snapping first fit location.
1952         * rendering/ExclusionRectangle.cpp:
1953         (WebCore::ExclusionRectangle::firstIncludedIntervalLogicalTop): Ditto.
1954
1955 2013-05-01  Enrica Casucci  <enrica@apple.com>
1956
1957         Incorrect layout for blocks containing ideographs with -webkit-linebox-contain: glyphs, font, inline-box.
1958         https://bugs.webkit.org/show_bug.cgi?id=115478.
1959
1960         Reviewed by Dave Hyatt.
1961
1962         Test: fast/block/lineboxcontain/block-with-ideographs.xhtml
1963
1964         When computing ascent and descent we need to take into account
1965         the baseline type. RootInlineBox::ascentAndDescentForBox failed
1966         to do that in few cases.
1967
1968         * rendering/RootInlineBox.cpp:
1969         (WebCore::RootInlineBox::ascentAndDescentForBox):
1970
1971 2013-05-01  Anders Carlsson  <andersca@apple.com>
1972
1973         Add LocalStorageDatabase class
1974         https://bugs.webkit.org/show_bug.cgi?id=115486
1975
1976         Reviewed by Sam Weinig.
1977
1978         Export symbols needed by WebKit2.
1979
1980         * WebCore.exp.in:
1981
1982 2013-05-01  Eric Carlson  <eric.carlson@apple.com>
1983
1984         [Mac Lion] Assertion failure in MediaControlTextTrackContainerElement::updateDisplay()
1985         https://bugs.webkit.org/show_bug.cgi?id=115289
1986
1987         Reviewed by Jer Noble.
1988
1989         No new tests, this is a speculative fix for an infrequent assertion.
1990
1991         * html/HTMLMediaElement.cpp:
1992         (WebCore::HTMLMediaElement::textTrackRemoveCue): Mark the cue as inactive when it is removed
1993             from the active set.
1994
1995 2013-05-01  Joseph Pecoraro  <pecoraro@apple.com>
1996
1997         TextTrackMenu crashes in ports where MediaElement players are lazily created
1998         https://bugs.webkit.org/show_bug.cgi?id=115485
1999
2000         Null check the player for ports, like iOS, that lazily create the player.
2001
2002         Reviewed by Eric Carlson.
2003
2004         * html/HTMLMediaElement.cpp:
2005         (WebCore::HTMLMediaElement::platformTextTrackMenu):
2006         (WebCore::HTMLMediaElement::closeCaptionTracksChanged):
2007
2008 2013-05-01  Anders Carlsson  <andersca@apple.com>
2009
2010         Add FunctionDispatcher class and make RunLoop derive from it
2011         https://bugs.webkit.org/show_bug.cgi?id=115480
2012
2013         Reviewed by Sam Weinig.
2014
2015         Change RunLoop to be a subclass of FunctionDispatcher.
2016
2017         * platform/RunLoop.h:
2018         (RunLoop):
2019
2020 2013-05-01  Eric Carlson  <eric.carlson@apple.com>
2021
2022         HTMLMediaElement::updateActiveTextTrackCues can do unnecessary work
2023         https://bugs.webkit.org/show_bug.cgi?id=81856
2024
2025         Reviewed by Jer Noble.
2026
2027         No new tests, covered by existing tests.
2028
2029         * html/HTMLMediaElement.h:
2030         (WebCore::HTMLMediaElement::ignoreTrackDisplayUpdateRequests): Add an early return when there
2031             is obviously no work to be done.
2032
2033 2013-04-30  Jer Noble  <jer.noble@apple.com>
2034
2035         Closed caption lines overlap
2036         https://bugs.webkit.org/show_bug.cgi?id=115438
2037         <rdar://problem/13351747>
2038
2039         Reviewed by Eric Carlson.
2040
2041         Take the line-box padding into account when determining line hight by setting
2042         the -webkit-line-box-contain property to include 'inline-box'.
2043
2044         * css/mediaControls.css:
2045         (video::-webkit-media-text-track-container):
2046
2047 2013-05-01  David Kilzer  <ddkilzer@apple.com>
2048
2049         BUILD FIX (r149410): CFRunLoopStop() doesn't know what to do with a RetainPtr<CFRunLoopRef>
2050
2051         Fixes the following build failure:
2052
2053             WebCore/platform/cf/RunLoopCF.cpp:82:5: error: no matching function for call to 'CFRunLoopStop'
2054                 CFRunLoopStop(m_runLoop);
2055                 ^~~~~~~~~~~~~
2056
2057         * platform/cf/RunLoopCF.cpp:
2058         (WebCore::RunLoop::stop): Call RetainPtr::get().
2059
2060 2013-05-01  Per-Erik Brodin  <per-erik.brodin@ericsson.com>
2061
2062         EventSource: Loss of reconnect time precision due to integer division
2063         https://bugs.webkit.org/show_bug.cgi?id=115358
2064
2065         Make sure precision is not lost when converting the reconnect time from milliseconds to seconds.
2066
2067         Reviewed by Alexey Proskuryakov.
2068
2069         Test: http/tests/eventsource/eventsource-retry-precision.html
2070
2071         * page/EventSource.cpp:
2072         (WebCore::EventSource::scheduleReconnect):
2073
2074 2013-05-01  Andreas Kling  <akling@apple.com>
2075
2076         REGRESSION(r149287): Assertion failure in fast/frames/flattening/iframe-flattening-crash.html
2077         <http://webkit.org/b/115386>
2078         <rdar://problem/13769995>
2079
2080         Reviewed by Antti Koivisto.
2081
2082         Only send synchronous resize events for the main frame. Subframes change size during layout,
2083         so it never really makes sense for them to use synchronous dispatch anyway.
2084
2085         * page/FrameView.cpp:
2086         (WebCore::FrameView::dispatchResizeEvent):
2087
2088 2013-05-01  Csaba Osztrogonác  <ossy@webkit.org>
2089
2090         Unreviewed trivial buildfix after r149432.
2091
2092         * testing/Internals.cpp:
2093         (WebCore):
2094
2095 2013-05-01  Sergio Villar Senin  <svillar@igalia.com>
2096
2097         Show a block cursor in overtype mode
2098         https://bugs.webkit.org/show_bug.cgi?id=114819
2099
2100         Reviewed by Ryosuke Niwa.
2101
2102         Test: editing/selection/block-cursor-overtype-mode.html
2103
2104         Overtype mode will use block cursor instead of a caret to
2105         highlight the next character to be replaced. It will fully cover
2106         the next character to be replaced (except at the end of a line
2107         where the usual blinking caret will be shown).
2108
2109         This new block cursor is internally implemented as a selection
2110         (not exposed to JavaScript) because the selection code knows how
2111         to deal with bidi text.
2112
2113         * WebCore.exp.in: Export symbols for testing purposes.
2114         * WebCore.order: Ditto.
2115         * editing/Editor.cpp:
2116         (WebCore::Editor::toggleOverwriteModeEnabled): Added a call to
2117         FrameLoader::setShouldShowBlockCursor.
2118         (WebCore):
2119         * editing/Editor.h:
2120         (Editor):
2121         * editing/FrameSelection.cpp:
2122         (WebCore::FrameSelection::FrameSelection):
2123         (WebCore::FrameSelection::updateAppearance): Use a 1-character
2124         long selection to paint the cursor in overtype mode.
2125         (WebCore::FrameSelection::setShouldShowBlockCursor):
2126         (WebCore):
2127         * editing/FrameSelection.h:
2128         (WebCore::FrameSelection::shouldShowBlockCursor):
2129         (FrameSelection):
2130         * testing/Internals.cpp:
2131         (WebCore):
2132         (WebCore::Internals::selectionBounds): Added a new method which
2133         returns the IntRect issued by FrameSelection::bounds().
2134         * testing/Internals.h: Ditto.
2135         * testing/Internals.idl: Ditto.
2136
2137 2013-04-30  Darin Adler  <darin@apple.com>
2138
2139         [Mac] Remove adoptNS/retain pairs, since the two cancel each other out
2140         https://bugs.webkit.org/show_bug.cgi?id=115426
2141
2142         Reviewed by Anders Carlsson.
2143
2144         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
2145         (PlatformCAAnimation::PlatformCAAnimation):
2146         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
2147         (PlatformCAFilters::filterValueForOperation):
2148         * platform/network/mac/ResourceResponseMac.mm:
2149         (WebCore::ResourceResponse::nsURLResponse):
2150         Remove adoptNS and release from code that is doing both.
2151
2152 2013-04-29  Sam Weinig  <sam@webkit.org>
2153
2154         Add API to allow WebKit2 banners to get mouse events
2155         https://bugs.webkit.org/show_bug.cgi?id=115395
2156
2157         Reviewed by Beth Dakin.
2158
2159         * WebCore.exp.in:
2160         * platform/ScrollView.cpp:
2161         (WebCore::ScrollView::rootViewToTotalContents):
2162         * platform/ScrollView.h:
2163         Add and expose rootViewToTotalContents().
2164
2165 2013-04-30  Anders Carlsson  <andersca@apple.com>
2166
2167         Make RunLoop ref-counted
2168         https://bugs.webkit.org/show_bug.cgi?id=115384
2169
2170         Reviewed by Benjamin Poulain.
2171
2172         Add a RunLoop::Holder class which creates and holds the ref-counted RunLoop object.
2173
2174         * platform/RunLoop.cpp:
2175         (RunLoop::Holder):
2176         (WebCore::RunLoop::Holder::Holder):
2177         (WebCore::RunLoop::Holder::runLoop):
2178         (WebCore::RunLoop::current):
2179         * platform/RunLoop.h:
2180
2181 2013-04-30  Anders Carlsson  <andersca@apple.com>
2182
2183         Clean up RunLoop code
2184         https://bugs.webkit.org/show_bug.cgi?id=115454
2185
2186         Reviewed by Andreas Kling.
2187
2188         Delete a couple of functions from RunLoopCF.cpp and just use the generic ones in RunLoop.cpp,
2189         use RetainPtr instead of manual retain/release. Always use an AutoreleasePool when calling performWork or timers.
2190
2191         * platform/RunLoop.cpp:
2192         (WebCore::RunLoop::setUseApplicationRunLoopOnMainRunLoop):
2193         (WebCore):
2194         * platform/RunLoop.h:
2195         (TimerBase):
2196         (RunLoop):
2197         * platform/cf/RunLoopCF.cpp:
2198         (WebCore::RunLoop::performWork):
2199         (WebCore::RunLoop::RunLoop):
2200         (WebCore::RunLoop::~RunLoop):
2201         (WebCore::RunLoop::wakeUp):
2202         (WebCore::RunLoop::TimerBase::timerFired):
2203         (WebCore::RunLoop::TimerBase::TimerBase):
2204         (WebCore::RunLoop::TimerBase::start):
2205         (WebCore::RunLoop::TimerBase::stop):
2206         (WebCore::RunLoop::TimerBase::isActive):
2207         * platform/mac/RunLoopMac.mm:
2208         (WebCore::RunLoop::run):
2209         (WebCore::RunLoop::stop):
2210
2211 2013-04-30  David Hyatt  <hyatt@apple.com>
2212
2213         <button> ignores margin-bottom.
2214         https://bugs.webkit.org/show_bug.cgi?id=114940
2215         
2216         Reviewed by Beth Dakin.
2217
2218         Make sure that the inner block inside the <button> (flexbox) acts like it
2219         establishes a block formatting context, i.e., it should refuse to collapse
2220         its margins with its children. This causes margins to stay inside the <button>
2221         and be honored, adding to the button's overall height.
2222         
2223         Basically we have to remove the restriction that anonymous blocks can't be
2224         BFCs on the bottom margin.
2225
2226         Added fast/forms/content-with-margins-inside-button.html
2227
2228         * rendering/RenderBlock.cpp:
2229         (WebCore::RenderBlock::handleAfterSideOfBlock):
2230
2231 2013-04-30  Andrei Bucur  <abucur@adobe.com>
2232
2233         Cleanup HTMLOListElement<->RenderListItem bridge
2234         https://bugs.webkit.org/show_bug.cgi?id=115434
2235
2236         Reviewed by Darin Adler.
2237
2238         Refactor the way HTMLOListElement is accessing its list items. Instead
2239         of exposing the nextListItem function, wrap the desiredfunctionality
2240         in static methods on RenderListItem. This should make the code more readable.
2241         I've also added more constness to some functions in RenderListItem.
2242
2243         Tests: No new tests, just refactoring.
2244
2245         * html/HTMLOListElement.cpp:
2246         (WebCore::HTMLOListElement::updateItemValues): Use updateItemValuesForOrderedList.
2247         (WebCore::HTMLOListElement::recalculateItemCount): Use itemCountForOrderedList.
2248         * rendering/RenderListItem.cpp:
2249         (WebCore::isList): Add more constness.
2250         (WebCore::nextListItem): Make local to the CPP and add constness.
2251         (WebCore::previousListItem): Add constness.
2252         (WebCore::RenderListItem::updateItemValuesForOrderedList): Called by OL elements.
2253         (WebCore::RenderListItem::itemCountForOrderedList): Called by OL elements.
2254         (WebCore::previousOrNextItem):
2255         * rendering/RenderListItem.h: Add updateItemValuesForOrderedList and itemCountForOrderedList.
2256
2257 2013-04-30  Anders Carlsson  <andersca@apple.com>
2258
2259         More StorageTracker cleanup
2260         https://bugs.webkit.org/show_bug.cgi?id=115435
2261
2262         Reviewed by Andreas Kling.
2263
2264         Use bind instead of "onMainThread" helper functions.
2265
2266         * storage/StorageAreaSync.cpp:
2267         (WebCore::StorageAreaSync::deleteEmptyDatabase):
2268         * storage/StorageTracker.cpp:
2269         (WebCore::StorageTracker::syncImportOriginIdentifiers):
2270         (WebCore::StorageTracker::syncFileSystemAndTrackerDatabase):
2271         (WebCore::StorageTracker::deleteOriginWithIdentifier):
2272         * storage/StorageTracker.h:
2273         (StorageTracker):
2274
2275 2013-04-30  Geoffrey Garen  <ggaren@apple.com>
2276
2277         Objective-C JavaScriptCore API should publicly support bridging to C
2278         https://bugs.webkit.org/show_bug.cgi?id=115447
2279
2280         Reviewed by Mark Hahnenberg.
2281
2282         * bindings/js/ScriptControllerMac.mm:
2283         (WebCore::ScriptController::javaScriptContext):
2284         * bindings/objc/WebScriptObject.mm:
2285         (-[WebScriptObject JSValue]):
2286
2287 2013-04-30  Simon Fraser  <simon.fraser@apple.com>
2288
2289         Fix an issue with JSPerformance.cpp in the WebCore.xcodeproj where
2290         it was being recognized as a diretory rather than a file, introduced
2291         in r149359.
2292         
2293         * WebCore.xcodeproj/project.pbxproj:
2294
2295 2013-04-30  Beth Dakin  <bdakin@apple.com>
2296
2297         Page::pageCount() is inaccurate when we allow the first paint in App Mode
2298         https://bugs.webkit.org/show_bug.cgi?id=115442
2299         -and corresponding-
2300         <rdar://problem/13758445>
2301
2302         Reviewed by Dave Hyatt.
2303
2304         We should set the height here all the time, even if it is the first layout.
2305         * rendering/RenderBlock.cpp:
2306         (WebCore::RenderBlock::checkForPaginationLogicalHeightChange):
2307
2308 2013-04-30  Andreas Kling  <akling@apple.com>
2309
2310         Don't create StyleResolvers just to invalidate them.
2311         <http://webkit.org/b/115436>
2312
2313         Reviewed by Geoffrey Garen.
2314
2315         Renamed Document::styleResolver() to ensureStyleResolver() so it's clear that it never returns null.
2316         Removed a bunch of unnecessary null-checks I spotted while doing this.
2317
2318         Also fixed Element::willModifyAttribute() and FrameView::setFrameRect() to not create a StyleResolver
2319         and immediately invalidate it in some cases.
2320
2321         * css/FontLoader.cpp:
2322         (WebCore::FontLoader::loadFont):
2323         (WebCore::FontLoader::checkFont):
2324         (WebCore::FontLoader::resolveFontStyle):
2325         * css/MediaQueryMatcher.cpp:
2326         (WebCore::MediaQueryMatcher::prepareEvaluator):
2327         * css/StyleMedia.cpp:
2328         (WebCore::StyleMedia::matchMedium):
2329         * dom/Document.cpp:
2330         (WebCore::Document::styleForElementIgnoringPendingStylesheets):
2331         (WebCore::Document::styleForPage):
2332         * dom/Document.h:
2333         (WebCore::Document::ensureStyleResolver):
2334         * dom/DocumentStyleSheetCollection.cpp:
2335         (WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags):
2336         (WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags):
2337         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
2338         * dom/Element.cpp:
2339         (WebCore::StyleResolverParentPusher::push):
2340         (WebCore::StyleResolverParentPusher::~StyleResolverParentPusher):
2341         (WebCore::Element::styleForRenderer):
2342         (WebCore::Element::recalcStyle):
2343         (WebCore::Element::willModifyAttribute):
2344         * dom/NodeRenderingContext.cpp:
2345         (WebCore::NodeRenderingContext::createRendererForTextIfNeeded):
2346         * dom/ShadowRoot.cpp:
2347         (WebCore::ShadowRoot::recalcStyle):
2348         (WebCore::ShadowRoot::attach):
2349         * dom/Text.cpp:
2350         (WebCore::Text::recalcTextStyle):
2351         * editing/EditingStyle.cpp:
2352         (WebCore::styleFromMatchedRulesForElement):
2353         * html/HTMLCanvasElement.cpp:
2354         * html/HTMLCanvasElement.h:
2355         * html/HTMLInputElement.cpp:
2356         (WebCore::HTMLInputElement::customStyleForRenderer):
2357         * html/HTMLOptGroupElement.cpp:
2358         (WebCore::HTMLOptGroupElement::updateNonRenderStyle):
2359         * html/HTMLOptionElement.cpp:
2360         (WebCore::HTMLOptionElement::updateNonRenderStyle):
2361         * html/HTMLPlugInImageElement.cpp:
2362         (WebCore::HTMLPlugInImageElement::customStyleForRenderer):
2363         * html/canvas/CanvasRenderingContext2D.cpp:
2364         (WebCore::CanvasRenderingContext2D::setFont):
2365         * html/shadow/DateTimeEditElement.cpp:
2366         (WebCore::DateTimeEditElement::customStyleForRenderer):
2367         * inspector/InspectorCSSAgent.cpp:
2368         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
2369         * page/DOMWindow.cpp:
2370         (WebCore::DOMWindow::getMatchedCSSRules):
2371         * page/FrameView.cpp:
2372         (WebCore::FrameView::setFrameRect):
2373         * page/animation/KeyframeAnimation.cpp:
2374         (WebCore::KeyframeAnimation::KeyframeAnimation):
2375         * rendering/RenderListBox.cpp:
2376         (WebCore::RenderListBox::updateFromElement):
2377         (WebCore::RenderListBox::paintItemForeground):
2378         * rendering/RenderMenuList.cpp:
2379         (WebCore::RenderMenuList::fontSelector):
2380         * rendering/RenderObject.cpp:
2381         (WebCore::RenderObject::getUncachedPseudoStyle):
2382         * rendering/RenderRegion.cpp:
2383         (WebCore::RenderRegion::checkRegionStyle):
2384         (WebCore::RenderRegion::computeStyleInRegion):
2385         * rendering/RenderSearchField.cpp:
2386         (WebCore::RenderSearchField::fontSelector):
2387         * rendering/svg/RenderSVGInlineText.cpp:
2388         (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
2389         * svg/SVGElement.cpp:
2390         (WebCore::SVGElement::customStyleForRenderer):
2391         * svg/SVGElementRareData.h:
2392         (WebCore::SVGElementRareData::overrideComputedStyle):
2393
2394 2013-04-30  Simon Fraser  <simon.fraser@apple.com>
2395
2396         Cap max CALayer tree depth to avoid crashes
2397         https://bugs.webkit.org/show_bug.cgi?id=115431
2398         <rdar://problem/13401861>
2399
2400         Reviewed by Tim Horton.
2401         
2402         Core Animation can crash if fed deeply nested layer trees.
2403         Avoid this by capping CALayer tree depth at some empirically-determined
2404         level.
2405
2406         Test: compositing/layer-creation/deep-tree.html
2407
2408         * platform/graphics/ca/GraphicsLayerCA.h:
2409         (WebCore::GraphicsLayerCA::CommitState::CommitState): Add treeDepth to the CommitState.
2410         * platform/graphics/ca/GraphicsLayerCA.cpp: Set cMaxLayerTreeDepth to 250
2411         (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly): We need a dummy CommitState
2412         here. It is not expected that flushCompositingStateForThisLayerOnly() will be called for
2413         a layer in the middle of the hierarchy, only for custom-managed leaf layers, so we don't try
2414         to compute the correct tree depth.
2415         (WebCore::GraphicsLayerCA::recursiveCommitChanges): Pass in the commitState. Since this is
2416         copied for each frame, no need to decrement commitState.treeDepth.
2417         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Increment treeDepth once or
2418         twice. If we've reached max, be sure to set the ChildrenChanged flag. We delay tree truncation
2419         until commitLayerChangesAfterSublayers() since ChildrenChanged can be set again when children
2420         are being processed.
2421         (WebCore::GraphicsLayerCA::commitLayerChangesAfterSublayers):
2422         (WebCore::GraphicsLayerCA::updateSublayerList): If we've hit max depth, just set
2423         empty sublayers.
2424
2425 2013-04-30  Darin Adler  <darin@apple.com>
2426
2427         Formatting tweaks
2428         https://bugs.webkit.org/show_bug.cgi?id=115427
2429
2430         Reviewed by Andreas Kling.
2431
2432         * platform/graphics/cg/GraphicsContext3DCG.cpp:
2433         (WebCore::GraphicsContext3D::ImageExtractor::extractImage): Fixed indenting to match
2434         normal WebKit style.
2435
2436         * platform/mac/ScrollAnimatorMac.mm:
2437         (WebCore::ScrollAnimatorMac::pinnedInDirection): Removed an excess "+" that is harmless
2438         but strange.
2439
2440         * platform/mac/SharedBufferMac.mm: Tweaked blank lines for better paragraphing.
2441
2442 2013-04-30  Ryosuke Niwa  <rniwa@webkit.org>
2443
2444         Simplify ContainerNode::removeChildren
2445         https://bugs.webkit.org/show_bug.cgi?id=115398
2446
2447         Reviewed by Andreas Kling.
2448
2449         Back port https://chromium.googlesource.com/chromium/blink/+/b981f01cd065236b5ff7e3a8446d15b384c1b557
2450         by Andrei Bucur, which includes both this and his r148754.
2451
2452         * dom/ContainerNode.cpp:
2453         (WebCore::ContainerNode::removeChildren):
2454
2455 2013-04-30  Carlos Garcia Campos  <cgarcia@igalia.com>
2456
2457         [SOUP] Move default buffer handling from ResourceHandleClient to ResourceHandlesoup
2458         https://bugs.webkit.org/show_bug.cgi?id=115364
2459
2460         Reviewed by Martin Robinson.
2461
2462         ResourceHandleClient that is cross-platform file is not the right
2463         place for the default ResourceHandle read buffer. We can make
2464         getBuffer return 0 by default and handle it in ResourceHandleSoup,
2465         creating a default buffer when the client doesn't provide one.
2466
2467         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2468         (StreamingClient::getOrCreateReadBuffer): Adapt to API change.
2469         * platform/network/ResourceHandle.h:
2470         (ResourceHandle): Add ensureReadBuffer().
2471         * platform/network/ResourceHandleClient.cpp:
2472         (WebCore::ResourceHandleClient::~ResourceHandleClient): Remove
2473         soup specific code.
2474         * platform/network/ResourceHandleClient.h:
2475         (WebCore::ResourceHandleClient::getOrCreateReadBuffer): Rename
2476         getBuffer() as getOrCreateReadBuffer() and use a reference for the
2477         out parameter instead of a pointer.
2478         (ResourceHandleClient): Remove soup specific code.
2479         * platform/network/ResourceHandleInternal.h:
2480         (WebCore::ResourceHandleInternal::ResourceHandleInternal): Rename
2481         m_buffer and m_bufferSize as m_readBufferPtr and m_readBufferSize
2482         and add m_readBuffer to be used as default read buffer.
2483         * platform/network/soup/ResourceHandleSoup.cpp:
2484         (WebCore::ResourceHandle::ensureReadBuffer): Helper function to
2485         make usre we have a read buffer before a read operation. It first
2486         checks if the client provides a buffer and if it doesn't it
2487         creates or reuses the default buffer.
2488         (WebCore::redirectSkipCallback): Call ensureReadBuffer() and adapt
2489         to variable name changes.
2490         (WebCore::cleanupSoupRequestOperation): Adapt to variable name
2491         changes.
2492         (WebCore::nextMultipartResponsePartCallback): Call
2493         ensureReadBuffer() and adapt to variable name changes.
2494         (WebCore::sendRequestCallback): Ditto.
2495         (WebCore::readCallback): Ditto.
2496
2497 2013-04-30  Andreas Kling  <akling@apple.com>
2498
2499         REGRESSION(r149287): Assertion failure in fast/frames/flattening/iframe-flattening-crash.html
2500         <http://webkit.org/b/115386>
2501         <rdar://problem/13769995>
2502
2503         Reviewed by Darin Adler.
2504
2505         Put the resize event on the Document's event queue if it happens while layout is in progress.
2506         This avoids re-entering layout while laying out flattened subframes.
2507
2508         Also move the little logic for the resize event from EventHandler to FrameView (the only client.)
2509
2510         * page/EventHandler.cpp:
2511         * page/EventHandler.h:
2512         * page/FrameView.cpp:
2513         (WebCore::FrameView::dispatchResizeEvent):
2514
2515 2013-04-30  Anders Carlsson  <andersca@apple.com>
2516
2517         Fix build.
2518
2519         * WebCore.exp.in:
2520         * storage/StorageTracker.h:
2521         (StorageTracker):
2522
2523 2013-04-30  Anders Carlsson  <andersca@apple.com>
2524
2525         More StorageTracker cleanup
2526         https://bugs.webkit.org/show_bug.cgi?id=115429
2527
2528         Reviewed by Andreas Kling.
2529
2530         Make a bunch of member functions private, and remove StorageTracker::syncLocalStorage.
2531
2532         * WebCore.exp.in:
2533         * storage/StorageTracker.cpp:
2534         * storage/StorageTracker.h:
2535         (StorageTracker):
2536
2537 2013-04-30  Andreas Kling  <akling@apple.com>
2538
2539         REGRESSION(r149313) Crash at WebCore::FrameView::setFrameRect() when navigating back to previous page while find banner is displayed.
2540         <http://webkit.org/b/115421>
2541         <rdar://problem/13765739>
2542
2543         Reviewed by Antti Koivisto.
2544
2545         Add missing null-checks for Document and StyleResolver when re-evaluating media queries due to viewport changes.
2546
2547         No layout test, since we can't show the find banner from WebCore, and I can't think of another way to
2548         trigger a back navigation to a Document-less Frame that would also change the FrameView's size.
2549
2550         * page/FrameView.cpp:
2551         (WebCore::FrameView::setFrameRect):
2552
2553 2013-04-30  Glenn Adams  <glenn@skynav.com>
2554
2555         The bison grammar for @supports should return 0 in case of an error
2556         https://bugs.webkit.org/show_bug.cgi?id=115402
2557
2558         Reviewed by Darin Adler.
2559
2560         Back ported from https://chromium.googlesource.com/chromium/blink/+/74399c27c8b93286bae03a1d6371735935b34d85.
2561
2562         Test: css3/supports-crash.html
2563
2564         * css/CSSGrammar.y.in:
2565
2566 2013-04-30  Darin Adler  <darin@apple.com>
2567
2568         [CG] Over-release in MIME type registry code
2569         https://bugs.webkit.org/show_bug.cgi?id=115423
2570
2571         Reviewed by Eric Carlson.
2572
2573         Sam Weinig spotted these by code inspection. I don't know how to make a test demonstrating
2574         the problem, but this is clearly an over-release.
2575
2576         * platform/MIMETypeRegistry.cpp:
2577         (WebCore::initializeSupportedImageMIMETypes): Removed incorrect adoptCF call on a string we
2578         are getting from a CFArray.
2579         (WebCore::initializeSupportedImageMIMETypesForEncoding): Ditto.
2580
2581 2013-04-30  Mike Lattanzio  <mlattanzio@blackberry.com>
2582
2583         [BlackBerry] ImageBuffer::copyImage leaking memory
2584         https://bugs.webkit.org/show_bug.cgi?id=115359
2585
2586         Reviewed by George Staikos.
2587
2588         Use a WebCore::Vector to ensure the temporary data is destroyed.
2589         The TiledImage does not take ownership of the data.
2590
2591         * platform/graphics/blackberry/ImageBufferBlackBerry.cpp:
2592         (WebCore::ImageBuffer::copyImage):
2593
2594 2013-04-30  Noam Rosenthal  <noam@webkit.org>
2595
2596         [Texmap] Avoid using overlap/non-overlap region in cases where the overhead is bigger than the gain
2597         https://bugs.webkit.org/show_bug.cgi?id=115226
2598
2599         Reviewed by Allan Sandfeld Jensen.
2600
2601         When there are several fragmeneted overlap regions, or when the overlap region is bigger than the
2602         non-overlap region, it's more efficient to have a single intermediate surface rather than split
2603         the rendering to overlap/non-overlap.
2604
2605         Covered by tests in compositing/overlap-blending.
2606
2607         * platform/graphics/texmap/TextureMapperLayer.cpp:
2608         (WebCore::TextureMapperLayer::shouldBlend):
2609             Readability fix.
2610
2611         (WebCore::TextureMapperLayer::paintUsingOverlapRegions):
2612             Consolidate to one overlap rect when one of the following occurs:
2613             - The overlap region's area is larger than the non-overlap region area.
2614             - There are many fragmented overlap regions and no non-overlap regions.
2615
2616 2013-04-30  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2617
2618         Stop using "in" keyword in IDL files
2619         https://bugs.webkit.org/show_bug.cgi?id=115418
2620
2621         Reviewed by Kentaro Hara.
2622
2623         Stop using "in" keyword in IDL files as this is no longer part of the
2624         Web IDL specification and it brings no additional information.
2625
2626         For now, the IDL parser will still accept the "in" keyword for operation
2627         argument to not break anything. However, we should remove support for it
2628         later on.
2629
2630         No new tests, no behavior change.
2631
2632         * Modules/battery/BatteryManager.idl:
2633         * Modules/encryptedmedia/MediaKeySession.idl:
2634         * Modules/encryptedmedia/MediaKeys.idl:
2635         * Modules/filesystem/DOMWindowFileSystem.idl:
2636         * Modules/filesystem/DirectoryEntry.idl:
2637         * Modules/filesystem/DirectoryEntrySync.idl:
2638         * Modules/filesystem/DirectoryReader.idl:
2639         * Modules/filesystem/EntriesCallback.idl:
2640         * Modules/filesystem/Entry.idl:
2641         * Modules/filesystem/EntryArray.idl:
2642         * Modules/filesystem/EntryArraySync.idl:
2643         * Modules/filesystem/EntryCallback.idl:
2644         * Modules/filesystem/EntrySync.idl:
2645         * Modules/filesystem/ErrorCallback.idl:
2646         * Modules/filesystem/FileCallback.idl:
2647         * Modules/filesystem/FileEntry.idl:
2648         * Modules/filesystem/FileSystemCallback.idl:
2649         * Modules/filesystem/FileWriter.idl:
2650         * Modules/filesystem/FileWriterCallback.idl:
2651         * Modules/filesystem/FileWriterSync.idl:
2652         * Modules/filesystem/MetadataCallback.idl:
2653         * Modules/filesystem/WorkerContextFileSystem.idl:
2654         * Modules/gamepad/GamepadList.idl:
2655         * Modules/geolocation/Geolocation.idl:
2656         * Modules/geolocation/PositionCallback.idl:
2657         * Modules/geolocation/PositionErrorCallback.idl:
2658         * Modules/indexeddb/IDBCursor.idl:
2659         * Modules/indexeddb/IDBDatabase.idl:
2660         * Modules/indexeddb/IDBFactory.idl:
2661         * Modules/indexeddb/IDBIndex.idl:
2662         * Modules/indexeddb/IDBKeyRange.idl:
2663         * Modules/indexeddb/IDBObjectStore.idl:
2664         * Modules/indexeddb/IDBRequest.idl:
2665         * Modules/indexeddb/IDBTransaction.idl:
2666         * Modules/mediasource/MediaSource.idl:
2667         * Modules/mediasource/SourceBuffer.idl:
2668         * Modules/mediasource/SourceBufferList.idl:
2669         * Modules/mediastream/MediaStream.idl:
2670         * Modules/mediastream/MediaStreamTrack.idl:
2671         * Modules/mediastream/NavigatorMediaStream.idl:
2672         * Modules/mediastream/NavigatorUserMediaErrorCallback.idl:
2673         * Modules/mediastream/NavigatorUserMediaSuccessCallback.idl:
2674         * Modules/mediastream/RTCDTMFSender.idl:
2675         * Modules/mediastream/RTCDataChannel.idl:
2676         * Modules/mediastream/RTCErrorCallback.idl:
2677         * Modules/mediastream/RTCIceCandidate.idl:
2678         * Modules/mediastream/RTCPeerConnection.idl:
2679         * Modules/mediastream/RTCSessionDescription.idl:
2680         * Modules/mediastream/RTCSessionDescriptionCallback.idl:
2681         * Modules/mediastream/RTCStatsCallback.idl:
2682         * Modules/mediastream/RTCStatsReport.idl:
2683         * Modules/mediastream/RTCStatsResponse.idl:
2684         * Modules/navigatorcontentutils/NavigatorContentUtils.idl:
2685         * Modules/networkinfo/NetworkInfoConnection.idl:
2686         * Modules/notifications/Notification.idl:
2687         * Modules/notifications/NotificationCenter.idl:
2688         * Modules/notifications/NotificationPermissionCallback.idl:
2689         * Modules/quota/StorageErrorCallback.idl:
2690         * Modules/quota/StorageInfo.idl:
2691         * Modules/quota/StorageQuota.idl:
2692         * Modules/quota/StorageQuotaCallback.idl:
2693         * Modules/quota/StorageUsageCallback.idl:
2694         * Modules/speech/SpeechGrammarList.idl:
2695         * Modules/speech/SpeechRecognition.idl:
2696         * Modules/speech/SpeechRecognitionResult.idl:
2697         * Modules/speech/SpeechRecognitionResultList.idl:
2698         * Modules/speech/SpeechSynthesisUtterance.idl:
2699         * Modules/vibration/NavigatorVibration.idl:
2700         * Modules/webaudio/AnalyserNode.idl:
2701         * Modules/webaudio/AudioBuffer.idl:
2702         * Modules/webaudio/AudioBufferCallback.idl:
2703         * Modules/webaudio/AudioBufferSourceNode.idl:
2704         * Modules/webaudio/AudioContext.idl:
2705         * Modules/webaudio/AudioListener.idl:
2706         * Modules/webaudio/AudioNode.idl:
2707         * Modules/webaudio/AudioParam.idl:
2708         * Modules/webaudio/BiquadFilterNode.idl:
2709         * Modules/webaudio/OfflineAudioContext.idl:
2710         * Modules/webaudio/OscillatorNode.idl:
2711         * Modules/webaudio/PannerNode.idl:
2712         * Modules/webdatabase/DOMWindowWebDatabase.idl:
2713         * Modules/webdatabase/Database.idl:
2714         * Modules/webdatabase/DatabaseCallback.idl:
2715         * Modules/webdatabase/DatabaseSync.idl:
2716         * Modules/webdatabase/SQLResultSetRowList.idl:
2717         * Modules/webdatabase/SQLStatementCallback.idl:
2718         * Modules/webdatabase/SQLStatementErrorCallback.idl:
2719         * Modules/webdatabase/SQLTransaction.idl:
2720         * Modules/webdatabase/SQLTransactionCallback.idl:
2721         * Modules/webdatabase/SQLTransactionErrorCallback.idl:
2722         * Modules/webdatabase/SQLTransactionSync.idl:
2723         * Modules/webdatabase/SQLTransactionSyncCallback.idl:
2724         * Modules/webdatabase/WorkerContextWebDatabase.idl:
2725         * Modules/websockets/WebSocket.idl:
2726         * bindings/scripts/test/TestCallback.idl:
2727         * bindings/scripts/test/TestCustomNamedGetter.idl:
2728         * bindings/scripts/test/TestDomainSecurity.idl:
2729         * bindings/scripts/test/TestEventTarget.idl:
2730         * bindings/scripts/test/TestInterface.idl:
2731         * bindings/scripts/test/TestMediaQueryListListener.idl:
2732         * bindings/scripts/test/TestNamedConstructor.idl:
2733         * bindings/scripts/test/TestObj.idl:
2734         * bindings/scripts/test/TestOverloadedConstructors.idl:
2735         * bindings/scripts/test/TestSerializedScriptValueInterface.idl:
2736         * bindings/scripts/test/TestSupplemental.idl:
2737         * bindings/scripts/test/TestTypedArray.idl:
2738         * bindings/scripts/test/TestTypedefs.idl:
2739         * css/CSSHostRule.idl:
2740         * css/CSSMediaRule.idl:
2741         * css/CSSPrimitiveValue.idl:
2742         * css/CSSRuleList.idl:
2743         * css/CSSStyleDeclaration.idl:
2744         * css/CSSStyleSheet.idl:
2745         * css/CSSSupportsRule.idl:
2746         * css/CSSValueList.idl:
2747         * css/FontLoader.idl:
2748         * css/MediaList.idl:
2749         * css/MediaQueryList.idl:
2750         * css/MediaQueryListListener.idl:
2751         * css/StyleMedia.idl:
2752         * css/StyleSheetList.idl:
2753         * css/WebKitCSSKeyframesRule.idl:
2754         * css/WebKitCSSMatrix.idl:
2755         * dom/CharacterData.idl:
2756         * dom/ClientRectList.idl:
2757         * dom/Clipboard.idl:
2758         * dom/CompositionEvent.idl:
2759         * dom/CustomEvent.idl:
2760         * dom/DOMImplementation.idl:
2761         * dom/DOMNamedFlowCollection.idl:
2762         * dom/DOMStringList.idl:
2763         * dom/DataTransferItem.idl:
2764         * dom/DataTransferItemList.idl:
2765         * dom/DeviceMotionEvent.idl:
2766         * dom/DeviceOrientationEvent.idl:
2767         * dom/Document.idl:
2768         * dom/DocumentFragment.idl:
2769         * dom/Element.idl:
2770         * dom/Event.idl:
2771         * dom/EventListener.idl:
2772         * dom/EventTarget.idl:
2773         * dom/HashChangeEvent.idl:
2774         * dom/KeyboardEvent.idl:
2775         * dom/MessageEvent.idl:
2776         * dom/MessagePort.idl:
2777         * dom/MouseEvent.idl:
2778         * dom/MutationEvent.idl:
2779         * dom/MutationObserver.idl:
2780         * dom/NamedNodeMap.idl:
2781         * dom/Node.idl:
2782         * dom/NodeFilter.idl:
2783         * dom/NodeList.idl:
2784         * dom/OverflowEvent.idl:
2785         * dom/PropertyNodeList.idl:
2786         * dom/Range.idl:
2787         * dom/RequestAnimationFrameCallback.idl:
2788         * dom/ShadowRoot.idl:
2789         * dom/StringCallback.idl:
2790         * dom/Text.idl:
2791         * dom/TextEvent.idl:
2792         * dom/TouchEvent.idl:
2793         * dom/TouchList.idl:
2794         * dom/UIEvent.idl:
2795         * dom/WebKitNamedFlow.idl:
2796         * dom/WheelEvent.idl:
2797         * fileapi/Blob.idl:
2798         * fileapi/FileList.idl:
2799         * fileapi/FileReader.idl:
2800         * fileapi/FileReaderSync.idl:
2801         * html/DOMFormData.idl:
2802         * html/DOMTokenList.idl:
2803         * html/DOMURL.idl:
2804         * html/HTMLAllCollection.idl:
2805         * html/HTMLAudioElement.idl:
2806         * html/HTMLButtonElement.idl:
2807         * html/HTMLCanvasElement.idl:
2808         * html/HTMLCollection.idl:
2809         * html/HTMLDocument.idl:
2810         * html/HTMLElement.idl:
2811         * html/HTMLFieldSetElement.idl:
2812         * html/HTMLFormControlsCollection.idl:
2813         * html/HTMLInputElement.idl:
2814         * html/HTMLKeygenElement.idl:
2815         * html/HTMLMediaElement.idl:
2816         * html/HTMLObjectElement.idl:
2817         * html/HTMLOptionElement.idl:
2818         * html/HTMLOptionsCollection.idl:
2819         * html/HTMLOutputElement.idl:
2820         * html/HTMLPropertiesCollection.idl:
2821         * html/HTMLSelectElement.idl:
2822         * html/HTMLTableElement.idl:
2823         * html/HTMLTableRowElement.idl:
2824         * html/HTMLTableSectionElement.idl:
2825         * html/HTMLTextAreaElement.idl:
2826         * html/MediaController.idl:
2827         * html/TimeRanges.idl:
2828         * html/canvas/ArrayBuffer.idl:
2829         * html/canvas/CanvasGradient.idl:
2830         * html/canvas/CanvasRenderingContext2D.idl:
2831         * html/canvas/DOMPath.idl:
2832         * html/canvas/DataView.idl:
2833         * html/canvas/EXTDrawBuffers.idl:
2834         * html/canvas/Float32Array.idl:
2835         * html/canvas/Float64Array.idl:
2836         * html/canvas/Int16Array.idl:
2837         * html/canvas/Int32Array.idl:
2838         * html/canvas/Int8Array.idl:
2839         * html/canvas/OESVertexArrayObject.idl:
2840         * html/canvas/Uint16Array.idl:
2841         * html/canvas/Uint32Array.idl:
2842         * html/canvas/Uint8Array.idl:
2843         * html/canvas/Uint8ClampedArray.idl:
2844         * html/canvas/WebGLDebugShaders.idl:
2845         * html/canvas/WebGLRenderingContext.idl:
2846         * html/track/AudioTrackList.idl:
2847         * html/track/TextTrack.idl:
2848         * html/track/TextTrackCue.idl:
2849         * html/track/TextTrackCueList.idl:
2850         * html/track/TextTrackList.idl:
2851         * html/track/TextTrackRegionList.idl:
2852         * html/track/VideoTrackList.idl:
2853         * inspector/InjectedScriptHost.idl:
2854         * inspector/InspectorFrontendHost.idl:
2855         * inspector/JavaScriptCallFrame.idl:
2856         * loader/appcache/DOMApplicationCache.idl:
2857         * page/Console.idl:
2858         * page/Crypto.idl:
2859         * page/DOMSecurityPolicy.idl:
2860         * page/DOMSelection.idl:
2861         * page/DOMWindow.idl:
2862         * page/EventSource.idl:
2863         * page/History.idl:
2864         * page/Location.idl:
2865         * page/PagePopupController.idl:
2866         * page/Performance.idl:
2867         * page/PerformanceEntryList.idl:
2868         * page/SpeechInputResultList.idl:
2869         * plugins/DOMMimeTypeArray.idl:
2870         * plugins/DOMPlugin.idl:
2871         * plugins/DOMPluginArray.idl:
2872         * storage/Storage.idl:
2873         * storage/StorageEvent.idl:
2874         * svg/ElementTimeControl.idl:
2875         * svg/SVGAngle.idl:
2876         * svg/SVGColor.idl:
2877         * svg/SVGDocument.idl:
2878         * svg/SVGElementInstanceList.idl:
2879         * svg/SVGFEDropShadowElement.idl:
2880         * svg/SVGFEGaussianBlurElement.idl:
2881         * svg/SVGFEMorphologyElement.idl:
2882         * svg/SVGFilterElement.idl:
2883         * svg/SVGLength.idl:
2884         * svg/SVGLengthList.idl:
2885         * svg/SVGLocatable.idl:
2886         * svg/SVGMarkerElement.idl:
2887         * svg/SVGMatrix.idl:
2888         * svg/SVGNumberList.idl:
2889         * svg/SVGPaint.idl:
2890         * svg/SVGPathElement.idl:
2891         * svg/SVGPathSegList.idl:
2892         * svg/SVGPoint.idl:
2893         * svg/SVGPointList.idl:
2894         * svg/SVGSVGElement.idl:
2895         * svg/SVGStringList.idl:
2896         * svg/SVGStyledElement.idl:
2897         * svg/SVGTests.idl:
2898         * svg/SVGTextContentElement.idl:
2899         * svg/SVGTransform.idl:
2900         * svg/SVGTransformList.idl:
2901         * testing/InternalSettings.idl:
2902         * testing/Internals.idl:
2903         * workers/AbstractWorker.idl:
2904         * workers/DedicatedWorkerContext.idl:
2905         * workers/SharedWorker.idl:
2906         * workers/Worker.idl:
2907         * workers/WorkerContext.idl:
2908         * xml/DOMParser.idl:
2909         * xml/XMLHttpRequest.idl:
2910         * xml/XMLHttpRequestUpload.idl:
2911         * xml/XMLSerializer.idl:
2912         * xml/XPathEvaluator.idl:
2913         * xml/XPathExpression.idl:
2914         * xml/XPathNSResolver.idl:
2915         * xml/XPathResult.idl:
2916         * xml/XSLTProcessor.idl:
2917
2918 2013-04-30  Noam Rosenthal  <noam@webkit.org>
2919
2920         [Texmap] Use fewer intermediate surfaces when compositing filters
2921         https://bugs.webkit.org/show_bug.cgi?id=115224
2922
2923         Reviewed by Allan Sandfeld Jensen.
2924
2925         Until now, when rendering CSS filters, the filters were applied to the texture
2926         and then the resulting texture would be composited to the target surface with
2927         its transform/opacity.
2928         This requires at least two intermediate surface passes for every filtered layer.
2929
2930         This patch makes it so that the last filter pass is applied together with the 
2931         resulting surface's opacity and transform, during composition.
2932
2933         Tested by css3/filters tests, whichn now scroll/zoom a lot faster.
2934
2935         * platform/graphics/texmap/TextureMapper.h:
2936         (WebCore::BitmapTexture::applyFilters):
2937         * platform/graphics/texmap/TextureMapperGL.cpp:
2938         (WebCore::TextureMapperGLData::TextureMapperGLData):
2939         (TextureMapperGLData):
2940         (WebCore):
2941         (WebCore::optionsForFilterType):
2942         (WebCore::getPassesRequiredForFilter):
2943         (WebCore::gauss):
2944         (WebCore::gaussianKernel):
2945         (WebCore::prepareFilterProgram):
2946         (WebCore::TextureMapperGL::drawTexture):
2947         (WebCore::TextureMapperGL::drawFiltered):
2948         (WebCore::isCustomFilter):
2949         * platform/graphics/texmap/TextureMapperGL.h:
2950         (TextureMapperGL):
2951         (BitmapTextureGL):
2952         (FilterInfo):
2953         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
2954         (WebCore::BitmapTextureImageBuffer::applyFilters):
2955         * platform/graphics/texmap/TextureMapperImageBuffer.h:
2956         (BitmapTextureImageBuffer):
2957         (WebCore::BitmapTextureGL::FilterInfo::FilterInfo):
2958         (WebCore::BitmapTextureGL::filterInfo):
2959         (WebCore::BitmapTextureGL::applyFilters):
2960             Modify TextureMapperGL to remember the last filter operation applied
2961             to a BitmapTexture and apply it when the texture is composited.
2962
2963         * platform/graphics/texmap/TextureMapperLayer.cpp:
2964         (WebCore::TextureMapperLayer::paintIntoSurface):
2965             Simplify the call to applyFilters, since now TextureMapperGL is responsible
2966             for maintaining the content texture.
2967
2968
2969 2013-04-30  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2970
2971         [EFL] Enable scaled cursors
2972         https://bugs.webkit.org/show_bug.cgi?id=106242
2973
2974         Reviewed by Gyuyoung Kim.
2975
2976         Correctly copy WebCore::Cursor's m_imageScaleFactor
2977         member in CursorEfl.cpp when MOUSE_CURSOR_SCALE is
2978         enabled.
2979
2980         No new tests, already covered by existing tests.
2981
2982         * platform/efl/CursorEfl.cpp:
2983         (WebCore::Cursor::Cursor):
2984         (WebCore::Cursor::operator=):
2985
2986 2013-04-30  Thiago Marcos P. Santos  <thiago.santos@intel.com>
2987
2988         CSSParser::parseFontFamily should allow the keyword "default" as part of a font name
2989         https://bugs.webkit.org/show_bug.cgi?id=107231
2990
2991         Reviewed by Ryosuke Niwa.
2992
2993         Make sure that using the keyword "default" as font family doesn't
2994         invalidate the whole declaration. It is also OK to use a font that
2995         has "default" as part of a composite name (i.e. "default foo").
2996         This matches the behavior of Firefox and IE.
2997
2998         Test: fast/css/font-family-parse-keyword.html
2999
3000         * css/CSSParser.cpp:
3001         (WebCore::CSSParser::parseFontFamily):
3002
3003 2013-04-30  Zalan Bujtas  <zalan@apple.com>
3004
3005         Animations fail to start on http://www.google.com/insidesearch/howsearchworks/thestory/
3006         https://bugs.webkit.org/show_bug.cgi?id=111244
3007
3008         Reviewed by David Kilzer.
3009         
3010         Enable performance.now() as a minimal subset of Web Timing API. 
3011         It returns DOMHighResTimeStamp, a monotonically increasing value representing the 
3012         number of milliseconds from the start of the navigation of the current document.
3013         JS libraries use this API to check against the requestAnimationFrame() timestamp.
3014
3015         Test: fast/dom/Window/web-timing-minimal-performance-now.html
3016
3017         * Configurations/FeatureDefines.xcconfig:
3018         * WebCore.xcodeproj/project.pbxproj:
3019         * dom/EventTargetFactory.in:
3020         * page/DOMWindow.cpp:
3021         (WebCore::DOMWindow::~DOMWindow):
3022         (WebCore::DOMWindow::resetDOMWindowProperties):
3023         (WebCore):
3024         * page/DOMWindow.h:
3025         (DOMWindow):
3026         * page/DOMWindow.idl:
3027         * page/Performance.cpp:
3028         (WebCore):
3029         * page/Performance.h:
3030         (Performance):
3031         * page/Performance.idl:
3032
3033 2013-04-30  Commit Queue  <rniwa@webkit.org>
3034
3035         Unreviewed, rolling out r149338.
3036         http://trac.webkit.org/changeset/149338
3037         https://bugs.webkit.org/show_bug.cgi?id=115409
3038
3039         Broke layout/perf/API tests on non-Mac:
3040         ThreadSpecific<RefPtr<RunLoop>> does not initialize RunLoop
3041         (Requested by rakuco on #webkit).
3042
3043         * platform/RunLoop.cpp:
3044         (WebCore::RunLoop::current):
3045         * platform/RunLoop.h:
3046         (RunLoop):
3047         * platform/cf/RunLoopCF.cpp:
3048         (WebCore::RunLoop::initializeMainRunLoop):
3049         (WebCore::RunLoop::current):
3050         (WebCore::RunLoop::~RunLoop):
3051         * platform/efl/RunLoopEfl.cpp:
3052         (WebCore::RunLoop::~RunLoop):
3053         * platform/gtk/RunLoopGtk.cpp:
3054         (WebCore::RunLoop::~RunLoop):
3055         * platform/win/RunLoopWin.cpp:
3056         (WebCore::RunLoop::~RunLoop):
3057
3058 2013-04-30  Alberto Garcia  <agarcia@igalia.com>
3059
3060         ImageBufferData: add BlackBerry header
3061         https://bugs.webkit.org/show_bug.cgi?id=115408
3062
3063         Reviewed by Carlos Garcia Campos.
3064
3065         * platform/graphics/ImageBufferData.h:
3066
3067 2013-04-30  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3068
3069         Replace "Optional" extended attribute by proper Web IDL "optional" keyword
3070         https://bugs.webkit.org/show_bug.cgi?id=115380
3071
3072         Reviewed by Kentaro Hara.
3073
3074         Replace [Optional] with standard WebIDL optional type prefix:
3075         http://dev.w3.org/2006/webapi/WebIDL/#dfn-optional-argument
3076
3077         The default behavior now matches WebIDL: [Optional] => optional
3078
3079         Two cases where WebKit has extended bindings behavior still
3080         require a non-standard IDL attribute:
3081         [Optional=DefaultIsNullString] => [Default=NullString] optional
3082         [Optional=DefaultIsUndefined] => [Default=Undefined] optional
3083
3084         Based on corresponding Blink patch from Joshua Bell for compatibility.
3085
3086         No new tests, no behavior change.
3087
3088         * Modules/battery/BatteryManager.idl:
3089         * Modules/encryptedmedia/MediaKeySession.idl:
3090         * Modules/encryptedmedia/MediaKeys.idl:
3091         * Modules/filesystem/DOMWindowFileSystem.idl:
3092         * Modules/filesystem/DirectoryEntry.idl:
3093         * Modules/filesystem/DirectoryReader.idl:
3094         * Modules/filesystem/Entry.idl:
3095         * Modules/filesystem/FileEntry.idl:
3096         * Modules/filesystem/FileWriter.idl:
3097         * Modules/filesystem/WorkerContextFileSystem.idl:
3098         * Modules/gamepad/GamepadList.idl:
3099         * Modules/geolocation/Geolocation.idl:
3100         * Modules/indexeddb/IDBCursor.idl:
3101         * Modules/indexeddb/IDBDatabase.idl:
3102         * Modules/indexeddb/IDBFactory.idl:
3103         * Modules/indexeddb/IDBIndex.idl:
3104         * Modules/indexeddb/IDBKeyRange.idl:
3105         * Modules/indexeddb/IDBObjectStore.idl:
3106         * Modules/indexeddb/IDBRequest.idl:
3107         * Modules/indexeddb/IDBTransaction.idl:
3108         * Modules/mediasource/MediaSource.idl:
3109         * Modules/mediasource/SourceBufferList.idl:
3110         * Modules/mediastream/MediaStream.idl:
3111         * Modules/mediastream/MediaStreamTrack.idl:
3112         * Modules/mediastream/NavigatorMediaStream.idl:
3113         * Modules/mediastream/RTCDTMFSender.idl:
3114         * Modules/mediastream/RTCDataChannel.idl:
3115         * Modules/mediastream/RTCPeerConnection.idl:
3116         * Modules/mediastream/RTCStatsResponse.idl:
3117         * Modules/networkinfo/NetworkInfoConnection.idl:
3118         * Modules/notifications/Notification.idl:
3119         * Modules/notifications/NotificationCenter.idl:
3120         * Modules/quota/StorageInfo.idl:
3121         * Modules/quota/StorageQuota.idl:
3122         * Modules/speech/SpeechGrammarList.idl:
3123         * Modules/speech/SpeechRecognition.idl:
3124         * Modules/speech/SpeechSynthesisUtterance.idl:
3125         * Modules/webaudio/AudioContext.idl:
3126         * Modules/webaudio/AudioNode.idl:
3127         * Modules/webdatabase/DOMWindowWebDatabase.idl:
3128         * Modules/webdatabase/Database.idl:
3129         * Modules/webdatabase/DatabaseSync.idl:
3130         * Modules/webdatabase/SQLTransaction.idl:
3131         * Modules/webdatabase/WorkerContextWebDatabase.idl:
3132         * Modules/websockets/WebSocket.idl:
3133         * bindings/scripts/CodeGeneratorJS.pm:
3134         (GetFunctionLength):
3135         (GenerateFunctionParametersCheck):
3136         (GenerateArgumentsCountCheck):
3137         (GenerateParametersCheck):
3138         (GenerateConstructorDefinition):
3139         * bindings/scripts/IDLAttributes.txt:
3140         * bindings/scripts/IDLParser.pm:
3141         (parseOptionalOrRequiredArgument):
3142         * bindings/scripts/test/TestEventTarget.idl:
3143         * bindings/scripts/test/TestInterface.idl:
3144         * bindings/scripts/test/TestNamedConstructor.idl:
3145         * bindings/scripts/test/TestObj.idl:
3146         * bindings/scripts/test/TestSerializedScriptValueInterface.idl:
3147         * bindings/scripts/test/TestTypedefs.idl: optional cannot be used in a typedef.
3148         * css/CSSHostRule.idl:
3149         * css/CSSMediaRule.idl:
3150         * css/CSSPrimitiveValue.idl:
3151         * css/CSSRuleList.idl:
3152         * css/CSSStyleDeclaration.idl:
3153         * css/CSSStyleSheet.idl:
3154         * css/CSSSupportsRule.idl:
3155         * css/CSSValueList.idl:
3156         * css/FontLoader.idl:
3157         * css/MediaList.idl:
3158         * css/MediaQueryList.idl:
3159         * css/MediaQueryListListener.idl:
3160         * css/StyleMedia.idl:
3161         * css/StyleSheetList.idl:
3162         * css/WebKitCSSKeyframesRule.idl:
3163         * css/WebKitCSSMatrix.idl:
3164         * dom/CharacterData.idl:
3165         * dom/ClientRectList.idl:
3166         * dom/Clipboard.idl:
3167         * dom/CompositionEvent.idl:
3168         * dom/CustomEvent.idl:
3169         * dom/DOMImplementation.idl:
3170         * dom/DOMStringList.idl:
3171         * dom/DataTransferItem.idl:
3172         * dom/DataTransferItemList.idl:
3173         * dom/DeviceMotionEvent.idl:
3174         * dom/DeviceOrientationEvent.idl:
3175         * dom/Document.idl:
3176         * dom/Element.idl:
3177         * dom/Event.idl:
3178         * dom/EventTarget.idl:
3179         * dom/HashChangeEvent.idl:
3180         * dom/KeyboardEvent.idl:
3181         * dom/MessageEvent.idl:
3182         * dom/MessagePort.idl:
3183         * dom/MouseEvent.idl:
3184         * dom/MutationEvent.idl:
3185         * dom/NamedNodeMap.idl:
3186         * dom/Node.idl:
3187         * dom/NodeFilter.idl:
3188         * dom/NodeList.idl:
3189         * dom/OverflowEvent.idl:
3190         * dom/Range.idl:
3191         * dom/ShadowRoot.idl:
3192         * dom/Text.idl:
3193         * dom/TextEvent.idl:
3194         * dom/TouchEvent.idl:
3195         * dom/UIEvent.idl:
3196         * dom/WebKitNamedFlow.idl:
3197         * dom/WheelEvent.idl:
3198         * fileapi/Blob.idl:
3199         * fileapi/FileReader.idl:
3200         * fileapi/FileReaderSync.idl:
3201         * html/DOMFormData.idl:
3202         * html/DOMTokenList.idl:
3203         * html/HTMLAllCollection.idl:
3204         * html/HTMLAudioElement.idl:
3205         * html/HTMLCanvasElement.idl:
3206         * html/HTMLCollection.idl:
3207         * html/HTMLDocument.idl:
3208         * html/HTMLElement.idl:
3209         * html/HTMLFormControlsCollection.idl:
3210         * html/HTMLInputElement.idl:
3211         * html/HTMLMediaElement.idl:
3212         * html/HTMLOptionElement.idl:
3213         * html/HTMLOptionsCollection.idl:
3214         * html/HTMLSelectElement.idl:
3215         * html/HTMLTableElement.idl:
3216         * html/HTMLTableRowElement.idl:
3217         * html/HTMLTableSectionElement.idl:
3218         * html/HTMLTextAreaElement.idl:
3219         * html/MediaController.idl:
3220         * html/canvas/ArrayBuffer.idl:
3221         * html/canvas/CanvasGradient.idl:
3222         * html/canvas/CanvasRenderingContext2D.idl:
3223         * html/canvas/DOMPath.idl:
3224         * html/canvas/DataView.idl:
3225         * html/canvas/Float32Array.idl:
3226         * html/canvas/Float64Array.idl:
3227         * html/canvas/Int16Array.idl:
3228         * html/canvas/Int32Array.idl:
3229         * html/canvas/Int8Array.idl:
3230         * html/canvas/OESVertexArrayObject.idl:
3231         * html/canvas/Uint16Array.idl:
3232         * html/canvas/Uint32Array.idl:
3233         * html/canvas/Uint8Array.idl:
3234         * html/canvas/Uint8ClampedArray.idl:
3235         * html/track/AudioTrackList.idl:
3236         * html/track/TextTrack.idl:
3237         * html/track/TextTrackCue.idl:
3238         * html/track/TextTrackList.idl:
3239         * html/track/VideoTrackList.idl:
3240         * loader/appcache/DOMApplicationCache.idl:
3241         * page/DOMSelection.idl:
3242         * page/DOMWindow.idl:
3243         * page/EventSource.idl:
3244         * page/History.idl:
3245         * page/Location.idl:
3246         * page/Performance.idl:
3247         * plugins/DOMMimeTypeArray.idl:
3248         * plugins/DOMPlugin.idl:
3249         * plugins/DOMPluginArray.idl:
3250         * storage/StorageEvent.idl:
3251         * svg/ElementTimeControl.idl:
3252         * svg/SVGDocument.idl:
3253         * svg/SVGElementInstanceList.idl:
3254         * svg/SVGFEDropShadowElement.idl:
3255         * svg/SVGFEGaussianBlurElement.idl:
3256         * svg/SVGFEMorphologyElement.idl:
3257         * svg/SVGFilterElement.idl:
3258         * svg/SVGLocatable.idl:
3259         * svg/SVGMarkerElement.idl:
3260         * svg/SVGPathElement.idl:
3261         * svg/SVGSVGElement.idl:
3262         * svg/SVGStyledElement.idl:
3263         * svg/SVGTests.idl:
3264         * svg/SVGTextContentElement.idl:
3265         * testing/Internals.idl:
3266         * workers/AbstractWorker.idl:
3267         * workers/DedicatedWorkerContext.idl:
3268         * workers/SharedWorker.idl:
3269         * workers/Worker.idl:
3270         * workers/WorkerContext.idl:
3271         * xml/DOMParser.idl:
3272         * xml/XMLHttpRequest.idl:
3273         * xml/XMLHttpRequestUpload.idl:
3274         * xml/XMLSerializer.idl:
3275         * xml/XPathEvaluator.idl:
3276         * xml/XPathExpression.idl:
3277         * xml/XPathNSResolver.idl:
3278         * xml/XPathResult.idl:
3279         * xml/XSLTProcessor.idl:
3280
3281 2013-04-30  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
3282
3283         Fix the USE(3D_GRAPHICS) build with the standard OpenGL on Windows
3284         https://bugs.webkit.org/show_bug.cgi?id=114684
3285
3286         Reviewed by Simon Hausmann.
3287
3288         Currently USE(3D_GRAPHICS) is only supported with OpenGLES through ANGLE
3289         on Windows. Allow building with the stock opengl32.lib on Windows by adding
3290         missing glCompressedTex* entries in OpenGLShims.
3291         Those are used in Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
3292         and will be substituted by the preprocessor.
3293
3294         * platform/graphics/OpenGLShims.cpp:
3295         (WebCore::initializeOpenGLShims):
3296         * platform/graphics/OpenGLShims.h:
3297         (_OpenGLFunctionTable):
3298
3299 2013-04-29  Alberto Garcia  <agarcia@igalia.com>
3300
3301         Remove all remaining Skia code
3302         https://bugs.webkit.org/show_bug.cgi?id=115263
3303
3304         Reviewed by Benjamin Poulain.
3305
3306         * html/HTMLCanvasElement.cpp:
3307         (WebCore): Remove the MaxSkiaDim constant, which was a leftover
3308         from r149193.
3309         * platform/graphics/harfbuzz/FontHarfBuzz.cpp: Removed.
3310         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: Removed.
3311         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: Removed.
3312         * platform/graphics/harfbuzz/HarfBuzzFaceSkia.cpp: Removed.
3313
3314 2013-04-29  Anders Carlsson  <andersca@apple.com>
3315
3316         Fix build.
3317
3318         * platform/graphics/SimpleFontData.cpp:
3319         (WebCore::SimpleFontData::DerivedFontData::~DerivedFontData):
3320         * platform/graphics/mac/SimpleFontDataMac.mm:
3321         (WebCore::SimpleFontData::getCompositeFontReferenceFontData):
3322
3323 2013-04-29  Simon Fraser  <simon.fraser@apple.com>
3324
3325         Don't do CGContext flipping when painting subframes in WebKit1 on post-MountainLion OSes
3326         https://bugs.webkit.org/show_bug.cgi?id=115392
3327         <rdar://problem/13421519>
3328
3329         Reviewed by Beth Dakin.
3330
3331         Sync up with AppKit behavior changes that could cause subviews to be flipped when
3332         painted.
3333
3334         * platform/mac/WidgetMac.mm:
3335         (WebCore::Widget::paint):
3336
3337 2013-04-29  Chris Fleizach  <cfleizach@apple.com>
3338
3339         WEB SPEECH: need to identify the default voice per language
3340         https://bugs.webkit.org/show_bug.cgi?id=115366
3341
3342         Reviewed by Tim Horton.
3343
3344         Use a WKSystemInterface method to determine which voice per language is the default voice.
3345
3346         When looking for a voice, there may not be a default at all, so we need to search until we
3347         find a default.
3348
3349         * WebCore.exp.in:
3350         * platform/mac/PlatformSpeechSynthesizerMac.mm:
3351         (-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
3352         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
3353         * platform/mac/WebCoreSystemInterface.h:
3354         * platform/mac/WebCoreSystemInterface.mm:
3355
3356 2013-04-29  James Craig  <james@cookiecrook.com>
3357
3358         Settings.in selectionIncludesAltImageText should default to true, due to update in HTML spec.
3359         https://bugs.webkit.org/show_bug.cgi?id=115283
3360
3361         Reviewed by Chris Fleizach.
3362
3363         Config change due to this spec update:
3364         https://www.w3.org/Bugs/Public/show_bug.cgi?id=21403
3365         http://html5.org/tools/web-apps-tracker?from=7854&to=7855
3366
3367         Updated existing test coverage.
3368
3369         * page/Settings.in:
3370
3371 2013-04-29  Anders Carlsson  <andersca@apple.com>
3372
3373         Make RunLoop ref-counted
3374         https://bugs.webkit.org/show_bug.cgi?id=115384
3375
3376         Reviewed by Sam Weinig.
3377
3378         This is a step towards creating a shared base class that both RunLoop and WorkQueue will derive from.
3379
3380         * platform/RunLoop.cpp:
3381         (WebCore::RunLoop::current):
3382         (WebCore::RunLoop::~RunLoop):
3383         (WebCore):
3384         * platform/RunLoop.h:
3385         (RunLoop):
3386         * platform/cf/RunLoopCF.cpp:
3387         (WebCore::RunLoop::initializeMainRunLoop):
3388         (WebCore::RunLoop::current):
3389         (WebCore::RunLoop::~RunLoop):
3390
3391 2013-04-29  Brent Fulgham  <bfulgham@webkit.org>
3392
3393         [Windows, WinCairo] Remove link and include directives for pthread.
3394         https://bugs.webkit.org/show_bug.cgi?id=115381
3395
3396         Reviewed by Benjamin Poulain.
3397
3398         Update various VS2005 and VS2010 property sheets to remove
3399         reference to the pthreads Include path and instructions to
3400         link to the pthreads library.
3401
3402         * WebCore.vcproj/QTMovieWinCommon.vsprops:
3403         * WebCore.vcproj/WebCoreCommon.vsprops:
3404         * WebCore.vcproj/WebCoreDebug.vsprops:
3405         * WebCore.vcproj/WebCoreDebugAll.vsprops:
3406         * WebCore.vcproj/WebCoreProduction.vsprops:
3407         * WebCore.vcproj/WebCorePthreads.vsprops: Removed.
3408         * WebCore.vcproj/WebCoreRelease.vsprops:
3409         * WebCore.vcxproj/WebCoreCommon.props:
3410         * WebCore.vcxproj/WebCoreDebug.props:
3411         * WebCore.vcxproj/WebCoreDebugWinCairo.props:
3412         * WebCore.vcxproj/WebCoreProduction.props:
3413         * WebCore.vcxproj/WebCorePthreads.props: Removed.
3414         * WebCore.vcxproj/WebCoreRelease.props:
3415         * WebCore.vcxproj/WebCoreReleaseWinCairo.props:
3416
3417 2013-04-29  Benjamin Poulain  <benjamin@webkit.org>
3418
3419         Do not allocate Static Strings for Notification::permissionString
3420         https://bugs.webkit.org/show_bug.cgi?id=115316
3421
3422         Reviewed by Geoffrey Garen.
3423
3424         The code is not nearly hot enough to justify keeping this memory around.
3425
3426         * Modules/notifications/Notification.cpp:
3427         (WebCore::Notification::permission):
3428         (WebCore::Notification::permissionString):
3429         * Modules/notifications/Notification.h:
3430         (Notification):
3431
3432 2013-04-29  Anders Carlsson  <andersca@apple.com>
3433
3434         Remove StorageTracker::originsLoaded
3435         https://bugs.webkit.org/show_bug.cgi?id=115382
3436
3437         Reviewed by Sam Weinig.
3438
3439         Remove m_finishedImportingOriginIdentifiers.
3440
3441         * storage/StorageTracker.cpp:
3442         (WebCore::StorageTracker::StorageTracker):
3443         (WebCore::StorageTracker::finishedImportingOriginIdentifiers):
3444         * storage/StorageTracker.h:
3445         (StorageTracker):
3446
3447 2013-04-29  Anders Carlsson  <andersca@apple.com>
3448
3449         Get rid of StorageTracker::setClient
3450         https://bugs.webkit.org/show_bug.cgi?id=115376
3451
3452         Reviewed by Sam Weinig.
3453
3454         * WebCore.exp.in:
3455         * storage/StorageTracker.cpp:
3456         * storage/StorageTracker.h:
3457         (StorageTracker):
3458
3459 2013-04-22  Jeffrey Pfau  <jpfau@apple.com>
3460
3461         Change approach to third-party blocking for LocalStorage
3462         https://bugs.webkit.org/show_bug.cgi?id=115004
3463
3464         Reviewed by Maciej Stachowiak.
3465
3466         Instead of outright blocking LocalStorage that's used in a third-party
3467         context, silently partition it based on the origin of the top context.
3468         These partitions are then discarded when the page group is unloaded.
3469
3470         No new tests; modified existing tests to account for changes.
3471
3472         * page/DOMWindow.cpp:
3473         (WebCore::DOMWindow::localStorage):
3474         * page/PageGroup.cpp:
3475         (WebCore::PageGroup::localStorage):
3476         (WebCore):
3477         (WebCore::PageGroup::transientLocalStorage):
3478         * page/PageGroup.h:
3479         (PageGroup):
3480         * page/SecurityOrigin.cpp:
3481         (WebCore::SecurityOrigin::canAccessStorage):
3482
3483 2013-04-29  Yi Shen  <max.hong.shen@gmail.com>
3484
3485         HTML Editing: Insertion point jumps when using link detection
3486         https://bugs.webkit.org/show_bug.cgi?id=82198
3487
3488         Reviewed by Ryosuke Niwa.
3489
3490         Add links should be done only when typing a word separator (e.g. space or dot) which 
3491         breaks the text into two parts - the link and the rest of the text. Reflected in 
3492         code, we should only add link when the caret position is at the right end location of 
3493         TextChecking result. Otherwise, the text on the right of a word separator could be