Web Inspector: Network: display JavaScript stack in case of script initiator.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-12-18  Eugene Klyuchnikov  <eustas@chromium.org>
2
3         Web Inspector: Network: display JavaScript stack in case of script initiator.
4         https://bugs.webkit.org/show_bug.cgi?id=104899
5
6         Reviewed by Vsevolod Vlasov.
7
8         Show popup with navigavle stack-trace.
9
10         * inspector/front-end/NetworkPanel.js:
11         (WebInspector.NetworkLogView.prototype._getPopoverAnchor):
12         Added new target.
13         (WebInspector.NetworkLogView.prototype._showPopover):
14         Added case for new target.
15         (WebInspector.NetworkLogView.prototype._generateScriptInitiatedPopoverContent):
16         Generates table with stack trace items.
17         (WebInspector.NetworkDataGridNode.prototype._refreshInitiatorCell):
18         Added target marker, removed annoying titles.
19
20 2012-12-18  Tamas Czene  <tczene@inf.u-szeged.hu>
21
22         Style fix to OpenCL SVG Filters
23         https://bugs.webkit.org/show_bug.cgi?id=105265
24
25         Reviewed by Zoltan Herczeg.
26
27         Inserted missing spaces and correct copyright text. There were no vital changes.
28
29         * platform/graphics/gpu/opencl/FilterContextOpenCL.cpp:
30         (WebCore):
31         * platform/graphics/gpu/opencl/FilterContextOpenCL.h:
32         (FilterContextOpenCL):
33         * platform/graphics/gpu/opencl/OpenCLFEColorMatrix.cpp:
34         (WebCore::FilterContextOpenCL::applyFEColorMatrix):
35         * platform/graphics/gpu/opencl/OpenCLFETurbulence.cpp:
36         (WebCore):
37         (WebCore::FilterContextOpenCL::compileFETurbulence):
38         (WebCore::FilterContextOpenCL::applyFETurbulence):
39         (WebCore::FETurbulence::platformApplyOpenCL):
40         * platform/graphics/gpu/opencl/OpenCLHandle.h:
41
42 2012-12-17  Andrey Adaikin  <aandrey@chromium.org>
43
44         Web Inspector: [WebGL] handle video elements used in WebGL
45         https://bugs.webkit.org/show_bug.cgi?id=105170
46
47         Reviewed by Yury Semikhatsky.
48
49         Copy current image of video elements into a canvas to use it later in the replay.
50
51         * inspector/InjectedScriptCanvasModuleSource.js:
52         (.):
53
54 2012-12-17  Luke Macpherson   <macpherson@chromium.org>
55
56         Add ASSERTions to ensure that CSSPropertys that are variables only ever refer to CSSValues that are variables.
57         https://bugs.webkit.org/show_bug.cgi?id=104876
58
59         Reviewed by Steve Block.
60
61         Add assertions to CSSProperty constructors to make that if it is initialized with CSSPropertyVariable that
62         the value type associated with it is also a variable. This is already asserted at read time, but ASSERTing
63         here will produce a more useful backtrace.
64
65         No new tests as functionality unchanged.
66
67         * css/CSSProperty.h:
68         (WebCore::CSSProperty::CSSProperty):
69
70 2012-12-17  Vsevolod Vlasov  <vsevik@chromium.org>
71
72         Web Inspector: Make inspector scripts sourceURL absolute.
73         https://bugs.webkit.org/show_bug.cgi?id=105166
74
75         Reviewed by Yury Semikhatsky.
76
77         * inspector/front-end/utilities.js:
78
79 2012-12-17  Huang Dongsung  <luxtella@company100.net>
80
81         REGRESSION(r137442): Crash because of an uninitialized member.
82         https://bugs.webkit.org/show_bug.cgi?id=105246
83
84         Reviewed by Noam Rosenthal.
85
86         TextureMapperGL defines m_context although TextureMapper defines m_context.
87         r137442 removes the initialization code in TextureMapperGL, which is
88         what causes this regression. This patch removes the duplicated member
89         in TextureMapperGL.
90
91         No new tests. Covered by existing tests.
92
93         * platform/graphics/texmap/TextureMapper.cpp:
94         (WebCore::TextureMapper::TextureMapper):
95         * platform/graphics/texmap/TextureMapper.h:
96         (WebCore::TextureMapper::setGraphicsContext):
97         (WebCore::TextureMapper::graphicsContext):
98         (TextureMapper):
99         * platform/graphics/texmap/TextureMapperGL.h:
100         (WebCore):
101
102 2012-12-17  Philip Rogers  <pdr@google.com>
103
104         Queue container size requests while images are loading.
105         https://bugs.webkit.org/show_bug.cgi?id=105097
106
107         Reviewed by Dean Jackson.
108
109         We use CachedImage::setContainerSizeForRenderer(...) to notify images of requesting
110         container sizes. Unfortunately, if the image is not yet loaded we ignore this container
111         size information! This patch stores requesting container sizes made while the image is
112         not yet loaded.
113
114         This patch fixes a bug where SVG images would display incorrectly on the first load but
115         correctly thereafter. Additionally, this bug caused the SVGImageCache to not be used in many
116         real world scenarios.
117
118         This patch is loosely based on a patch by blambov in WK98403.
119
120         Test: http/tests/misc/svg-image-delayed-size-negotiation.html
121
122         * loader/cache/CachedImage.cpp:
123         (WebCore::CachedImage::didRemoveClient):
124         (WebCore::CachedImage::allClientsRemoved):
125         (WebCore::CachedImage::setContainerSizeForRenderer):
126         (WebCore::CachedImage::clear):
127         (WebCore::CachedImage::createImage):
128         * loader/cache/CachedImage.h:
129
130             A new map has been added to track renderer -> size information before an image has
131             loaded. Note that this affects all images (not just images that require container size
132             information) but we cannot know the image type before the image has loaded.
133
134 2012-12-17  Shinya Kawanaka  <shinyak@chromium.org>
135
136         Web Inspector: need to visually distinguish UA shadow roots
137         https://bugs.webkit.org/show_bug.cgi?id=104877
138
139         Reviewed by Yury Semikhatsky.
140
141         Now we have an option to show ShadowRoot in the Inspector. Since the Inspector has displayed UserAgent ShadowRoot and
142         Author ShadowRoot as the same #shadow-root, a user could not distinguish them.
143
144         We would like to show UserAgent ShadowRoot as #webkit-shadow-root.
145
146         Test: inspector/shadow-root.html
147
148         * inspector/InspectorDOMAgent.cpp:
149         (WebCore::InspectorDOMAgent::buildObjectForNode): Make nodeName of UserAgent ShadowRoot #webkit-shadow-root.
150         Since the correct nodeName of ShadowRoot is #document-fragment, we have to specify the nodeName of Author ShadowRoot
151         as #shadow-root here.
152
153 2012-12-17  Huang Dongsung  <luxtella@company100.net>
154
155         Coordinated Graphics: Refactor TiledBackingStore code in CoordinatedGraphicsLayer.
156         https://bugs.webkit.org/show_bug.cgi?id=103959
157
158         Reviewed by Kenneth Rohde Christiansen.
159
160         TiledBackingStore::setCommitTileUpdatesOnIdleEventLoop() is used when class
161         methods cannot be called asynchronously by client. Updates of tiles are
162         committed as soon as all the events in event queue have been processed.
163         After this patch Frame sets m_commitTileUpdatesOnIdleEventLoop to true.
164
165         In addition, remove TiledBackingStoreClient::tiledBackingStoreUpdatesAllowed()
166         which was introduced for Coordinated Graphics.
167
168         Refactoring covered by existing tests.
169
170         * page/Frame.cpp:
171         (WebCore::Frame::setTiledBackingStoreEnabled):
172         * platform/graphics/TiledBackingStore.cpp:
173         (WebCore::TiledBackingStore::TiledBackingStore):
174         (WebCore::TiledBackingStore::setTrajectoryVector):
175           Separate setting a trajectory vector from coverWithTilesIfNeeded().
176         (WebCore::TiledBackingStore::coverWithTilesIfNeeded):
177         (WebCore::TiledBackingStore::updateTileBuffers):
178         (WebCore::TiledBackingStore::createTiles):
179         (WebCore::TiledBackingStore::isTileBufferUpdatesSuspended):
180         (WebCore::TiledBackingStore::startTileBufferUpdateTimer):
181         (WebCore::TiledBackingStore::tileBufferUpdateTimerFired):
182         (WebCore::TiledBackingStore::startBackingStoreUpdateTimer):
183         (WebCore::TiledBackingStore::backingStoreUpdateTimerFired):
184         * platform/graphics/TiledBackingStore.h:
185         (TiledBackingStore):
186         (WebCore::TiledBackingStore::setCommitTileUpdatesOnIdleEventLoop):
187         * platform/graphics/TiledBackingStoreClient.h:
188         (WebCore::TiledBackingStoreClient::tiledBackingStoreHasPendingTileCreation):
189             If TiledBackingStore does not create all tiles, TiledBackingStore
190             notifies a client of needing to create tiles more, when
191             m_commitTileUpdatesOnIdleEventLoop is false.
192
193 2012-12-17  Dean Jackson  <dino@apple.com>
194
195         Track menu should be sorted
196         https://bugs.webkit.org/show_bug.cgi?id=105229
197
198         Reviewed by Eric Carlson.
199
200         Make sure that the <li> elements in the track menu are correctly
201         sorted as they are built. This uses insertion sort, but it shouldn't
202         be horrible given that we don't expect a huge number of tracks.
203
204         Test: media/video-controls-captions-trackmenu-sorted.html
205
206         * html/shadow/MediaControlElements.cpp:
207         (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
208         (WebCore::insertTextTrackMenuItemIntoSortedContainer): New function that calls insertBefore with
209         the correct parameters to ensure the <ul> is correctly sorted.
210         (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu):
211         * html/shadow/MediaControlElements.h:
212         (MediaControlClosedCaptionsTrackListElement): Rename menuItems to m_menuItems for consistency.
213
214 2012-12-17  Matthew Dempsky  <mdempsky@google.com>
215
216         Regression causing DOM objects to have unstable NPObject* references with v8 bindings
217         https://bugs.webkit.org/show_bug.cgi?id=104921
218
219         Reviewed by Kentaro Hara.
220
221         Fix regression introduced by changeset 135804 resulting in
222         unstable NPObject* references for v8 objects.  In the iter !=
223         v8NPObjectMap->end() code path, objectVector was left unassigned
224         if the for loop terminated without returning.
225
226         Also, V8Object::GetIdentityHash() is documented as not being guaranteed
227         as unique.  As such, don't ASSERT() that two objects with the same hash
228         must therefor be the same object.
229
230         Tests: plugins/npruntime/embed-property-iframe-equality.html
231
232         * bindings/v8/NPV8Object.cpp:
233         (WebCore::npCreateV8ScriptObject): Fix.
234
235 2012-12-17  Chris Fleizach  <cfleizach@apple.com>
236
237         Seamless iframe should not announce a new browsing context
238         https://bugs.webkit.org/show_bug.cgi?id=86317
239
240         Reviewed by Eric Seidel.
241
242         Introduce a new role for seamless frames so that the platforms can decide what to do
243         with this kind of object. For the mac, it's exposed as a group.
244
245         Test: platform/mac/accessibility/seamless-iframe.html
246
247         * accessibility/AccessibilityNodeObject.cpp:
248         (WebCore):
249         * accessibility/AccessibilityNodeObject.h:
250         (AccessibilityNodeObject):
251         * accessibility/AccessibilityObject.h:
252         (WebCore::AccessibilityObject::isWebArea):
253         (WebCore::AccessibilityObject::isSeamlessWebArea):
254         * accessibility/AccessibilityRenderObject.cpp:
255         (WebCore::AccessibilityRenderObject::parentObjectIfExists):
256         (WebCore::AccessibilityRenderObject::parentObject):
257         (WebCore::AccessibilityRenderObject::boundingBoxRect):
258         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
259         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
260         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
261         (createAccessibilityRoleMap):
262
263 2012-12-17  KyungTae Kim  <ktf.kim@samsung.com>
264
265         Percentage width replaced element incorrectly rendered when intrinsic size changed
266         https://bugs.webkit.org/show_bug.cgi?id=102784
267
268         Reviewed by Tony Chang.
269
270         To make relayout when the image dimension is changed,
271         and if the logical width is percent type and the containing block fits to it.
272         In this case, the containing block's width need to be updated first,
273         because the 'newWidth' was calculated from the 'old containing block width'.
274
275         Test: fast/css/percent-width-img-src-change.html
276
277         * rendering/RenderImage.cpp:
278         (WebCore::RenderImage::imageDimensionsChanged):
279
280 2012-12-17  Beth Dakin  <bdakin@apple.com>
281
282         DidHitRelevantRepaintedObjectsAreaThreshold should not use the viewRect since 
283         that varies
284         https://bugs.webkit.org/show_bug.cgi?id=105116
285         -and corresponding-
286         <rdar://problem/12889449>
287
288         Reviewed by Geoff Garen.
289
290         DidHitRelevantRepaintedObjectsAreaThreshold should not use the viewRect since that 
291         varies depending on window size. This can lead to a huge amount of variability in 
292         the heuristic which is not desired. Instead, we should use a hard-coded rect.
293         * page/Page.cpp:
294         (WebCore::relevantViewRect):
295         (WebCore):
296         (WebCore::Page::addRelevantRepaintedObject):
297         (WebCore::Page::addRelevantUnpaintedObject):
298
299 2012-12-17  Simon Fraser  <simon.fraser@apple.com>
300
301         Fix repositioning of fixed elements on zooming
302         https://bugs.webkit.org/show_bug.cgi?id=105223
303
304         Reviewed by Beth Dakin.
305
306         When zoomed, scrolling would move the layers of fixed-position
307         elements oddly. This happened because on the scrolling thread we
308         passed a scale of 1, rather than the actual page scale to 
309         scrollOffsetForFixedPosition().
310         
311         Fix by plumbing the page scale through the scrolling state node
312         to the scrolling node.
313
314         Test: platform/mac/tiled-drawing/fixed/four-bars-zoomed.html
315
316         * page/scrolling/ScrollingStateScrollingNode.cpp:
317         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
318         (WebCore::ScrollingStateScrollingNode::setFrameScaleFactor):
319         (WebCore::ScrollingStateScrollingNode::dumpProperties):
320         * page/scrolling/ScrollingStateScrollingNode.h:
321         (WebCore::ScrollingStateScrollingNode::frameScaleFactor):
322         (ScrollingStateScrollingNode):
323         * page/scrolling/ScrollingTreeScrollingNode.cpp:
324         (WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode):
325         (WebCore::ScrollingTreeScrollingNode::update):
326         * page/scrolling/ScrollingTreeScrollingNode.h:
327         (WebCore::ScrollingTreeScrollingNode::frameScaleFactor):
328         (ScrollingTreeScrollingNode):
329         * page/scrolling/mac/ScrollingCoordinatorMac.h:
330         (ScrollParameters):
331         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
332         (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
333         (WebCore::ScrollingCoordinatorMac::setScrollParametersForNode):
334         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
335         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
336
337 2012-12-17  Dima Gorbik  <dgorbik@apple.com>
338
339         Implement matching cue by the class name with ::cue pseudo element
340         https://bugs.webkit.org/show_bug.cgi?id=104191
341
342         Reviewed by Antti Koivisto.
343
344         Implemented the ::cue() pseudo-element with an argument that may hold a simple selector list.
345         This enables matching cue objects by the class name.
346
347         Test: media/track/track-css-matching.html
348
349         * css/CSSGrammar.y.in: support parsing the ::cue() with an argument.
350         * css/CSSParser.cpp:
351         (WebCore::CSSParser::detectFunctionTypeToken): tokenize the 'cue'.
352         (WebCore::CSSParser::updateSpecifiersWithElementName): do not set the tag for the cue pseudo-element because
353         the ::cue may match elements with different tags.
354         (WebCore::CSSParser::updateSpecifiers): the behavior for the PseudoCue selector should be same as for
355         unknown pseudo elements - the pseudo-element should stay on top of the selector chain.
356         * css/CSSSelector.cpp: added the type detection for the new selector.
357         (WebCore::CSSSelector::pseudoId):
358         (WebCore::nameToPseudoTypeMap):
359         (WebCore::CSSSelector::extractPseudoType):
360         * css/CSSSelector.h:
361         * css/RuleSet.cpp: add a new list to hold all the rulesets for the new pseudo element.
362         (WebCore::RuleSet::reportMemoryUsage):
363         (WebCore::RuleSet::addRule):
364         (WebCore::RuleSet::shrinkToFit):
365         * css/RuleSet.h:
366         (RuleSet):
367         (WebCore::RuleSet::cuePseudoRules):
368         * css/SelectorChecker.cpp:
369         (WebCore::SelectorChecker::checkOneSelector):
370         * css/SelectorChecker.h:
371         (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
372         * css/StyleResolver.cpp:
373         (WebCore::StyleResolver::collectMatchingRules):
374         * dom/Element.cpp: an addition to the rare data to be able to find out if the node is a webvtt node.
375         (WebCore):
376         (WebCore::Element::isWebVTTNode):
377         (WebCore::Element::setIsWebVTTNode):
378         (WebCore::Element::cloneDataFromElement):
379         * dom/Element.h:
380         (Element):
381         * dom/ElementRareData.h:
382         (ElementRareData):
383         * dom/NodeRareData.h:
384         (WebCore::NodeRareData::NodeRareData):
385         (NodeRareData):
386         (WebCore::NodeRareData::isWebVTTNode):
387         (WebCore::NodeRareData::setIsWebVTTNode):
388         * html/track/TextTrackCue.cpp:
389         (WebCore::TextTrackCue::markNodesAsWebVTTNodes): mark the cloned nodes as WebVTT nodes.
390         (WebCore):
391         (WebCore::TextTrackCue::getCueAsHTML):
392         * html/track/TextTrackCue.h:
393         (TextTrackCue):
394         * html/track/WebVTTParser.cpp:
395         (WebCore::WebVTTParser::constructTreeFromToken):
396         * rendering/style/RenderStyleConstants.h:
397
398 2012-12-17  Michael Pruett  <michael@68k.org>
399
400         IndexedDB: Don't use strings to represent serialized values
401         https://bugs.webkit.org/show_bug.cgi?id=104354
402
403         Reviewed by Kentaro Hara.
404
405         Use Vector<uint8_t> rather than String to represent serialized values
406         in IndexedDB. This change is necessary to implement IndexedDB for JSC.
407
408         Tests: storage/indexeddb/*
409
410         * Modules/indexeddb/IDBBackingStore.cpp:
411         (WebCore::IDBBackingStore::getRecord):
412         (WebCore::IDBBackingStore::putRecord):
413         (WebCore::ObjectStoreKeyCursorImpl::value):
414         (WebCore::ObjectStoreKeyCursorImpl::ObjectStoreKeyCursorImpl):
415         (WebCore::ObjectStoreCursorImpl::value):
416         (ObjectStoreCursorImpl):
417         (WebCore::ObjectStoreCursorImpl::loadCurrentRow):
418         (WebCore::IndexKeyCursorImpl::value):
419         (WebCore::IndexCursorImpl::value):
420         (WebCore::IndexCursorImpl::IndexCursorImpl):
421         (IndexCursorImpl):
422         (WebCore::IndexCursorImpl::loadCurrentRow):
423         * Modules/indexeddb/IDBBackingStore.h:
424         (IDBBackingStore):
425         (Cursor):
426         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
427         (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::perform):
428         * Modules/indexeddb/IDBCursorBackendImpl.h:
429         (WebCore::IDBCursorBackendImpl::value):
430         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
431         (WebCore::IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation::perform):
432         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
433         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation::perform):
434         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::perform):
435         * bindings/js/SerializedScriptValue.cpp:
436         (WebCore::SerializedScriptValue::SerializedScriptValue):
437         (WebCore):
438         * bindings/js/SerializedScriptValue.h:
439         * bindings/v8/SerializedScriptValue.cpp:
440         (WebCore::SerializedScriptValue::createFromWireBytes):
441         (WebCore):
442         (WebCore::SerializedScriptValue::toWireBytes):
443         * bindings/v8/SerializedScriptValue.h:
444         (SerializedScriptValue):
445
446 2012-12-17  Jaehun Lim  <ljaehun.lim@samsung.com>
447
448         Change SET_VAR, SET_BORDERVALUE_COLOR macro to require semicolon(;) at the end of the line
449         https://bugs.webkit.org/show_bug.cgi?id=104774
450
451         Reviewed by Eric Seidel.
452
453         Remove the last ; in SET_VAR, SET_BORDERVALUE_COLOR macro definition.
454         Add the omitted ; in RenderStyle.h | .cpp
455
456         No new tests, just style change.
457
458         * rendering/style/RenderStyle.cpp:
459         (WebCore::RenderStyle::setColor):
460         (WebCore::RenderStyle::setVisitedLinkColor):
461         (WebCore::RenderStyle::setHorizontalBorderSpacing):
462         (WebCore::RenderStyle::setVerticalBorderSpacing):
463         * rendering/style/RenderStyle.h:
464
465 2012-12-17  Yong Li  <yoli@rim.com>
466
467         [BlackBerry] Deadlock caused by PluginViewPrivate::destroyBuffers()
468         https://bugs.webkit.org/show_bug.cgi?id=105215
469
470         Reviewed by Rob Buis.
471         Also internally reviewed by George Staikos.
472
473         PR# 266443
474         It should release mutexes before sending sync message.
475
476         * plugins/blackberry/PluginViewPrivateBlackBerry.cpp:
477         (WebCore::PluginViewPrivate::destroyBuffers):
478
479 2012-12-17  Sheriff Bot  <webkit.review.bot@gmail.com>
480
481         Unreviewed, rolling out r137198.
482         http://trac.webkit.org/changeset/137198
483         https://bugs.webkit.org/show_bug.cgi?id=105212
484
485         This patch is causing API behavior compatibility problems
486         (Requested by zdobersek on #webkit).
487
488         * platform/network/soup/ResourceRequestSoup.cpp:
489         (WebCore::ResourceRequest::updateFromSoupMessage):
490
491 2012-12-17  Dominic Mazzoni  <dmazzoni@google.com>
492
493         AX: textUnderElement should consider alt text, but skip links and controls
494         https://bugs.webkit.org/show_bug.cgi?id=101650
495
496         Reviewed by Chris Fleizach.
497
498         Getting inner text from an element now ignores focusable descendants
499         and containers, but uses alternative text.  The computation of
500         textUnderElement is now recursive and doesn't depend on text
501         iterators, which might not do the right thing for accessibility
502         anyways.
503
504         For GTK, the old behavior is retained so that support for
505         the object replacement character is still there. Filed a new
506         bug (105214) for GTK folks to look at this.
507
508         Test: accessibility/button-title-uses-inner-img-alt.html
509         Test: accessibility/focusable-div.html
510
511         * accessibility/AccessibilityNodeObject.cpp:
512         (WebCore):
513         (WebCore::shouldUseAccessiblityObjectInnerText):
514         (WebCore::AccessibilityNodeObject::textUnderElement):
515         * accessibility/AccessibilityRenderObject.cpp:
516         (WebCore::AccessibilityRenderObject::textUnderElement):
517
518 2012-12-17  Otto Derek Cheung  <otcheung@rim.com>
519
520         [BlackBerry] Prevent CookieManager from blocking the WKT thread
521         https://bugs.webkit.org/show_bug.cgi?id=105111
522
523         Prevent CookieManager from blocking the WKT Thread.
524
525         PR 265603
526
527         Reviewed by Rob Buis.
528
529         Adding some guards to CookieManager so it will return immedately
530         if getCookie functions are called when the database isn't loaded yet.
531
532         setCookie functions will be redispatched until the database is ready.
533
534         * platform/blackberry/CookieManager.cpp:
535         (WebCore::CookieManager::CookieManager):
536         (WebCore::CookieManager::setCookies):
537         (WebCore::CookieManager::getCookie):
538         (WebCore::CookieManager::generateHtmlFragmentForCookies):
539         (WebCore::CookieManager::getRawCookies):
540         (WebCore::CookieManager::removeAllCookies):
541         (WebCore::CookieManager::getBackingStoreCookies):
542         (WebCore::CookieManager::setPrivateMode):
543         (WebCore::CookieManager::removeCookieWithName):
544         * platform/blackberry/CookieManager.h:
545
546 2012-12-17  Levi Weintraub  <leviw@chromium.org>
547
548         Add support for tracking hit test rectangles to enable fast event rejection in the compositor
549         https://bugs.webkit.org/show_bug.cgi?id=103914
550
551         Reviewed by James Robinson.
552
553         Adding support for tracking hit test target regions for the purpose of performing initial hit testing
554         in the compositor to avoid blocking scrolling on the main thread while waiting to hit test events that
555         aren't occuring in regions with handlers. This is initially being done to avoid having to go to the main
556         thread when scrolling by flicking on touch devices when the flick occurs outside a tracked touch event
557         region. This patch includes the implementation to turn this on in Chromium.
558
559         To accomplish this goal, Document will now keep a counted hash set of nodes with touch event handlers
560         instead of only an unsigned integer of the total count. ScrollingCoordinator then updates the compositor
561         when new touch event handlers are registered or removed, or after layout much like how
562         nonFastScrollableRegions are currently tracked.
563
564         This implementation will not properly update the hit test rects when the renderers are inside a sub-
565         tree that scrolls.
566
567         This change was initially rolled out due to stale Node pointers in Document's touchEventTargets. This
568         patch adds a callback to remove the Node from that structure to Node's destructor. This is covered
569         by the touch-target-removed-crash.html test case which is also added.
570
571         Test: platform/chromium/fast/events/touch/compositor-touch-hit-rects.html
572               platform/chromium/fast/events/touch/touch-target-removed-crash.html
573
574         * dom/Document.cpp:
575         (WebCore::Document::Document): Added a HashCountedSet of touch target nodes. Note: DOMWindow targets
576         are stored as the Document they point to.
577         (WebCore::Document::didAddTouchEventHandler): Changed to keep track of the handler instead of a count, and
578         to update the ScrollingCoordinator with the change.
579         (WebCore::Document::didRemoveTouchEventHandler): Ditto.
580         * dom/Document.h:
581         (WebCore::Document::hasTouchEventHandlers): It's no longer O(1) to get the count of touch handlers, so
582         expose whether there are any or not.
583         (WebCore::Document::touchEventTargets):
584         * dom/Node.cpp:
585         (WebCore::Node::didMoveToNewDocument):
586         (WebCore::tryAddEventListener):
587         (WebCore::tryRemoveEventListener):
588         * history/CachedFrame.cpp:
589         (WebCore::CachedFrameBase::restore):
590         * html/HTMLInputElement.cpp:
591         (WebCore::HTMLInputElement::~HTMLInputElement):
592         (WebCore::HTMLInputElement::updateType):
593         * page/DOMWindow.cpp:
594         (WebCore::DOMWindow::addEventListener): Add the Document to the touch target set instead of DOMWindow.
595         (WebCore::DOMWindow::removeEventListener):
596         * page/EventHandler.cpp:
597         (WebCore::EventHandler::handleTouchEvent):
598         * page/Frame.cpp:
599         (WebCore::Frame::setDocument):
600         * page/scrolling/ScrollingCoordinator.cpp:
601         (WebCore::ScrollingCoordinator::computeAbsoluteTouchEventTargetRects): Walk the renderers for event handler
602         nodes and generate the absolute hit testing rects.
603         * page/scrolling/ScrollingCoordinator.h:
604         (WebCore::ScrollingCoordinator::setTouchEventTargetRectsChanged): Hook to pass along the hit test rects to
605         the scrolling tree/compositor.
606         (ScrollingCoordinator):
607         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
608         (WebCore::ScrollingCoordinatorChromium::frameViewLayoutUpdated):
609         (WebCore::ScrollingCoordinatorChromium::setTouchEventTargetRectsChanged):
610         (WebCore::ScrollingCoordinatorChromium::setNonFastScrollableRegion):
611         (WebCore::ScrollingCoordinatorChromium::setTouchEventTargetRects):
612         * page/scrolling/chromium/ScrollingCoordinatorChromium.h:
613         (ScrollingCoordinatorChromium):
614         * testing/Internals.cpp:
615         (WebCore::Internals::touchEventHandlerCount): Changed to do the work to calculate the actual count since
616         it's no longer stored as an int in Document.
617         (WebCore::Internals::touchEventTargetClientRects):
618         * testing/Internals.h:
619         (Internals):
620         * testing/Internals.idl:
621
622 2012-12-17  Avi Drissman  <avi@chromium.org>
623
624         Dragging a .jpg to Finder saves it as .jpeg
625         https://bugs.webkit.org/show_bug.cgi?id=105140
626         https://code.google.com/p/chromium/issues/detail?id=35811
627
628         Reviewed by Tony Chang.
629
630         If the filename's extension is already valid for the MIME type, we don't
631         need to rewrite it to the preferred extension.
632
633         No layout tests because it involves dragging items to the desktop.
634
635         * platform/chromium/ClipboardChromium.cpp:
636         (WebCore::writeImageToDataObject):
637
638 2012-12-17  Bem Jones-Bey  <bjonesbe@adobe.com>
639
640         [CSS Exclusions] shape-outside on floats for rectangle shapes height/width
641         https://bugs.webkit.org/show_bug.cgi?id=100398
642
643         Reviewed by Julien Chaffraix.
644
645         Implement shape outside for floats changing only the height and width
646         as a simple starting point.
647
648         This implementation changes floats to use the bounding box of the
649         shape outside instead of the margin box for layout. The content box of
650         the float is unchanged. This patch does not support positioning the
651         shape outside box, so the x and y parameters are currently ignored in
652         the specified shape. This will be fixed in a patch for bug 100399.
653
654         Tests: fast/exclusions/shape-outside-floats/shape-outside-floats-margin-is-ignored.html
655                fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle-horizontal-multiple.html
656                fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle-percentage.html
657                fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle.html
658
659         * CMakeLists.txt: Add ExclusionShapeOutsideInfo.{cpp,h}.
660         * GNUmakefile.list.am: Add ExclusionShapeOutsideInfo.{cpp,h}.
661         * Target.pri: Add ExclusionShapeOutsideInfo.{cpp,h}.
662         * WebCore.gypi: Add ExclusionShapeOutsideInfo.{cpp,h}.
663         * WebCore.vcproj/WebCore.vcproj: Add ExclusionShapeOutsideInfo.{cpp,h}.
664         * WebCore.xcodeproj/project.pbxproj: Add ExclusionShapeOutsideInfo.{cpp,h}.
665         * rendering/ExclusionShapeOutsideInfo.cpp: Added. Associates the
666             ExclusionShape object for shape outside with a RenderBox. Analagous to
667             ExclusionShapeInsideInfo.
668         (WebCore::exclusionShapeOutsideInfoMap):
669         (WebCore::ExclusionShapeOutsideInfo::ExclusionShapeOutsideInfo):
670         (WebCore::ExclusionShapeOutsideInfo::~ExclusionShapeOutsideInfo):
671         (WebCore::ExclusionShapeOutsideInfo::ensureInfoForRenderBox):
672         (WebCore::ExclusionShapeOutsideInfo::infoForRenderBox):
673         (WebCore::ExclusionShapeOutsideInfo::isInfoEnabledForRenderBox):
674         (WebCore::ExclusionShapeOutsideInfo::removeInfoForRenderBox):
675         (WebCore::ExclusionShapeOutsideInfo::computedShape):
676         * rendering/ExclusionShapeOutsideInfo.h: Added. Associates the
677             ExclusionShape object for shape outside with a RenderBox. Analagous to
678             ExclusionShapeInsideInfo.
679         (ExclusionShapeOutsideInfo):
680         (WebCore::ExclusionShapeOutsideInfo::create):
681         (WebCore::ExclusionShapeOutsideInfo::shapeLogicalLeft):
682         (WebCore::ExclusionShapeOutsideInfo::shapeLogicalRight):
683         (WebCore::ExclusionShapeOutsideInfo::shapeLogicalTop):
684         (WebCore::ExclusionShapeOutsideInfo::shapeLogicalBottom):
685         (WebCore::ExclusionShapeOutsideInfo::shapeLogicalWidth):
686         (WebCore::ExclusionShapeOutsideInfo::shapeLogicalHeight):
687         (WebCore::ExclusionShapeOutsideInfo::setShapeSize):
688         (WebCore::ExclusionShapeOutsideInfo::dirtyShapeSize):
689         * rendering/RenderBlock.cpp:
690         (WebCore::RenderBlock::insertFloatingObject): Use the shape outside's bounding box to set the width that is
691             used for inline layout for the float and it's siblings.
692         (WebCore::RenderBlock::positionNewFloats): Use the shape outside's bounding box to set the height that
693             is used for inline layout for the float and it's siblings. Ignore margins when positioning if the float
694             has shape outside, per the exclusions spec. 
695         * rendering/RenderBox.cpp:
696         (WebCore::RenderBox::willBeDestroyed): Clean up associated ExclusionShape.
697         (WebCore::RenderBox::styleDidChange): Handle style change for shape outside.
698         (WebCore::RenderBox::updateExclusionShapeOutsideInfoAfterStyleChange): Handle style change for shape outside.
699         * rendering/RenderBox.h:
700         (WebCore::RenderBox::exclusionShapeOutsideInfo): Get the ExclusionShapeOutsideInfo associated with this
701             RenderBox.
702
703 2012-12-17  John J. Barton  <johnjbarton@chromium.org>
704
705         Web Inspector: Search by selection
706         https://bugs.webkit.org/show_bug.cgi?id=104970
707
708         Reviewed by Vsevolod Vlasov.
709
710         Upon activation of the search control, conditionally set input.value to window.getSelection().
711         For both single file (SearchController) and multifile (AdvancedSearchController).
712
713         Test: inspector/editor/text-editor-selection-to-search.html
714
715         * inspector/front-end/AdvancedSearchController.js:
716         (WebInspector.AdvancedSearchController.prototype.show):
717         (WebInspector.SearchView.prototype.syncToSelection):
718         * inspector/front-end/SearchController.js:
719         (WebInspector.SearchController.prototype.showSearchField):
720
721 2012-12-17  Eduardo Lima Mitev  <elima@igalia.com>
722
723         [GStreamer] Use gst_element_link_pads_full() with CHECK_NOTHING for speed and sanity
724         https://bugs.webkit.org/show_bug.cgi?id=105181
725
726         Reviewed by Philippe Normand.
727
728         Replace some calls to gst_pad_link() on request pads, by
729         gst_element_link_pads_full() with CHECK_NOTHING flag, removing
730         unnecessary pad compatibility checks and simplifying code.
731
732         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
733         (webKitWebAudioSrcConstructed): Links audioconvert source with a
734         requested interleave sink using gst_element_link_pads_full().
735         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: Links a
736         requested source pad from videoTee with the queue sink.
737
738 2012-12-17  Emil A Eklund  <eae@chromium.org>
739
740         Clamp values in LayoutUnit::operator/ when SATURATED_LAYOUT_ARITHMETIC is enabled
741         https://bugs.webkit.org/show_bug.cgi?id=104955
742
743         Reviewed by Julien Chaffraix.
744
745         LayoutUnit::operator/ currently does not clamp values and
746         instead overflows when given a value greater than INT_MAX or
747         less than INT_MIN. 
748
749         Test: TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp
750
751         * platform/LayoutUnit.h:
752         (WebCore::operator/):
753         Clamp value if SATURATED_LAYOUT_ARITHMETIC is enabled.
754
755 2012-12-17  Simon Fraser  <simon.fraser@apple.com>
756
757         Don't allow edge TileCache tiles to be larger than necessary
758         https://bugs.webkit.org/show_bug.cgi?id=105195
759
760         Reviewed by Anders Carlsson.
761
762         The TileCache would allow edge tiles to be larger than the required size, with the assumption
763         that the extra space would never be visible. However, for content tiled layers, it can be,
764         and it doesn't get correctly cleared. So always keep the edge tiles at the specified size.
765
766         * platform/graphics/ca/mac/TileCache.mm:
767         (WebCore::TileCache::revalidateTiles):
768
769 2012-12-17  Bem Jones-Bey  <bjonesbe@adobe.com>
770
771         [CSS Exclusions] Floats should respect shape-inside on exclusions
772         https://bugs.webkit.org/show_bug.cgi?id=89261
773
774         Reviewed by David Hyatt.
775
776         Position floats properly with respect to an exclusion shape. Note that
777         this will not attempt to position floats in a polygon that has
778         multiple segments. In the multiple segment case, the floats will be
779         positioned as if the exclusion did not exist.
780
781         Updated an existing test case to test for this.
782         Test: fast/exclusions/shape-inside/shape-inside-floats-simple.html
783
784         * rendering/RenderBlock.cpp:
785         (WebCore::RenderBlock::computeLogicalLocationForFloat): Adjust the
786         right and left offsets to take into account the right and left offset
787         contributed by the exclusion shape.
788
789 2012-12-17  Antoine Quint  <graouts@apple.com>
790
791         GraphicsLayer's repaint count should update even when debugging option to show it is off
792         https://bugs.webkit.org/show_bug.cgi?id=105178
793
794         Reviewed by Simon Fraser.
795
796         Update the repain count even if the debug option to show them is turned off.
797         This allows the count to be accurate in between toggles of the debug option
798         and to allow the InspectorLayerTreeAgent to get accurate results any time
799         the layer tree is requested (see webkit.org/b/105024).
800
801         * platform/graphics/mac/WebLayer.mm:
802         (drawLayerContents):
803
804 2012-12-17  Hans Muller  <hmuller@adobe.com>
805
806         [CSS Exclusions] Add helper functions for converting floats to LayoutUnits
807         https://bugs.webkit.org/show_bug.cgi?id=103450
808
809         Reviewed by Dirk Schulze.
810
811         When a float logicalTop value is converted to a LayoutUnit it's necessary to
812         use LayoutUnit::fromFloatCeil() to ensure that we're snapping to a value that's
813         inside the ExclusionShape.  Similarly, to convert a logicalBottom value from
814         float to LayoutUnit we use LayoutUnit::fromFloatFloor().  Added a pair of private
815         ExlcusionShapeInsideInfo methods that do the conversions and refactored existing
816         code to use them.
817
818         This is just a cleanup.  No new tests are needed, the existing tests cover
819         these changes.
820
821         * rendering/ExclusionShapeInsideInfo.cpp:
822         (WebCore::ExclusionShapeInsideInfo::adjustLogicalLineTop): Use the new floatLogicalTopToLayoutUnit() method.
823         * rendering/ExclusionShapeInsideInfo.h:
824         (WebCore::ExclusionShapeInsideInfo::shapeLogicalTop): Use the new floatLogicalTopToLayoutUnit() method.
825         (WebCore::ExclusionShapeInsideInfo::shapeLogicalBottom): Use the new floatLogicalBottomToLayoutUnit() method.
826         (ExclusionShapeInsideInfo):
827         (WebCore::ExclusionShapeInsideInfo::floatLogicalTopToLayoutUnit): Convert a float to a LayoutUnit with LayoutUnit::fromFloatCeil().
828         (WebCore::ExclusionShapeInsideInfo::floatLogicalBottomToLayoutUnit): Convert a float to a LayoutUnit with LayoutUnit::fromFloatFloor().
829
830 2012-12-17  Antoine Quint  <graouts@apple.com>
831
832         Web Inspector: Provide the paint count of layers through the LayerTreeAgent
833         https://bugs.webkit.org/show_bug.cgi?id=105024
834
835         Reviewed by Pavel Feldman.
836
837         We add a new optional .paintCount property to the Layer object, passing through the
838         relevant information from GraphicsLayer.
839
840         * inspector/Inspector.json:
841         * inspector/InspectorLayerTreeAgent.cpp:
842         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
843
844 2012-12-17  Pavel Feldman  <pfeldman@chromium.org>
845
846         Web Inspector: [chromium] make toolbar render with Mountain Lion-friendly colors
847         https://bugs.webkit.org/show_bug.cgi?id=105177
848
849         Reviewed by Vsevolod Vlasov.
850
851         * inspector/front-end/UIUtils.js:
852         (WebInspector.platformFlavor):
853         * inspector/front-end/inspector.css:
854         (#toolbar):
855         (body.dock-to-bottom #toolbar):
856         (.toolbar-item):
857
858 2012-12-17  Andreas Kling  <akling@apple.com>
859
860         Attribute: Remove unused constructor and isNull().
861         <http://webkit.org/b/105179>
862
863         Reviewed by Antti Koivisto.
864
865         Removed the Attribute constructor that takes a localName rather than a full QualifiedName as that was never used.
866         Also removed Attribute::isNull(), since that was only called in one place where isNull() will never be true.
867
868         * dom/Attribute.h:
869         * html/HTMLIFrameElement.cpp:
870         (WebCore::HTMLIFrameElement::collectStyleForPresentationAttribute):
871
872 2012-12-17  Anthony Scian  <ascian@rim.com>
873
874         [Blackberry] Static code analysis warning fixes
875         https://bugs.webkit.org/show_bug.cgi?id=105129
876
877         Reviewed by Rob Buis.
878
879         - alloca can return NULL, recoded to just use a temp var
880
881         * plugins/blackberry/PluginViewBlackBerry.cpp:
882         (WebCore::PluginView::updateBuffer):
883
884 2012-12-17  Eugene Klyuchnikov  <eustas@chromium.org>
885
886         Web Inspector: Make popover content accessible for clicks.
887         https://bugs.webkit.org/show_bug.cgi?id=105167
888
889         Reviewed by Vsevolod Vlasov.
890
891         Currently it is very hard to move mouse pointer inside of popover area.
892         The only maneuver is to precisely jerk the mouse in direction of popover.
893
894         This path makes anchor and popover "active" areas overlap, so it becomes
895         possible to smoothly move mouse to popover interior.
896
897         * inspector/front-end/Popover.js:
898         (WebInspector.Popover.prototype._innerShow): Make popover "outer" border
899         an be "active" area.
900         * inspector/front-end/popover.css: Allow popover "outer" border receive
901         mouse events.
902
903 2012-12-17  Andrey Kosyakov  <caseq@chromium.org>
904
905         Web Inspector: Persist Audit selections across sessions
906         https://bugs.webkit.org/show_bug.cgi?id=103944
907
908         Reviewed by Alexander Pavlov.
909
910         Make selected audit categories a persistent setting, to simplify life for those
911         repeatedly running same set of categories.
912
913         * inspector/front-end/AuditLauncherView.js:
914         (WebInspector.AuditLauncherView):
915         (WebInspector.AuditLauncherView.prototype.addCategory.get var):
916         (WebInspector.AuditLauncherView.prototype.addCategory):
917         (WebInspector.AuditLauncherView.prototype._selectAllClicked):
918         (WebInspector.AuditLauncherView.prototype._categoryClicked):
919         (WebInspector.AuditLauncherView.prototype._createCategoryElement):
920
921 2012-12-17  Zeno Albisser  <zeno@webkit.org>
922
923         [Texmap] Drawing of ARB textures broken after r137498.
924         https://bugs.webkit.org/show_bug.cgi?id=105165
925
926         Disable antialiasing for ARB textures after unifying
927         code paths. We are currently missing a fragment shader
928         to do antialiasing with ARB textures.
929
930         Reviewed by Kenneth Rohde Christiansen.
931
932         * platform/graphics/texmap/TextureMapperGL.cpp:
933         (WebCore::TextureMapperGL::drawTexture):
934
935 2012-12-17  Eugene Klyuchnikov  <eustas@chromium.org>
936
937         Web Inspector: Popup flickers when cursor moves between elements with same anchor.
938         https://bugs.webkit.org/show_bug.cgi?id=104992
939
940         Reviewed by Pavel Feldman.
941
942         Popup disappears and then appears again when mouse pointer traverses
943         between sub-elements of anchor element.
944
945         * inspector/front-end/Popover.js: Split method "_mouseOut".
946         (WebInspector.PopoverHelper.prototype._popoverMouseOut):
947         Handler for Popover.
948         (WebInspector.PopoverHelper.prototype._mouseOut):
949         Handler for PopoverHelper.
950
951 2012-12-12  Andrey Kosyakov  <caseq@chromium.org>
952
953         [Chromium] Remove support for TRACE_EVENT_IF_LONGER_THANx macros
954         https://bugs.webkit.org/show_bug.cgi?id=104784
955
956         Reviewed by Pavel Feldman.
957
958         - removed TRACE_EVENT_IF_LONGER_THANx macros;
959         - changed addTraceEvent() to return void, as we no longer need the index of added event.
960
961         * platform/EventTracer.h:
962         (EventTracer):
963         * platform/chromium/EventTracerChromium.cpp:
964         (WebCore::EventTracer::addTraceEvent):
965         * platform/chromium/TraceEvent.h:
966         (TraceEvent):
967         (WebCore::TraceEvent::addTraceEvent):
968         (WebCore::TraceEvent::TraceEndOnScopeClose::addEventIfEnabled):
969         (Data):
970
971 2012-12-17  Kentaro Hara  <haraken@chromium.org>
972
973         Unreviewed, rolling out r136794.
974         http://trac.webkit.org/changeset/136794
975         https://bugs.webkit.org/show_bug.cgi?id=104203
976
977         The GC change can leak memory
978
979         * bindings/v8/V8GCController.cpp:
980         (WebCore):
981         (WebCore::addImplicitReferencesForNodeWithEventListeners):
982
983 2012-12-17  Gabor Rapcsanyi  <rgabor@webkit.org>
984
985         Reduce the code size of ARM SIMD in GraphicsContext3D
986         https://bugs.webkit.org/show_bug.cgi?id=105086
987
988         Reviewed by Zoltan Herczeg.
989
990         Reduce the code size of ARM SIMD in GraphicsContext3D and change the ARM
991         namespace to SIMD.
992
993         * platform/graphics/GraphicsContext3D.cpp:
994         (WebCore):
995         * platform/graphics/cpu/arm/GraphicsContext3DNEON.h:
996         (WebCore::SIMD::unpackOneRowOfRGBA4444ToRGBA8):
997         (WebCore::SIMD::packOneRowOfRGBA8ToUnsignedShort4444):
998         (WebCore::SIMD::unpackOneRowOfRGBA5551ToRGBA8):
999         (WebCore::SIMD::packOneRowOfRGBA8ToUnsignedShort5551):
1000         (WebCore::SIMD::unpackOneRowOfRGB565ToRGBA8):
1001         (WebCore::SIMD::packOneRowOfRGBA8ToUnsignedShort565):
1002
1003 2012-12-16  Andrey Kosyakov  <caseq@chromium.org>
1004
1005         Web Inspector: frame bars on timeline do not react on hover and double click
1006         https://bugs.webkit.org/show_bug.cgi?id=105153
1007
1008         Reviewed by Alexander Pavlov.
1009
1010         Remove z-index: -100 from #timeline-grid-header, as it prevents mouse events from
1011         reaching frame strip. Use pointer-events: none on frame dividers instead.
1012
1013         * inspector/front-end/timelinePanel.css:
1014         (.timeline .resources-event-divider.timeline-frame-divider):
1015         (#timeline-grid-header):
1016
1017 2012-12-16  Kentaro Hara  <haraken@chromium.org>
1018
1019         [V8] Improve performance of a conversion from WebKit strings to V8 strings
1020         https://bugs.webkit.org/show_bug.cgi?id=105150
1021
1022         Reviewed by Eric Seidel.
1023
1024         V8 provides v8::Weak(isolate) and v8::Local::New(isolate, ...),
1025         which are much faster than v8::Weak() and v8::Local::New().
1026         By using the faster APIs, we can improve performance of a conversion
1027         from a WebKit string to a V8 string. This improves performance of
1028         div.id, div.className, ...and a lot of DOM attributes that return
1029         strings.
1030
1031         [Dromaeo/dom-attr]
1032         120 runs/sec, 120 runs/sec, 118 runs/sec => 125 runs/sec, 123 run/sec, 125 runs/sec (+4.1%)
1033
1034         [Dromaeo/dom-traverse]
1035         94 runs/sec, 94 runs/sec, 96 runs/sec => 107 runs/sec, 105 runs/sec, 107 runs/sec (+12.3%)
1036
1037         [Bindings/id-getter]
1038         356 runs/sec, 356 runs/sec, 341 runs/sec => 423 runs/sec, 424 runs/sec, 424 runs/sec (+20.7%)
1039
1040         No tests. No change in behavior.
1041
1042         * bindings/v8/V8ValueCache.h:
1043         (WebCore::StringCache::v8ExternalString):
1044
1045 2012-12-16  Arvid Nilsson  <anilsson@rim.com>
1046
1047         [BlackBerry] Adapt to new BlackBerry::Platform::TouchPoint API
1048         https://bugs.webkit.org/show_bug.cgi?id=105143
1049         RIM PR 171941
1050
1051         Reviewed by Rob Buis.
1052         Internally reviewed by George Staikos.
1053
1054         TouchPoint instances now provide document coordinates for the viewport
1055         and content position of the touch event. The pixel coordinates stored
1056         in the TouchPoint should no longer be needed in WebKit.
1057
1058         Also adapt to new method names and encapsulation of TouchPoint data
1059         members.
1060
1061         No change in behavior, no new tests.
1062
1063         * platform/blackberry/PlatformTouchPointBlackBerry.cpp:
1064         (WebCore::PlatformTouchPoint::PlatformTouchPoint):
1065
1066 2012-12-16  Eugene Klyuchnikov  <eustas@chromium.org>
1067
1068         Web Inspector: Fix JS compiler warning.
1069         https://bugs.webkit.org/show_bug.cgi?id=105032
1070
1071         Reviewed by Pavel Feldman.
1072
1073         Problem: event handler parameter has actial parameter
1074         type KeyboardEvent, but ".addEventListener" refuses listeners with such
1075         signature.
1076
1077         Solution: explicitly upcast argument type.
1078
1079         * inspector/front-end/ElementsTreeOutline.js: Update JsDocs.
1080
1081 2012-12-16  Tim Horton  <timothy_horton@apple.com>
1082
1083         PDFPlugin: The "Open in Preview" HUD button should work
1084         https://bugs.webkit.org/show_bug.cgi?id=102448
1085         <rdar://problem/12695729>
1086
1087         Reviewed by Alexey Proskuryakov.
1088
1089         Expose createCanonicalUUIDString and UUID.h.
1090
1091         * WebCore.exp.in:
1092         * WebCore.xcodeproj/project.pbxproj:
1093
1094 2012-12-16  Seokju Kwon  <seokju.kwon@gmail.com>
1095
1096         Fix unused parameter compile warnings
1097         https://bugs.webkit.org/show_bug.cgi?id=105089
1098
1099         Reviewed by Kentaro Hara.
1100
1101         Use UNUSED_PARAM macro to fix build warning -Wunused-parameter.
1102
1103         No new tests, no behavior change.
1104
1105         * bindings/js/JSDOMWindowBase.cpp:
1106         (WebCore::JSDOMWindowBase::supportsProfiling):
1107         (WebCore::JSDOMWindowBase::supportsRichSourceInfo):
1108
1109 2012-12-16  Alexey Proskuryakov  <ap@apple.com>
1110
1111         <rdar://problem/12886898> Bundle uploads don't work
1112         https://bugs.webkit.org/show_bug.cgi?id=105149
1113
1114         Reviewed by Sam Weinig.
1115
1116         * WebCore.exp.in: Exported FormData::removeGeneratedFilesIfNeeded().
1117
1118         * platform/network/FormData.cpp:
1119         (WebCore::encodeElement):
1120         (WebCore::decodeElement):
1121         Encode generated file name for archive, too. I'm not entirely sure how this affects other uses
1122         of FormData serialization, but it seems logical that if we encode m_hasGeneratedFiles, we
1123         should also encode their names.
1124
1125 2012-12-16  Hayato Ito  <hayato@chromium.org>
1126
1127         [Shadow DOM] Kill ShadowRoot constructor
1128         https://bugs.webkit.org/show_bug.cgi?id=102913
1129
1130         Reviewed by Dimitri Glazkov.
1131
1132         Re-landing r137408 which breaks browser tests on chromium. I've
1133         updated the browser tests on chromium so that they do not use
1134         WebKitShadowRoot constructor.
1135
1136         No new tests. Updating existing layout tests.
1137
1138         * dom/ShadowRoot.idl:
1139         * page/DOMWindow.idl:
1140
1141 2012-12-16  Jon Lee  <jonlee@apple.com>
1142
1143         Allow built-in PDF plugin and plugin documents to auto-start
1144         https://bugs.webkit.org/show_bug.cgi?id=105000
1145         <rdar://problem/12633351>
1146
1147         Reviewed by Sam Weinig.
1148
1149         Plug-ins in plug-in documents that are in the main frame should always auto-start.
1150
1151         Add a virtual function that returns whether the PluginViewBase should auto-start its plug-in.
1152         Add a callback that gives the HTML plug-in element an opportunity to set the display state
1153         based on the widget.
1154
1155         * plugins/PluginViewBase.h:
1156         (WebCore::PluginViewBase::shouldAlwaysAutoStart): Added. By default returns false.
1157
1158         * html/HTMLPlugInImageElement.cpp:
1159         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Renamed from
1160         subframeLoaderWillLoadPlugIn() for consistency. This call will also be made a little later
1161         in the subframe loader. Adds a check to see if the plug-in is inside a plug-in document
1162         of the main frame. If so, auto-start.
1163         (WebCore::HTMLPlugInImageElement::subframeLoaderDidCreatePlugIn): Given the widget created,
1164         check to see if it should always auto-start. If so, set the display state to Playing. Otherwise
1165         leave the display state alone.
1166         * html/HTMLPlugInImageElement.h:
1167
1168         * loader/SubframeLoader.cpp:
1169         (WebCore::SubframeLoader::requestPlugin): Move the will-load-plug-in call into loadPlugin().
1170         (WebCore::SubframeLoader::loadPlugin): Immediately prior to the plug-in's creation, make the
1171         will-create call. If a plug-in was made, make the did-create call. The did-create call should
1172         be made before setWidget() since that might initialize the plug-in, which could take the display
1173         state into account if being initialized synchronously.
1174
1175 2012-12-16  Huang Dongsung  <luxtella@company100.net>
1176
1177         [TexMap] Perform the layer-tree traversal in GraphicsLayerTextureMapper.
1178         https://bugs.webkit.org/show_bug.cgi?id=103366
1179
1180         Reviewed by Noam Rosenthal.
1181
1182         Currently, Texture Mapper performs the layer-tree traversal in
1183         TextureMapperLayer, while Coordinated Graphics performs the traversal in
1184         CoordinatedGraphicsLayer. This patch makes Texture Mapper perform the
1185         traversal in GraphicsLayerTextureMapper.
1186
1187         Also removed the SyncOptions enum, which is redundant since no client
1188         calls it with ComputationsOnly.
1189
1190         This is in preparation for refactoring TextureMapper to work in an actor
1191         model (http://webkit.org/b/103854).
1192
1193         No new tests. Covered by existing tests.
1194
1195         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1196         (WebCore::GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly):
1197         (WebCore::GraphicsLayerTextureMapper::flushCompositingState):
1198         (WebCore::GraphicsLayerTextureMapper::didFlushCompositingState):
1199         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
1200         (GraphicsLayerTextureMapper):
1201         * platform/graphics/texmap/TextureMapperLayer.cpp:
1202         (WebCore::TextureMapperLayer::flushCompositingStateForThisLayerOnly):
1203         * platform/graphics/texmap/TextureMapperLayer.h:
1204         (TextureMapperLayer):
1205
1206 2012-12-16  Levi Weintraub  <leviw@chromium.org>
1207
1208         Push pixel snapping logic into TransformState
1209         https://bugs.webkit.org/show_bug.cgi?id=101779
1210
1211         Reviewed by Simon Fraser.
1212
1213         The old SnapOffsetForTransforms behavior fell apart when there was content nested in
1214         multiple levels of containers with sub-pixel offsets. The point of this flag was to
1215         mirror the pixel snapping that occurs in paint, where offsets are accumulated bottom-
1216         up through the render tree and snapped at the end. This change eliminates this flag
1217         and pushes pixel snapping logic down into TransformState.
1218
1219         TransformState now tracks a LayoutSize accumulated offset when there's no transform
1220         or we're just translating. We then snap and apply this offset before accumulating
1221         values into a transform, and when returning planar coordinates to callers.
1222
1223         Test: fast/sub-pixel/transformed-iframe-copy-on-scroll.html added,
1224               fast/sub-pixel/sub-pixel-iframe-copy-on-scroll.html modified to also catch this bug.
1225
1226         * platform/graphics/transforms/TransformState.cpp:
1227         (WebCore::TransformState::operator=): Pass accumulated offset.
1228         (WebCore::TransformState::translateTransform): Extracted this functionality for
1229         re-use when applying the accumulated offset, or accumulating from a call to move.
1230         (WebCore::TransformState::translateMappedCoordinates): Same as above when we're not
1231         acculating into a transform.
1232         (WebCore::TransformState::move): Changed to accumulate into m_accumulatedOffset when
1233         not accumulating into a transform.
1234         (WebCore::TransformState::applyAccumulatedOffset):
1235         (WebCore::TransformState::applyTransform): Applies the accumulated offset before the
1236         transform.
1237         (WebCore::TransformState::flatten): Ditto for flattening.
1238         (WebCore::TransformState::mappedPoint): Translates by the accumulated offset before
1239         returning.
1240         (WebCore::TransformState::mappedQuad): Ditto.
1241         * platform/graphics/transforms/TransformState.h:
1242         (TransformState): Added m_accumulatedOffset.
1243         * rendering/RenderGeometryMap.cpp:
1244         (WebCore::RenderGeometryMap::mapToContainer): When not using a transform, we still need
1245         to snap our offset before applying to our float result. Also, flatten when we have a
1246         non-uniform step.
1247         * rendering/RenderGeometryMap.h:
1248         (RenderGeometryMap): Remove use of SnapOffsetForTransforms.
1249
1250         Everything below simply drops the use of SnapOffsetForTransforms:
1251
1252         * dom/ContainerNode.cpp:
1253         (WebCore::ContainerNode::getUpperLeftCorner):
1254         * dom/MouseRelatedEvent.cpp:
1255         (WebCore::MouseRelatedEvent::computeRelativePosition):
1256         * editing/FrameSelection.cpp:
1257         (WebCore::CaretBase::absoluteBoundsForLocalRect):
1258         * editing/RenderedPosition.cpp:
1259         (WebCore::RenderedPosition::absoluteRect):
1260         * editing/VisiblePosition.cpp:
1261         (WebCore::VisiblePosition::absoluteCaretBounds):
1262         * html/HTMLSelectElement.cpp:
1263         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
1264         * html/shadow/SliderThumbElement.cpp:
1265         (WebCore::SliderThumbElement::setPositionFromPoint):
1266         * html/shadow/SpinButtonElement.cpp:
1267         (WebCore::SpinButtonElement::defaultEventHandler):
1268         * page/FrameView.cpp:
1269         (WebCore::FrameView::convertFromRenderer):
1270         (WebCore::FrameView::convertToRenderer):
1271         * rendering/InlineTextBox.cpp:
1272         (WebCore::InlineTextBox::paintDocumentMarker):
1273         (WebCore::InlineTextBox::paintTextMatchMarker):
1274         (WebCore::InlineTextBox::computeRectForReplacementMarker):
1275         * rendering/LayoutState.cpp:
1276         (WebCore::LayoutState::LayoutState):
1277         * rendering/RenderBox.cpp:
1278         (WebCore::RenderBox::mapLocalToContainer):
1279         (WebCore::RenderBox::pushMappingToContainer):
1280         * rendering/RenderBox.h:
1281         (RenderBox):
1282         * rendering/RenderBoxModelObject.cpp:
1283         (WebCore::RenderBoxModelObject::computeStickyPositionConstraints):
1284         * rendering/RenderEmbeddedObject.cpp:
1285         (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
1286         * rendering/RenderFrameSet.cpp:
1287         (WebCore::RenderFrameSet::userResize):
1288         * rendering/RenderInline.cpp:
1289         (WebCore::RenderInline::mapLocalToContainer):
1290         (WebCore::RenderInline::pushMappingToContainer):
1291         * rendering/RenderInline.h:
1292         (RenderInline):
1293         * rendering/RenderLayer.cpp:
1294         (WebCore::RenderLayer::absoluteToContents):
1295         (WebCore::RenderLayer::scrollTo):
1296         (WebCore::RenderLayer::childrenClipRect):
1297         (WebCore::RenderLayer::selfClipRect):
1298         * rendering/RenderLayerBacking.cpp:
1299         (WebCore::RenderLayerBacking::contentsVisible):
1300         * rendering/RenderMediaControls.cpp:
1301         (WebCore::RenderMediaControls::volumeSliderOffsetFromMuteButton):
1302         * rendering/RenderMenuList.cpp:
1303         (WebCore::RenderMenuList::showPopup):
1304         * rendering/RenderObject.cpp:
1305         (WebCore::RenderObject::absoluteFocusRingQuads):
1306         * rendering/RenderObject.h:
1307         * rendering/RenderText.cpp:
1308         (WebCore::RenderText::absoluteRectsForRange):
1309         (WebCore::RenderText::absoluteQuads):
1310         (WebCore::RenderText::absoluteQuadsForRange):
1311         * rendering/RenderTheme.cpp:
1312         (WebCore::RenderTheme::volumeSliderOffsetFromMuteButton):
1313         * rendering/RenderView.cpp:
1314         (WebCore::RenderView::selectionBounds):
1315         * rendering/RenderView.h:
1316         (RenderView):
1317         * rendering/RenderWidget.cpp:
1318         (WebCore::RenderWidget::updateWidgetGeometry):
1319         * rendering/svg/RenderSVGForeignObject.cpp:
1320         (WebCore::RenderSVGForeignObject::mapLocalToContainer):
1321         * rendering/svg/RenderSVGForeignObject.h:
1322         (RenderSVGForeignObject):
1323         * rendering/svg/RenderSVGInline.cpp:
1324         (WebCore::RenderSVGInline::mapLocalToContainer):
1325         * rendering/svg/RenderSVGInline.h:
1326         (RenderSVGInline):
1327         * rendering/svg/RenderSVGModelObject.cpp:
1328         (WebCore::RenderSVGModelObject::mapLocalToContainer):
1329         * rendering/svg/RenderSVGModelObject.h:
1330         (RenderSVGModelObject):
1331         * rendering/svg/RenderSVGRoot.h:
1332         (RenderSVGRoot):
1333         * rendering/svg/RenderSVGText.cpp:
1334         (WebCore::RenderSVGText::mapLocalToContainer):
1335         * rendering/svg/RenderSVGText.h:
1336         (RenderSVGText):
1337         * rendering/svg/SVGRenderSupport.cpp:
1338         (WebCore::SVGRenderSupport::mapLocalToContainer):
1339         * rendering/svg/SVGRenderSupport.h:
1340         (SVGRenderSupport):
1341
1342 2012-12-15  Anders Carlsson  <andersca@apple.com>
1343
1344         Rename FrameLoaderClient::download to convertMainResourceLoadToDownload
1345         https://bugs.webkit.org/show_bug.cgi?id=105122
1346
1347         Reviewed by Andreas Kling.
1348
1349         Rename FrameLoaderClient::download to convertMainResourceLoadToDownload and change it to take a MainResourceLoader instead
1350         of a ResourceHandle, since resource handles may not exist when loading isn't done in the web process.
1351
1352         * WebCore.exp.in:
1353         * WebCore.xcodeproj/project.pbxproj:
1354         * loader/EmptyClients.h:
1355         * loader/FrameLoaderClient.h:
1356         (WebCore):
1357         (FrameLoaderClient):
1358         * loader/MainResourceLoader.cpp:
1359         (WebCore::MainResourceLoader::continueAfterContentPolicy):
1360
1361 2012-12-16  Eric Carlson  <eric.carlson@apple.com>
1362
1363         Remove in-band text tracks when media element's src changes
1364         https://bugs.webkit.org/show_bug.cgi?id=105081
1365
1366         Reviewed by Sam Weinig.
1367
1368         No new tests, media/track/track-in-band.html was updated to test this change.
1369
1370         * html/HTMLMediaElement.cpp:
1371         (WebCore::HTMLMediaElement::mediaPlayerDidRemoveTrack): Move some code into removeTrack.
1372         (WebCore::HTMLMediaElement::removeTrack): New, remove a track and all of its cues.
1373         (WebCore::HTMLMediaElement::removeAllInbandTracks): New, remove all in-band tracks.
1374         (WebCore::HTMLMediaElement::clearMediaPlayer): Call removeAllInbandTracks.
1375         * html/HTMLMediaElement.h:
1376
1377         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1378         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1379         (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC):
1380         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Call clearTextTracks.
1381         (WebCore::MediaPlayerPrivateAVFoundationObjC::clearTextTracks): Remove all tracks from client.
1382
1383 2012-12-16  Simon Fraser  <simon.fraser@apple.com>
1384
1385         Fix assertions when doing a full repaint of compositing layers
1386         https://bugs.webkit.org/show_bug.cgi?id=105128
1387
1388         Reviewed by Dan Bernstein.
1389
1390         In r137811 I added code to repaint all compositing layers when FrameView::layout()
1391         is doing a full repaint. However, this code needs to avoid calling setContentsNeedDisplay()
1392         on layers that don't actually draw their own content: those that draw into an ancestor,
1393         and those that draw into a window.
1394
1395         Fixes assertions in existing tests.
1396
1397         * rendering/RenderLayerBacking.cpp:
1398         (WebCore::RenderLayerBacking::updateAfterLayout):
1399
1400 2012-12-16  ChangSeok Oh  <shivamidow@gmail.com>
1401
1402         [GTK][AC] Build failure with an option --with-acceleration-backend=clutter
1403         https://bugs.webkit.org/show_bug.cgi?id=105027
1404
1405         Reviewed by Gustavo Noronha Silva.
1406
1407         GLContext.* and RedirectedXCompositeWindow.* are meaningful only if opengl is
1408         a backend for the AC. So I wrap them in USE_OPENGL.
1409
1410         No new tests. This patch fixes a build fauilure, not adding new features.
1411
1412         * GNUmakefile.list.am:
1413
1414 2012-12-16  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
1415
1416         [GStreamer] create playbin in ::load(), not in player constructor
1417         https://bugs.webkit.org/show_bug.cgi?id=103898
1418
1419         Reviewed by Philippe Normand.
1420
1421         This patch moves the instantiation of the playbin pipeline into the
1422         WebCore::MediaPlayerPrivateGStreamer::load() method, so the pipeline
1423         layout can reflect other predefined settings such as audio pitch
1424         preservation in variable playback rate scenarios
1425
1426         No new tests. Covered by existing tests.
1427
1428         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1429         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
1430         (WebCore::MediaPlayerPrivateGStreamer::load):
1431         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1432         (MediaPlayerPrivateGStreamer):
1433
1434 2012-12-16  Mihnea Ovidenie  <mihnea@adobe.com>
1435
1436         [CSSRegions] Pseudo-elements should not be directly collected into a named flow
1437         https://bugs.webkit.org/show_bug.cgi?id=105046
1438
1439         Reviewed by Abhishek Arya.
1440
1441         Prevent pseudo-elements to be collected into a named-flow by bailing out early in the collecting stage.
1442         Following the CSSRegions spec, http://dev.w3.org/csswg/css3-regions/#flow-into, the pseudo-elements
1443         like ::before/::after/::first-letter/::first-line are not allowed to become content nodes, being directly
1444         collected into a flow thread.
1445
1446         Tests: fast/regions/pseudo-after-content-node.html
1447                fast/regions/pseudo-before-content-node.html
1448                fast/regions/pseudo-first-letter-content-node.html
1449                fast/regions/pseudo-first-line-content-node.html
1450
1451         * dom/NodeRenderingContext.cpp:
1452         (WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded):
1453
1454 2012-12-16  Mihai Maerean  <mmaerean@adobe.com>
1455
1456         [CSS Regions] broken feature detection: body.webkitRegionOverset and body.webkitGetRegionFlowRanges shouldn't succeed when disabled at runtime
1457         https://bugs.webkit.org/show_bug.cgi?id=99707
1458
1459         Reviewed by Hajime Morita.
1460
1461         The bug is that the CSS Regions feature leaks information at run-time. There are JS properties that exist even
1462         if the feature is disabled at run-time (document.webkitGetNamedFlows, document.body.webkitRegionOverset,
1463         document.body.webkitGetRegionFlowRanges and window.WebKitCSSRegionRule).
1464
1465         The fix is to add V8EnabledAtRuntime=cssRegions in the IDL files to the properties that leak information and to
1466         the interfaces that are the type of those properties.
1467
1468         Test: fast/regions/region-leak-js-information-when-disabled-at-runtime.html
1469
1470         * css/WebKitCSSRegionRule.idl:
1471             added V8EnabledAtRuntime=cssRegions for the WebKitCSSRegionRule interface.
1472         * dom/DOMNamedFlowCollection.idl:
1473             added V8EnabledAtRuntime=cssRegions for the DOMNamedFlowCollection interface.
1474         * dom/Document.idl:
1475             added V8EnabledAtRuntime=cssRegions for the webkitGetNamedFlows method.
1476         * dom/Element.idl:
1477             added V8EnabledAtRuntime=cssRegions for the webkitRegionOverset attribute.
1478             added V8EnabledAtRuntime=cssRegions for the webkitGetRegionFlowRanges method.
1479         * page/DOMWindow.idl:
1480             added V8EnabledAtRuntime=cssRegions for the WebKitCSSRegionRule attribute.
1481
1482 2012-12-15  Ian Vollick  <vollick@chromium.org>
1483
1484         [chromium] Automatically use composited scrolling
1485         https://bugs.webkit.org/show_bug.cgi?id=94743
1486
1487         Reviewed by Adrienne Walker.
1488
1489         We currently use the composited scrolling facilities provided by
1490         wkb.ug/91117 if the overflow scroll block element is styled with
1491         -webkit-overflow-scrolling: touch. Ideally, we could automatically
1492         opt into composited scrolling if it is safe to do so. This can affect
1493         antialiasing, so it is important that automatically opting in is only
1494         enabled via a setting.
1495
1496         The way I determine if it is safe is by checking that z-ordering will
1497         not be affected if the overflow scrollable element were promoted to a
1498         stacking context (details below), and that clipping our scrolling
1499         descendants will not affect rendering.
1500
1501         To check the first condition (that z-ordering will not be affected).
1502         I ensure that the candidate element and all its descendants appear as a 
1503         contiguous block in the candidate's stacking context. That is, if no 
1504         other elements are 'between' any of the candidates descendants when we
1505         sort in paint order, then we're safe. This is overly conservative,
1506         however. We could, in future, only consider stacking problems between
1507         elements that actually overlap.
1508
1509         To ensure that clipping will not cause a rendering change, I ensure
1510         that the layer has no out of flow positioned descendant whose
1511         containing block is not also a descendant of ours.
1512
1513         Test: compositing/overflow/automatically-opt-into-compositing-scrolling.html
1514
1515         (WebCore):
1516         * rendering/RenderLayer.cpp:
1517         (WebCore::RenderLayer::RenderLayer):
1518         (WebCore::RenderLayer::acceleratedCompositingForOverflowScrollEnabled):
1519         (WebCore):
1520         (WebCore::RenderLayer::updateDescendantsAreContiguousInStackingOrder):
1521         (WebCore::RenderLayer::updateDescendantsAreContiguousInStackingOrderRecursive):
1522         (WebCore::RenderLayer::positionNewlyCreatedOverflowControls):
1523         (WebCore::RenderLayer::canSafelyEstablishAStackingContext):
1524           Returns true if the RenderLayer could become a stacking context without
1525           affecting the stacking order.
1526         (WebCore::RenderLayer::updateDescendantDependentFlags):
1527           We now need to keep track of out of flow positioned descendants.
1528         (WebCore::RenderLayer::addChild):
1529         (WebCore::RenderLayer::removeChild):
1530         (WebCore::RenderLayer::usesCompositedScrolling):
1531           Returns true if the layer actually is using composited scrolling.
1532           This function may return false, even when needsCompositedScrolling
1533           returns true.
1534         (WebCore::RenderLayer::needsCompositedScrolling):
1535           This function returns true if we would like to use composited
1536           scrolling and it is safe to turn it on.
1537         (WebCore::RenderLayer::updateNeedsCompositedScrolling):
1538         (WebCore::RenderLayer::scrollTo):
1539         (WebCore::RenderLayer::dirtyZOrderLists):
1540         (WebCore::RenderLayer::dirtyNormalFlowList):
1541           Since these could affect opting into composited scrolling, we must
1542           request that the RenderLayerCompositor reevaluate compositing.
1543         (WebCore::RenderLayer::updateLayerListsIfNeeded):
1544           We call updateCanSafelyEstablishStackingContext here, if necessary.
1545         (WebCore::RenderLayer::shouldBeNormalFlowOnly):
1546         (WebCore::RenderLayer::shouldBeSelfPaintingLayer):
1547           usesCompositedScrolling -> needsCompositedScrolling
1548         (WebCore::RenderLayer::setAncestorChainHasOutOfFlowPositionedDescendant):
1549         (WebCore::RenderLayer::dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus):
1550         (WebCore::RenderLayer::updateOutOfFlowPositioned):
1551           Dirties and sets the out of flow positioned descendant state.
1552         (WebCore::RenderLayer::styleChanged):
1553         * rendering/RenderLayer.h:
1554         (RenderLayer):
1555         (WebCore::RenderLayer::hasOutOfFlowPositionedDescendant):
1556         * rendering/RenderLayerBacking.cpp:
1557         (WebCore::layerOrAncestorIsTransformedOrUsingCompositedScrolling):
1558         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
1559         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1560         (WebCore::RenderLayerBacking::hasUnpositionedOverflowControlsLayers):
1561         (WebCore):
1562         * rendering/RenderLayerBacking.h:
1563         (RenderLayerBacking):
1564         * rendering/RenderLayerCompositor.cpp:
1565         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
1566         (WebCore::RenderLayerCompositor::requiresCompositingForOverflowScrolling):
1567         * rendering/RenderLayerCompositor.h:
1568         (WebCore::RenderLayerCompositor::setShouldReevaluateCompositingAfterLayout):
1569         * testing/InternalSettings.cpp:
1570         (WebCore::InternalSettings::setEnableCompositingForOverflowScroll):
1571           Allows enabling the setting in layout tests.
1572         (WebCore):
1573         * testing/InternalSettings.h:
1574         (InternalSettings):
1575         * testing/InternalSettings.idl:
1576
1577 2012-12-15  Carlos Garcia Campos  <cgarcia@igalia.com>
1578
1579         Unreviewed. Fix make distcheck.
1580
1581         * bindings/gobject/GNUmakefile.am: Do not dist generated DOM
1582         bindings headers.
1583         * platform/ScrollAnimatorNone.cpp: Include PlatformGestureEvent.h
1584         only if gesture events are enabled.
1585
1586 2012-12-15  Alexey Proskuryakov  <ap@apple.com>
1587
1588         Build fix.
1589
1590         * platform/network/FormData.cpp:
1591         (WebCore::encodeElement):
1592         (WebCore::decodeElement):
1593         (WebCore::FormData::encode):
1594         (WebCore::FormData::decode):
1595         Disambiguated encode/decode functions. I'm not quite sure why the compiler was
1596         confused, but distinct names should make the code more readable anyway.
1597
1598 2012-12-15  Alexey Proskuryakov  <ap@apple.com>
1599
1600         <rdar://problem/12886312> Cannot upload patches to Bugzilla (<input type=file> doesn't work)
1601         https://bugs.webkit.org/show_bug.cgi?id=105120
1602
1603         Reviewed by Sam Weinig.
1604
1605         * WebCore.exp.in:
1606         * history/HistoryItem.cpp:
1607         * platform/network/FormData.h:
1608         Renamed encodeForBackForward and decodeForBackForward to encode and decode, respectively.
1609         I couldn't find anything in these that would limit them to this use, and data encoded
1610         for b/f has to be good enough to re-create a request anyway.
1611
1612         * platform/network/FormData.cpp: (WebCore::decode): Fixed file data decoder to not
1613         bail out in the general case of posting a complete file.
1614
1615 2012-12-15  Nima Ghanavatian  <nghanavatian@rim.com>
1616
1617         [BlackBerry] Pass key modifiers with touch and mouse events
1618         https://bugs.webkit.org/show_bug.cgi?id=105108
1619
1620         Reviewed by Rob Buis.
1621
1622         Call Screen to retrieve current key modifiers.
1623
1624         Internally reviewed by Gen Mak.
1625
1626         * platform/PlatformMouseEvent.h:
1627         (PlatformMouseEvent):
1628         * platform/blackberry/PlatformKeyboardEventBlackBerry.cpp:
1629         (WebCore::PlatformKeyboardEvent::getCurrentModifierState):
1630         * platform/blackberry/PlatformMouseEventBlackBerry.cpp:
1631         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1632         * platform/blackberry/PlatformTouchEventBlackBerry.cpp:
1633         (WebCore::PlatformTouchEvent::PlatformTouchEvent):
1634
1635 2012-12-15  Otto Derek Cheung  <otcheung@rim.com>
1636
1637         [BlackBerry] Prevent CookieManager from blocking the WKT thread
1638         https://bugs.webkit.org/show_bug.cgi?id=105111
1639
1640         PR 265603
1641
1642         Reviewed by Rob Buis.
1643         Internally reviewed by Konrad Piascik.
1644
1645         The getBackingStoreCookies in WKT is blocking the thread because it has to wait for
1646         the db to be opened before it can call on it.
1647
1648         The fix is to make CookieDatabaseBackingStore in the cookie_db thread dispatch
1649         a getBackingStoreCookies call on WKT after invokeOpen is finished.
1650
1651         Tested loading the browser. Cookies are being loaded into memory on start up.
1652
1653         * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.cpp:
1654         (WebCore::CookieDatabaseBackingStore::invokeOpen):
1655         * platform/blackberry/CookieManager.cpp:
1656         (WebCore::cookieManager):
1657         * platform/blackberry/CookieManager.h:
1658
1659 2012-12-15  Simon Fraser  <simon.fraser@apple.com>
1660
1661         Fix repaint issues when resizing a window with centered content, for platforms with a tile cache
1662         https://bugs.webkit.org/show_bug.cgi?id=105073
1663
1664         Reviewed by Dan Bernstein.
1665
1666         There were several issues with the "do full repaint" code path in
1667         FrameView::layout(). These caused repaint issues when resizing the web view,
1668         especially for platforms that use a tile cache.
1669         
1670         First, the m_doFullRepaint flag wold get clobbered on resize-layouts, because
1671         the call to adjustViewSize() re-enters layout(), and resets the m_doFullRepaint member
1672         variable to false, even if the outer call had previously set it to true. This would
1673         cause us to lose track of whether we needed to do a full repaint. The patch fixes
1674         this by restoring m_doFullRepaint to the value it had before the call to adjustViewSize().
1675         
1676         The second problem was that full repaints would not propagate to compositing
1677         layers. They only repainted the RenderView, and on platforms that use a tile cache,
1678         this only repaints the top portion of that tile cache. This was fixed by sending
1679         a NeedsFullRepaintInBacking flag down into RenderLayer::updateLayerPositions(),
1680         and using that to do a full repaint on all compositing layers.
1681         
1682         Sending this new flag down into updateAfterLayout() prompted some boolean/flags
1683         cleanup with propagated into several files. This also allowed me to no longer
1684         include RenderLayerBacking.h in RenderLayerCompositor.h, but that required
1685         header cleanup in several files.
1686
1687         Automated testing is not possible because WebKitTestRunner resizes the window
1688         asynchronously (bug 105101). Added manual test.
1689
1690         * page/FrameView.cpp:
1691         (WebCore::updateLayerPositionFlags):
1692         (WebCore::FrameView::layout):
1693         * page/scrolling/ScrollingCoordinator.cpp:
1694         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1695         * rendering/RenderLayer.cpp:
1696         (WebCore::RenderLayer::updateLayerPositions):
1697         (WebCore::RenderLayer::updateCompositingLayersAfterScroll):
1698         * rendering/RenderLayer.h:
1699         * rendering/RenderLayerBacking.cpp:
1700         (WebCore::RenderLayerBacking::updateAfterLayout):
1701         (WebCore::RenderLayerBacking::contentChanged):
1702         * rendering/RenderLayerBacking.h:
1703         * rendering/RenderLayerCompositor.cpp:
1704         (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
1705         * rendering/RenderLayerCompositor.h:
1706         * rendering/RenderObject.cpp:
1707         * rendering/RenderView.cpp:
1708
1709 2012-12-15  Anders Carlsson  <andersca@apple.com>
1710
1711         Fix build.
1712
1713         * platform/graphics/ca/GraphicsLayerCA.h:
1714         Remove an unused member variable.
1715
1716 2012-12-15  Simon Fraser  <simon.fraser@apple.com>
1717
1718         REGRESSION (r137006): TileCache flashes to linen, rather than the background color, when scrolling fast
1719         https://bugs.webkit.org/show_bug.cgi?id=104746
1720
1721         Reviewed by Darin Adler.
1722
1723         Make RenderLayerBacking::updateBackgroundColor() responsible for setting the background
1724         color of the main frame's root layer to the document background color (rather than doing
1725         it in code related to overlay scrollbars, which was crazy). This is only done for platforms
1726         that use a TiledBacking (currently, just Mac).
1727         
1728         Also fix updateBackgroundColor() to not call m_graphicsLayer->setContentsToBackgroundColor()
1729         and then call clearBackgroundColor() right away if the color was transparent.
1730         
1731         * page/FrameView.cpp:
1732         (WebCore::FrameView::recalculateScrollbarOverlayStyle): Remove code that calls documentBackgroundColorDidChange().
1733         * rendering/RenderLayerBacking.cpp:
1734         (WebCore::clipBox): Remove blank linke.
1735         (WebCore::RenderLayerBacking::updateBackgroundColor):
1736         * rendering/RenderLayerCompositor.cpp:
1737         * rendering/RenderLayerCompositor.h:
1738         (RenderLayerCompositor):
1739
1740 2012-12-15  No'am Rosenthal  <noam.rosenthal@nokia.com>
1741
1742         Disambiguate "background color" and "contents as solid color" on GraphicsLayer
1743         https://bugs.webkit.org/show_bug.cgi?id=104842
1744
1745         Reviewed by Simon Fraser.
1746
1747         Rename overloads in GraphicsLayerTextureMapper and GraphicsLayerChromium to account for the rename in GraphicsLayer.
1748
1749         Covered by existing tests.
1750
1751         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1752         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1753         (WebCore::GraphicsLayerTextureMapper::setContentsToSolidColor):
1754         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
1755         (GraphicsLayerTextureMapper):
1756         (WebCore::GraphicsLayerTextureMapper::solidColor):
1757         * platform/graphics/texmap/TextureMapperLayer.cpp:
1758         (WebCore::TextureMapperLayer::paintSelf):
1759         (WebCore::TextureMapperLayer::flushCompositingStateSelf):
1760         * platform/graphics/texmap/TextureMapperLayer.h:
1761         (State):
1762
1763 2012-12-13  Simon Fraser  <simon.fraser@apple.com>
1764
1765         Disambiguate "background color" and "contents as solid color" on GraphicsLayer
1766         https://bugs.webkit.org/show_bug.cgi?id=104842
1767
1768         Reviewed by Dean Jackson.
1769
1770         GraphicsLayer failed to be clear about the distinction between
1771         the layer background color, and setting the layer contents
1772         to a color. This caused some recently added tests to fail,
1773         and required some special-casing for the TileCache in
1774         GraphicsLayerCA.
1775         
1776         Separate these two concepts on GraphicsLayer. setBackgroundColor()
1777         now sets the background color on the entire layer, which will only
1778         be used in special cases like the TileCache.
1779         
1780         The existing setContentsToBackgroundColor() is renamed to
1781         setContentsToSolidColor(), and is an explicit request to create
1782         a contents layer for the purpose of displaying a simple color.
1783         
1784         In both cases, 'clear' methods are not necessary; calling
1785         the setter with an invalid color clears the color.
1786
1787         Covered by existing tests.
1788
1789         * WebCore.exp.in: Remove GraphicsLayer::clearBackgroundColor().
1790         * platform/graphics/GraphicsLayer.cpp:
1791         (WebCore::GraphicsLayer::GraphicsLayer):
1792         (WebCore::GraphicsLayer::setBackgroundColor):
1793         (WebCore::GraphicsLayer::dumpProperties):
1794         * platform/graphics/GraphicsLayer.h:
1795         (GraphicsLayer): Remove m_backgroundColorSet; we just check whether
1796         the color is a valid color now.
1797         (WebCore::GraphicsLayer::setContentsToSolidColor):
1798         * platform/graphics/ca/GraphicsLayerCA.cpp:
1799         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
1800         (WebCore::GraphicsLayerCA::setBackgroundColor):
1801         (WebCore::GraphicsLayerCA::setContentsToSolidColor):
1802         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
1803         (WebCore::GraphicsLayerCA::updateBackgroundColor):
1804         (WebCore::GraphicsLayerCA::updateContentsColorLayer):
1805         (WebCore):
1806         * platform/graphics/ca/GraphicsLayerCA.h:
1807         (GraphicsLayerCA):
1808         * rendering/RenderLayerBacking.cpp:
1809         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): We have
1810         to call updateBackgroundColor(), because the 'is simple compositing layer'
1811         state may change in this code path.
1812         (WebCore::RenderLayerBacking::updateBackgroundColor): Don't initialize
1813         the Color to transparent (it will be invalid initially), and always
1814         call setContentsToSolidColor() which will either set or remove the color.
1815
1816 2012-12-15  Mark Lam  <mark.lam@apple.com>
1817
1818         Re-landing patch for "Introducing the DatabaseStrategy and database servers".
1819         https://bugs.webkit.org/show_bug.cgi?id=104934.
1820
1821         Not reviewed.
1822
1823         Merged from r137767. Previously reviewed by Sam Weinig.
1824         Also added __ZTVN7WebCore16DatabaseStrategyE to WebCore.exp.in.
1825
1826         No new tests.
1827
1828         * CMakeLists.txt:
1829         * GNUmakefile.list.am:
1830         * Modules/webdatabase/AbstractDatabaseServer.h: Copied from Source/WebCore/Modules/webdatabase/AbstractDatabaseServer.h.
1831         * Modules/webdatabase/DBBackendServer.h: Copied from Source/WebCore/Modules/webdatabase/DBBackendServer.h.
1832         * Modules/webdatabase/DatabaseManager.cpp:
1833         (WebCore::DatabaseManager::DatabaseManager):
1834         * Modules/webdatabase/DatabaseManager.h:
1835         (DatabaseManager):
1836         * Target.pri:
1837         * WebCore.exp.in:
1838         * WebCore.gypi:
1839         * WebCore.vcproj/WebCore.vcproj:
1840         * WebCore.xcodeproj/project.pbxproj:
1841         * platform/DatabaseStrategy.cpp: Copied from Source/WebCore/platform/DatabaseStrategy.cpp.
1842         * platform/DatabaseStrategy.h: Copied from Source/WebCore/platform/DatabaseStrategy.h.
1843         * platform/PlatformStrategies.h:
1844         (WebCore::PlatformStrategies::databaseStrategy):
1845         (PlatformStrategies):
1846         (WebCore::PlatformStrategies::PlatformStrategies):
1847
1848 2012-12-14  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>
1849
1850         Emphasis mark is printed after inline-block with justify
1851         https://bugs.webkit.org/show_bug.cgi?id=104631
1852
1853         Reviewed by Dean Jackson.
1854
1855         Do not print an emphasis mark after an inline-block when justified.
1856
1857         If an inline-block is expanded, it has a space appended to it.
1858         This space should not have any emphasis marks drawn.
1859
1860         Test: fast/inline/justify-emphasis-inline-box.html
1861
1862         * platform/graphics/SimpleFontData.h:
1863         (WebCore::SimpleFontData::zeroWidthSpaceGlyph): Add getter method to get zero width space glyph.
1864         * platform/graphics/WidthIterator.cpp:
1865         (WebCore::WidthIterator::advanceInternal): We use zero width space for the extra space not to draw emphasis marks.
1866
1867 2012-12-14  Jer Noble  <jer.noble@apple.com>
1868
1869         Unreviewed bug fix after r137782.
1870
1871         Add new source file TextTrackRepresentation.cpp to CMakeLists.txt.
1872
1873         * CMakeLists.txt:
1874
1875 2012-12-14  Sheriff Bot  <webkit.review.bot@gmail.com>
1876
1877         Unreviewed, rolling out r137767.
1878         http://trac.webkit.org/changeset/137767
1879         https://bugs.webkit.org/show_bug.cgi?id=105062
1880
1881         Broke Mac builds. (Requested by mlam on #webkit).
1882
1883         * CMakeLists.txt:
1884         * GNUmakefile.list.am:
1885         * Modules/webdatabase/AbstractDatabaseServer.h: Removed.
1886         * Modules/webdatabase/DBBackendServer.h: Removed.
1887         * Modules/webdatabase/DatabaseManager.cpp:
1888         (WebCore::DatabaseManager::DatabaseManager):
1889         * Modules/webdatabase/DatabaseManager.h:
1890         * Target.pri:
1891         * WebCore.exp.in:
1892         * WebCore.gypi:
1893         * WebCore.vcproj/WebCore.vcproj:
1894         * WebCore.xcodeproj/project.pbxproj:
1895         * platform/DatabaseStrategy.cpp: Removed.
1896         * platform/DatabaseStrategy.h: Removed.
1897         * platform/PlatformStrategies.h:
1898         (WebCore):
1899         (WebCore::PlatformStrategies::PlatformStrategies):
1900         (PlatformStrategies):
1901
1902 2012-12-14  Jer Noble  <jer.noble@apple.com>
1903
1904         Allow the text track contents to be displayed externally to WebCore.
1905         https://bugs.webkit.org/show_bug.cgi?id=105052
1906
1907         Reviewed by Eric Carlson.
1908
1909         Support scenarios where the text track contents must be rendered outside of WebCore, such as to an external
1910         display or window.  Add an abstract base class which encapsulates the external representation to which the
1911         text tracks will be rendered.
1912
1913         Add a new abstract base class and client to wrap the external rendering of a TextTrack.
1914         * platform/graphics/TextTrackRepresentation.h: Added.
1915         (WebCore::TextTrackRepresentationClient::~TextTrackRepresentationClient):
1916         (WebCore::TextTrackRepresentation::~TextTrackRepresentation):
1917
1918         Add an empty concrete implementation for those ports who do not yet support external display of subtitles.
1919         * platform/graphics/TextTrackRepresentation.cpp: Added.
1920         (NullTextTrackRepresentation):
1921         (WebCore::NullTextTrackRepresentation::~NullTextTrackRepresentation):
1922         (WebCore::NullTextTrackRepresentation::update):
1923         (WebCore::NullTextTrackRepresentation::platformLayer):
1924         (WebCore::NullTextTrackRepresentation::setContentScale):
1925         (WebCore::NullTextTrackRepresentation::bounds):
1926         (WebCore::TextTrackRepresentation::create):
1927
1928         Add methods to MediaPlayerPrivateIOS to handle the TextTrackRepresentation.
1929         * platform/graphics/ios/MediaPlayerPrivateIOS.h:
1930         * platform/graphics/ios/MediaPlayerPrivateIOS.mm:
1931         (WebCore::MediaPlayerPrivateIOS::deliverNotification): Remove the representation when exiting full screen.
1932         (WebCore::MediaPlayerPrivateIOS::requiresTextTrackRepresentation): Return YES if in full screen mode.
1933         (WebCore::MediaPlayerPrivateIOS::setTextTrackRepresentation): Pass the representation's layer to the player plug-in.
1934
1935         Expose those methods via HTMLMediaElement:
1936         * html/HTMLMediaElement.cpp:
1937         (WebCore::HTMLMediaElement::requiresTextTrackRepresentation):
1938         (WebCore::HTMLMediaElement::setTextTrackRepresentation):
1939         * html/HTMLMediaElement.h:
1940         * platform/graphics/MediaPlayer.cpp:
1941         (WebCore::MediaPlayer::requiresTextTrackRepresentation):
1942         (WebCore::MediaPlayer::setTextTrackRepresentation):
1943         * platform/graphics/MediaPlayer.h:
1944         (WebCore::MediaPlayerClient::textTrackRepresentationBoundsChanged):
1945         (WebCore::MediaPlayerClient::paintTextTrackRepresentation):
1946         * platform/graphics/MediaPlayerPrivate.h:
1947         (WebCore::MediaPlayerPrivateInterface::requiresTextTrackRepresentation):
1948         (WebCore::MediaPlayerPrivateInterface::setTextTrackRepresentation):
1949
1950         * html/shadow/MediaControlElements.cpp:
1951         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Create the representation, if necessary.
1952         (WebCore::MediaControlTextTrackContainerElement::updateSizes): Use the representation to determine the font size.
1953         (WebCore::MediaControlTextTrackContainerElement::paintTextTrackRepresentation): Added. Paint the TextTrack into the provided graphics context.
1954         (WebCore::MediaControlTextTrackContainerElement::textTrackRepresentationBoundsChanged): Added. Call updateSizes().
1955         * html/shadow/MediaControlElements.h:
1956
1957         Add the new files to the project.
1958         * WebCore.xcodeproj/project.pbxproj:
1959         * GNUmakefile.list.am:
1960         * Target.pri:
1961         * WebCore.gypi:
1962         * WebCore.vcproj/WebCore.vcproj:
1963
1964 2012-12-14  Fady Samuel  <fsamuel@chromium.org>
1965
1966         Allow embedder to observe changes to frame names
1967         https://bugs.webkit.org/show_bug.cgi?id=104404
1968
1969         Reviewed by Darin Fisher.
1970
1971         * loader/FrameLoaderClient.h:
1972         (WebCore::FrameLoaderClient::didChangeName):
1973         (FrameLoaderClient):
1974         * page/DOMWindow.cpp:
1975         (WebCore::DOMWindow::setName):
1976
1977 2012-12-14  James Simonsen  <simonjam@chromium.org>
1978
1979         [Resource Timing] Properly report reused connections
1980         https://bugs.webkit.org/show_bug.cgi?id=104986
1981
1982         Reviewed by Tony Gentilcore.
1983
1984         Test: http/tests/w3c/webperf/submission/resource-timing/html/test_resource_connection_reuse.html
1985
1986         * page/PerformanceResourceTiming.cpp:
1987         (WebCore::PerformanceResourceTiming::PerformanceResourceTiming):
1988         (WebCore::PerformanceResourceTiming::connectStart):
1989         (WebCore::PerformanceResourceTiming::connectEnd):
1990         * page/PerformanceResourceTiming.h:
1991         (PerformanceResourceTiming):
1992
1993 2012-12-14  Roger Fong  <roger_fong@apple.com>
1994
1995         Enable video caption controls on Windows.
1996         https://bugs.webkit.org/show_bug.cgi?id=105045.
1997
1998         Reviewed by Eric Carlson.
1999
2000         Now that video tracks have been enabled on Windows, enable controls as well.
2001
2002         * html/shadow/MediaControlElements.cpp:
2003         (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement):
2004         (WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler):
2005         * html/shadow/MediaControlElements.h:
2006         * rendering/RenderThemeWin.h:
2007
2008 2012-12-14  Mark Lam  <mark.lam@apple.com>
2009
2010         Introducing the DatabaseStrategy and database servers.
2011         https://bugs.webkit.org/show_bug.cgi?id=104934.
2012
2013         Reviewed by Sam Weinig.
2014
2015         The database server is currently a placeholder that does nothing.
2016
2017         No new tests.
2018
2019         * CMakeLists.txt:
2020         * GNUmakefile.list.am:
2021         * Modules/webdatabase/AbstractDatabaseServer.h: Added.
2022         (WebCore):
2023         (AbstractDatabaseServer):
2024         (WebCore::AbstractDatabaseServer::AbstractDatabaseServer):
2025         (WebCore::AbstractDatabaseServer::~AbstractDatabaseServer):
2026         * Modules/webdatabase/DBBackendServer.h: Added.
2027         (DBBackend):
2028         * Modules/webdatabase/DatabaseManager.cpp:
2029         (WebCore::DatabaseManager::DatabaseManager):
2030         * Modules/webdatabase/DatabaseManager.h:
2031         (WebCore):
2032         (DatabaseManager):
2033         * Target.pri:
2034         * WebCore.exp.in:
2035         * WebCore.gypi:
2036         * WebCore.vcproj/WebCore.vcproj:
2037         * WebCore.xcodeproj/project.pbxproj:
2038         * platform/DatabaseStrategy.cpp: Added.
2039         (WebCore):
2040         (WebCore::DatabaseStrategy::getDatabaseServer):
2041         * platform/DatabaseStrategy.h: Added.
2042         (WebCore):
2043         (DatabaseStrategy):
2044         (WebCore::DatabaseStrategy::~DatabaseStrategy):
2045         * platform/PlatformStrategies.h:
2046         (WebCore):
2047         (WebCore::PlatformStrategies::databaseStrategy):
2048         (PlatformStrategies):
2049         (WebCore::PlatformStrategies::PlatformStrategies):
2050
2051 2012-12-14  Anton Vayvod  <avayvod@chromium.org>
2052
2053         Text Autosizing: Consider inline-block and inline-table elements to be autosizing clusters.
2054         https://bugs.webkit.org/show_bug.cgi?id=104702
2055
2056         Reviewed by Julien Chaffraix.
2057
2058         A common pattern for creating adjacent columns in CSS is to set each of the columns to
2059         display:inline-block, display:inline-table or alike WebKit-specific styles. Whenever columns
2060         are used, Text Autosizing needs to assign each of the columns to different clusters (since
2061         the user can zoom in such that a column fills the width of the screen, so text within a column
2062         should have a smaller multiplier than it's wider enclosing cluster would have needed).
2063
2064         This patch causes display:inline-block, display:inline-table and alike styles to trigger new clusters.
2065
2066         Test: fast/text-autosizing/cluster-inline-block-or-table.html
2067         Test: fast/text-autosizing/cluster-inline-grid-flex-box.html
2068
2069         * rendering/TextAutosizer.cpp:
2070         (WebCore::TextAutosizer::isAutosizingContainer):
2071         (WebCore::TextAutosizer::isAutosizingCluster):
2072             Consider display:inline-block, inline-table and alike elements to be autosizing containers and clusters.
2073
2074 2012-12-14  Anders Carlsson  <andersca@apple.com>
2075
2076         REGRESSION (r137607): Cannot download files, stuck in "Preparing to download"
2077         https://bugs.webkit.org/show_bug.cgi?id=105044
2078         <rdar://problem/12879657>
2079
2080         Reviewed by Alexey Proskuryakov.
2081
2082         Make ResourceHandle::cancel return early if the handle has been converted to a download.
2083
2084         * platform/network/mac/ResourceHandleMac.mm:
2085         (WebCore::ResourceHandle::cancel):
2086
2087 2012-12-14  Sheriff Bot  <webkit.review.bot@gmail.com>
2088
2089         Unreviewed, rolling out r137570.
2090         http://trac.webkit.org/changeset/137570
2091         https://bugs.webkit.org/show_bug.cgi?id=105048
2092
2093         Stale nodes in the touchEventTarget HashCountedSet are
2094         triggering crashes. Rolling out while I find the root cause.
2095         (Requested by leviw on #webkit).
2096
2097         * dom/Document.cpp:
2098         (WebCore::Document::Document):
2099         (WebCore::Document::didAddTouchEventHandler):
2100         (WebCore::Document::didRemoveTouchEventHandler):
2101         * dom/Document.h:
2102         (WebCore::Document::touchEventHandlerCount):
2103         (Document):
2104         * dom/Node.cpp:
2105         (WebCore::Node::didMoveToNewDocument):
2106         (WebCore::tryAddEventListener):
2107         (WebCore::tryRemoveEventListener):
2108         * history/CachedFrame.cpp:
2109         (WebCore::CachedFrameBase::restore):
2110         * html/HTMLInputElement.cpp:
2111         (WebCore::HTMLInputElement::~HTMLInputElement):
2112         (WebCore::HTMLInputElement::updateType):
2113         * page/DOMWindow.cpp:
2114         (WebCore::DOMWindow::addEventListener):
2115         (WebCore::DOMWindow::removeEventListener):
2116         * page/EventHandler.cpp:
2117         (WebCore::EventHandler::handleTouchEvent):
2118         * page/Frame.cpp:
2119         (WebCore::Frame::setDocument):
2120         * page/scrolling/ScrollingCoordinator.cpp:
2121         * page/scrolling/ScrollingCoordinator.h:
2122         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
2123         (WebCore::ScrollingCoordinatorChromium::frameViewLayoutUpdated):
2124         * page/scrolling/chromium/ScrollingCoordinatorChromium.h:
2125         (ScrollingCoordinatorChromium):
2126         * testing/Internals.cpp:
2127         (WebCore::Internals::touchEventHandlerCount):
2128         * testing/Internals.h:
2129         (Internals):
2130         * testing/Internals.idl:
2131
2132 2012-12-14  Michelangelo De Simone  <michelangelo@webkit.org>
2133
2134         [CSS Shaders] Remove code for the other mesh box types (border-box | padding-box | content-box)
2135         https://bugs.webkit.org/show_bug.cgi?id=103776
2136
2137         Reviewed by Dean Jackson.
2138
2139         The MeshBoxType has been removed and the code has been refactored. The specs will be updated shortly
2140         and therefore this feature - even though it was not fully implemented yet - shall not be used anymore.
2141
2142         In this patch we remove everything but the parsing code, which shall be addressed in a different patch
2143         (see: https://bugs.webkit.org/show_bug.cgi?id=103778).
2144
2145         Specification to be updated: http://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#ltboxgt
2146
2147         Existing tests have been updated and new parsing legacy cases have been added.
2148
2149         * css/CSSComputedStyleDeclaration.cpp:
2150         (WebCore::CSSComputedStyleDeclaration::valueForFilter):
2151         * css/CSSParser.cpp:
2152         (WebCore::CSSParser::parseCustomFilter):
2153         * css/CSSPrimitiveValueMappings.h:
2154         * css/StyleResolver.cpp:
2155         (WebCore::StyleResolver::createCustomFilterOperation):
2156         * platform/graphics/filters/CustomFilterConstants.h:
2157         * platform/graphics/filters/CustomFilterOperation.cpp:
2158         (WebCore::CustomFilterOperation::CustomFilterOperation):
2159         (WebCore::CustomFilterOperation::blend):
2160         * platform/graphics/filters/CustomFilterOperation.h:
2161         (WebCore::CustomFilterOperation::create):
2162         (CustomFilterOperation):
2163         (WebCore::CustomFilterOperation::operator==):
2164         * platform/graphics/filters/CustomFilterRenderer.cpp:
2165         (WebCore::CustomFilterRenderer::create):
2166         (WebCore::CustomFilterRenderer::CustomFilterRenderer):
2167         * platform/graphics/filters/CustomFilterRenderer.h:
2168         (CustomFilterRenderer):
2169         * platform/graphics/filters/FECustomFilter.cpp:
2170         (WebCore::FECustomFilter::FECustomFilter):
2171         (WebCore::FECustomFilter::create):
2172         * platform/graphics/filters/FECustomFilter.h:
2173         (FECustomFilter):
2174         * platform/graphics/filters/ValidatedCustomFilterOperation.cpp:
2175         (WebCore::ValidatedCustomFilterOperation::ValidatedCustomFilterOperation):
2176         * platform/graphics/filters/ValidatedCustomFilterOperation.h:
2177         (WebCore::ValidatedCustomFilterOperation::create):
2178         (WebCore::ValidatedCustomFilterOperation::operator==):
2179         (ValidatedCustomFilterOperation):
2180         * rendering/FilterEffectRenderer.cpp:
2181         (WebCore::createCustomFilterEffect):
2182         * rendering/RenderLayer.cpp:
2183         (WebCore::RenderLayer::computeFilterOperations):
2184         * platform/graphics/texmap/TextureMapperGL.cpp:
2185         (WebCore::TextureMapperGL::drawUsingCustomFilter):
2186
2187 2012-12-14  Yury Semikhatsky  <yurys@chromium.org>
2188
2189         Web Inspector: optional parameters of protocol commands should go after required ones
2190         https://bugs.webkit.org/show_bug.cgi?id=105019
2191
2192         Reviewed by Pavel Feldman.
2193
2194         * inspector/Inspector.json: Moved required x and y parameters declaration before
2195         optional ones.
2196         * inspector/InspectorInputAgent.cpp:
2197         (WebCore::InspectorInputAgent::dispatchMouseEvent):
2198         * inspector/InspectorInputAgent.h:
2199         (InspectorInputAgent):
2200
2201 2012-12-14  Jessie Berlin  <jberlin@apple.com>
2202
2203         Mac build fix after r137724.
2204
2205         * platform/graphics/MediaPlayer.h:
2206         (WebCore::MediaPlayerClient::mediaPlayerKeyAdded):
2207         Comment out the names of the unused parameters so they don't trigger unused parameter
2208         warnings.
2209         (WebCore::MediaPlayerClient::mediaPlayerKeyError):
2210         Ditto.
2211         (WebCore::MediaPlayerClient::mediaPlayerKeyMessage):
2212         Ditto.
2213         (WebCore::MediaPlayerClient::mediaPlayerKeyNeeded):
2214         Ditto.
2215
2216         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2217         (WebCore::MediaPlayerPrivateAVFoundationObjC::generateKeyRequest):
2218         Pass an empty URL for the new defaultURL parameter in the keyMessage call.
2219
2220 2012-12-14  Alberto Garcia  <agarcia@igalia.com>
2221
2222         [GTK] When in private mode WebKitGTK+ should not save HTTP authentication credentials to the persistent storage
2223         https://bugs.webkit.org/show_bug.cgi?id=104910
2224
2225         Reviewed by Martin Robinson.
2226
2227         Add new parameter to GtkAuthenticationDialog to select whether we
2228         allow persistent storage of credential information or not. In the
2229         latter case, the "Remember password" check button is not shown and
2230         the credentials are always stored in the session.
2231
2232         * platform/gtk/GtkAuthenticationDialog.cpp:
2233         (WebCore::GtkAuthenticationDialog::GtkAuthenticationDialog):
2234         (WebCore::GtkAuthenticationDialog::createContentsInContainer):
2235         (WebCore::GtkAuthenticationDialog::buttonClickedCallback):
2236         * platform/gtk/GtkAuthenticationDialog.h:
2237         (GtkAuthenticationDialog):
2238
2239 2012-12-14  Andrey Kosyakov  <caseq@chromium.org>
2240
2241         Unreviewed, rolling out r129633 and r129757.
2242         http://trac.webkit.org/changeset/129633
2243         http://trac.webkit.org/changeset/129757
2244         https://bugs.webkit.org/show_bug.cgi?id=97659
2245
2246         Causes performance regression whn inspector overlay is
2247         displayed
2248
2249         * inspector/InspectorOverlay.cpp:
2250         (WebCore::InspectorOverlay::paint):
2251
2252 2012-12-14  Yury Semikhatsky  <yurys@chromium.org>
2253
2254         Web Inspector: add data grid for exploring native heap graph
2255         https://bugs.webkit.org/show_bug.cgi?id=105012
2256
2257         Reviewed by Pavel Feldman.
2258
2259         Added a view for displaying native heap graph nodes.
2260
2261         * inspector/HeapGraphSerializer.cpp:
2262         (WebCore::HeapGraphSerializer::reportEdge):
2263         * inspector/front-end/NativeMemorySnapshotView.js:
2264         (WebInspector.NativeMemorySnapshotView):
2265         (WebInspector.NativeMemorySnapshotView.prototype._onSelectedViewChanged):
2266         (WebInspector.NativeMemorySnapshotView.prototype.get statusBarItems):
2267         (WebInspector.NativeHeapGraphNode):
2268         (WebInspector.NativeHeapGraphNode.prototype.id):
2269         (WebInspector.NativeHeapGraphNode.prototype.type):
2270         (WebInspector.NativeHeapGraphNode.prototype.size):
2271         (WebInspector.NativeHeapGraphNode.prototype.className):
2272         (WebInspector.NativeHeapGraphNode.prototype.name):
2273         (WebInspector.NativeHeapGraphNode.prototype.hasReferencedNodes):
2274         (WebInspector.NativeHeapGraphNode.prototype.referencedNodes):
2275         (WebInspector.NativeHeapGraphNode.prototype._firstEdgePoistion):
2276         (WebInspector.NativeHeapGraphNode.prototype._afterLastEdgePosition):
2277         (WebInspector.NativeHeapGraphNode.prototype._getStringField):
2278         (WebInspector.NativeHeapGraph):
2279         (WebInspector.NativeHeapGraph.prototype.rootNodes):
2280         (WebInspector.NativeHeapGraph.prototype._calculateNodeEdgeIndexes):
2281         (WebInspector.NativeHeapGraphDataGrid):
2282         (WebInspector.NativeHeapGraphDataGridRoot):
2283         (WebInspector.NativeHeapGraphDataGridRoot.prototype._populate):
2284         (WebInspector.NativeHeapGraphDataGridNode):
2285         (WebInspector.NativeHeapGraphDataGridNode.prototype._populate):
2286         (WebInspector.NativeMemoryProfileType.prototype.buttonClicked.didReceiveMemorySnapshot):
2287         (WebInspector.NativeMemoryProfileType.prototype.buttonClicked):
2288
2289 2012-12-14  Ilya Tikhonovsky  <loislo@chromium.org>
2290
2291         Web Inspector: Native Memory Instrumentation: do not validate InlineFlowBox objects against tcmalloc data.
2292         https://bugs.webkit.org/show_bug.cgi?id=105001
2293
2294         Reviewed by Yury Semikhatsky.
2295
2296         This is a follow-up change for r137589.
2297
2298         * rendering/InlineFlowBox.cpp:
2299         (WebCore::InlineFlowBox::reportMemoryUsage):
2300         (WebCore):
2301         * rendering/InlineFlowBox.h:
2302         (InlineFlowBox):
2303
2304 2012-12-14  Kentaro Hara  <haraken@chromium.org>
2305
2306         ChildNodesLazySnapshot::nextNode() can crash in Debug builds
2307         https://bugs.webkit.org/show_bug.cgi?id=104982
2308
2309         Reviewed by Ryosuke Niwa.
2310
2311         The original fix in r137702 was not enough. r137702 fixed a crash
2312         in Release builds but didn't fix a crash in Debug builds.
2313         We have to also change a return type of ChildNodesLazySnapshot::nextNode()
2314         from a raw pointer to a RefPtr.
2315
2316         Test: fast/dom/insertedIntoDocument-no-crash.html
2317         (Confirm that this test does not crash in Debug builds.)
2318
2319         * dom/ContainerNode.h:
2320         (WebCore::ChildNodesLazySnapshot::nextNode):
2321         * dom/ContainerNodeAlgorithms.cpp:
2322         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
2323         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
2324
2325 2012-12-14  John Mellor  <johnme@chromium.org>
2326
2327         Text Autosizing: Don't autosize unwrappable blocks
2328         https://bugs.webkit.org/show_bug.cgi?id=104925
2329
2330         Reviewed by Julien Chaffraix.
2331
2332         If we autosize an unwrappable block (white-space:nowrap/pre), it'll
2333         expand sideways. This doesn't actually improve its legibility, and it
2334         can often severely break web page layouts. This patch prevents us from
2335         autosizing unwrappable blocks. A follow-up patch will address the more
2336         complex issue of unwrappable inline elements.
2337
2338         Tests: fast/text-autosizing/unwrappable-blocks.html
2339                fast/text-autosizing/unwrappable-inlines.html
2340
2341         * rendering/TextAutosizer.cpp:
2342         (WebCore::TextAutosizer::processContainer):
2343             Use containerShouldbeAutosized instead of contentHeightIsConstrained.
2344         (WebCore::contentHeightIsConstrained):
2345             Unchanged, just moved lower down the file.
2346         (WebCore::TextAutosizer::containerShouldbeAutosized):
2347             Checks that the block is wrappable, and also that contentHeightIsConstrained is false.
2348         (WebCore::TextAutosizer::measureDescendantTextWidth):
2349             Use containerShouldbeAutosized instead of contentHeightIsConstrained.
2350         * rendering/TextAutosizer.h:
2351             Declared containerShouldbeAutosized.
2352
2353 2012-12-14  Vsevolod Vlasov  <vsevik@chromium.org>
2354
2355         Web Inspector: Duplicate scripts appear in workspace when script was referenced by url with a fragment part.
2356         https://bugs.webkit.org/show_bug.cgi?id=105004
2357
2358         Reviewed by Alexander Pavlov.
2359
2360         * inspector/front-end/NetworkUISourceCodeProvider.js:
2361         (WebInspector.NetworkUISourceCodeProvider.prototype._parsedScriptSource):
2362
2363 2012-12-14  Kunihiko Sakamoto  <ksakamoto@chromium.org>
2364
2365         Hours field of date/time input UI should respect step attribute
2366         https://bugs.webkit.org/show_bug.cgi?id=104993
2367
2368         Reviewed by Kent Tamura.
2369
2370         This patch makes step-up/-down UI of the hours field respect step attribute when possible.
2371
2372         Test: fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer.html
2373
2374         * html/shadow/DateTimeEditElement.cpp:
2375         (WebCore::DateTimeEditBuilder::visitField): Pass step parameters to the hour field constructor.
2376         * html/shadow/DateTimeFieldElements.cpp:
2377         (WebCore::DateTimeHourFieldElement::DateTimeHourFieldElement): Add Parameters argument.
2378         (WebCore::DateTimeHourFieldElement::create): Ditto.
2379         * html/shadow/DateTimeFieldElements.h:
2380         (DateTimeHourFieldElement): Ditto.
2381
2382 2012-12-14  Yury Semikhatsky  <yurys@chromium.org>
2383
2384         Unreviewed. Windows compilation fix after r137728.
2385
2386         * inspector/InspectorAllInOne.cpp:
2387
2388 2012-12-14  Shinya Kawanaka  <shinyak@chromium.org>
2389
2390         [Shadow DOM] ShadowRoot.getElementById() should work outside document.
2391         https://bugs.webkit.org/show_bug.cgi?id=87815
2392
2393         Reviewed by Hajime Morita.
2394
2395         ShadowRoot.getElementById() didn't work if ShadowRoot is outside document. We need to update id when an element
2396         is in ShadowTree event if it is not in document.
2397
2398         For performance reason, we introduce IsInShadowTree flag, which enables us to check isInTreeScope() fast.
2399         This is maintained in Element::insertedInto and removedFrom. Here, we're anxious about performance regression,
2400         however our benchmark result shows this doesn't regress the performance.
2401
2402         I've measured Dromaeo/dom-modify.html and Parser/html5-full-render.html 2 times.
2403
2404         Dromaeo/dom-modify.html
2405              35.21,   35.27 [runs/s] --->   35.76,   35.56 [runs/s]
2406         Parser/html5-full-render.html
2407            4328.51, 4254.94 [ms]     ---> 4277.14, 4222.43 [ms]
2408
2409         Test: fast/dom/shadow/getelementbyid-in-orphan.html
2410
2411         * dom/Element.cpp:
2412         (WebCore::Element::insertedInto):
2413         * dom/Element.h:
2414         (WebCore::Element::updateId):
2415         * dom/Node.cpp:
2416         (WebCore::Node::insertedInto): If the parent node is in shadow tree, this node should be also in the same shadow tree.
2417         Since this node is inserted, parentOrHostNode() will not be null.
2418         (WebCore::Node::removedFrom): When node is removed from ShadowTree, its treeScope() should not be ShadowRoot.
2419         * dom/Node.h:
2420         (Node):
2421         (WebCore::Node::isInShadowTree):
2422         (WebCore::Node::isInTreeScope):
2423
2424 2012-12-14  Antoine Quint  <graouts@apple.com>
2425
2426         LayerTreeAgent should only be enabled upon restore if it was previously in the enabled state
2427         https://bugs.webkit.org/show_bug.cgi?id=104887
2428
2429         Reviewed by Pavel Feldman.
2430
2431         Check that we were previously in the enabled state before re-enabling the agent upon restore,
2432         as suggested by Pavel Feldman in follow-up discussion to https://bugs.webkit.org/show_bug.cgi?id=103513.
2433
2434         * inspector/InspectorLayerTreeAgent.cpp:
2435         (WebCore::InspectorLayerTreeAgent::restore):
2436
2437 2012-12-14  Eugene Klyuchnikov  <eustas@chromium.org>
2438
2439         Web Inspector: CPU Profile: Search in "heavy" mode is very slow.
2440         https://bugs.webkit.org/show_bug.cgi?id=103682
2441
2442         Reviewed by Pavel Feldman.
2443
2444         In "heavy" mode the searchable tree is much larger than original tree.
2445         That is why search can cause watchdog timer fired.
2446
2447         Simple optimization makes search much faster.
2448
2449         * inspector/front-end/CPUProfileView.js:
2450         (WebInspector.CPUProfileView.prototype.searchCanceled):
2451         Fix cleanup.
2452         (WebInspector.CPUProfileView.prototype.matchesQuery):
2453         Precompute regexp.
2454         (WebInspector.CPUProfileView.prototype.performSearch):
2455         Use precomputed regexp instead of generating one on each iteration.
2456
2457 2012-12-13  Yury Semikhatsky  <yurys@chromium.org>
2458
2459         Web Inspector: collect native heap graph and report it to the front-end
2460         https://bugs.webkit.org/show_bug.cgi?id=104888
2461
2462         Reviewed by Pavel Feldman.
2463
2464         Added an option to serialize native heap graph in a format similar to that
2465         of JS heap profiler and send it in reply to getProcessMemoryDistribution
2466         command. This is a first attempt and we likely change the report mechanism to
2467         use a stream instread of sending whole graph at once.
2468
2469         * CMakeLists.txt:
2470         * GNUmakefile.list.am:
2471         * Target.pri:
2472         * WebCore.gypi:
2473         * WebCore.vcproj/WebCore.vcproj:
2474         * WebCore.xcodeproj/project.pbxproj:
2475         * inspector/HeapGraphSerializer.cpp: Added.
2476         (WebCore):
2477         (HeapGraphNode):
2478         (WebCore::HeapGraphNode::HeapGraphNode):
2479         (HeapGraphEdge):
2480         (WebCore::HeapGraphEdge::HeapGraphEdge):
2481         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
2482         (WebCore::HeapGraphSerializer::~HeapGraphSerializer):
2483         (WebCore::HeapGraphSerializer::serialize):
2484         (WebCore::HeapGraphSerializer::reportNode):
2485         (WebCore::HeapGraphSerializer::reportEdge):
2486         (WebCore::HeapGraphSerializer::reportLeaf):
2487         (WebCore::HeapGraphSerializer::reportBaseAddress):
2488         (WebCore::HeapGraphSerializer::adjutEdgeTargets):
2489         (WebCore::HeapGraphSerializer::addString):
2490         * inspector/HeapGraphSerializer.h: Copied from Source/WebCore/inspector/InspectorMemoryAgent.h.
2491         (WebCore):
2492         (HeapGraphSerializer):
2493         * inspector/Inspector.json:
2494         * inspector/InspectorMemoryAgent.cpp:
2495         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
2496         * inspector/InspectorMemoryAgent.h:
2497         (InspectorMemoryAgent):
2498         * inspector/MemoryInstrumentationImpl.cpp:
2499         (WebCore::MemoryInstrumentationClientImpl::reportNode):
2500         (WebCore):
2501         (WebCore::MemoryInstrumentationClientImpl::reportEdge):
2502         (WebCore::MemoryInstrumentationClientImpl::reportLeaf):
2503         (WebCore::MemoryInstrumentationClientImpl::reportBaseAddress):
2504         * inspector/MemoryInstrumentationImpl.h:
2505         (WebCore):
2506         (WebCore::MemoryInstrumentationClientImpl::MemoryInstrumentationClientImpl):
2507         (MemoryInstrumentationClientImpl):
2508
2509 2012-12-14  Yoshifumi Inoue  <yosin@chromium.org>
2510
2511         Handling autoscroll in EventHandler should be re-factor
2512         https://bugs.webkit.org/show_bug.cgi?id=104764
2513
2514         Reviewed by Hajime Morita.
2515
2516         This patch introduces new class AutoscrollController for moving autoscroll
2517         and panscroll from EventHandler class for ease of maintenance of
2518         EventHandler and ease of adding autoscroll related features, e.g. autoscroll
2519         during drag-and-drop, autoscoll by gesture.
2520
2521         No new tests. This patch doesn't change behavior.
2522
2523         * CMakeLists.txt: Changed to add page/AutoscrollController.cpp
2524         * GNUmakefile.list.am:  Changed to add page/AutoscrollController.{cpp,h}
2525         * Target.pri:  Changed to add page/AutoscrollController.cpp
2526         * WebCore.gypi: Changed to add page/AutoscrollController.{cpp,h}
2527         * WebCore.vcproj/WebCore.vcproj: Changed to add page/AutoscrollController.{cpp,h}
2528         * WebCore.xcodeproj/project.pbxproj: Changed to add page/AutoscrollController.{cpp,h}
2529         * page/AutoscrollController.cpp: Added.
2530         (WebCore::getMainFrame): Helper function.
2531         (WebCore::AutoscrollController::AutoscrollController): Moved from EventHandler.
2532         (WebCore::AutoscrollController::autoscrollRenderer): Moved from EventHandler.
2533         (WebCore::AutoscrollController::autoscrollInProgress): Moved from EventHandler.
2534         (WebCore::AutoscrollController::startAutoscrollForSelection): Replacement of EventHandler::handleAutoscroll().
2535         (WebCore::AutoscrollController::stopAutoscrollTimer): Moveed from EventHandler.
2536         (WebCore::AutoscrollController::updateAutoscrollRenderer): ditto
2537         (WebCore::AutoscrollController::didPanScrollStart): Added for updating pan scrolling status of main frame.
2538         (WebCore::AutoscrollController::didPanScrollStop): ditto
2539         (WebCore::AutoscrollController::handleMouseReleaseEvent): Extracted from EventHandler.
2540         (WebCore::AutoscrollController::panScrollInProgress): Replacement of EventHandler::m_panScrollInProgress.
2541         (WebCore::AutoscrollController::startPanScrolling): Moved from EventHandler::startPanScrolling()
2542         (WebCore::AutoscrollController::autoscrollTimerFired): Moved from EventHandler::autoscrollTimerFired().
2543         (WebCore::AutoscrollController::startAutoscrollTimer): Moved from EventHandler::startAutoscrollTimer().
2544         (WebCore::AutoscrollController::updatePanScrollState): Moved from EventHandler::updatePanScrollState().
2545         * page/AutoscrollController.h: Added.
2546         (AutoscrollController):
2547         * page/EventHandler.cpp:
2548         (WebCore::EventHandler::EventHandler): Changed autoscroll and panscroll related member variable initializations to m_autoscrollController initialization.
2549         (WebCore::EventHandler::handleMouseDraggedEvent): Changed to call AutoscrollController::startAutoscrollForSelection().
2550         (WebCore::EventHandler::handleMouseReleaseEvent): Changed to remove m_autoscrollInProgress reference.
2551         (WebCore::EventHandler::didPanScrollStart): Added for updating pan scrolling status of main frame.
2552         (WebCore::EventHandler::didPanScrollStop): ditto
2553         (WebCore::EventHandler::startPanScrolling): Changed to call AutoscrollController::startPanScrolling().
2554         (WebCore::EventHandler::autoscrollRenderer): Changed to use AutoscrollController.
2555         (WebCore::EventHandler::updateAutoscrollRenderer): ditto
2556         (WebCore::EventHandler::autoscrollInProgress): ditto
2557         (WebCore::EventHandler::panScrollInProgress): Added to replace m_panScrollInProgress.
2558         (WebCore::EventHandler::stopAutoscrollTimer): Changed to use AutoscrollController.
2559         (WebCore::EventHandler::selectCursor): Changed to use panScrollInProgress().
2560         (WebCore::EventHandler::handleMousePressEvent): Chagned to call AutoscrollController::handleMousePressEvent().
2561         (WebCore::EventHandler::keyEvent): Changed to use panScrollInProgress().
2562         * page/EventHandler.h:
2563         (WebCore::EventHandler::autoscrollController): Added for using main frame's panScrollInProgress().
2564         (WebCore::EventHandler::mouseDownWasInSubframe): Added for AutoscrollController.
2565         * rendering/RenderBox.cpp:
2566         (WebCore::RenderBox::canAutoscroll): Moved from EventHandler.cpp.
2567         (WebCore::RenderBox::findAutoscrollable): Moved from EventHandler.cpp.
2568         * rendering/RenderBox.h:
2569         (RenderBox): Added new functions canAutoscroll() and findAutoscrollable().
2570
2571 2012-12-14  David Dorwin  <ddorwin@chromium.org>
2572
2573         EME v0.1: Report defaultURL in KeyMessage.
2574         https://bugs.webkit.org/show_bug.cgi?id=104284
2575
2576         Reviewed by Darin Fisher.
2577
2578         Passes defaultURL down from the media engine to HTMLMediaElement.
2579         Only Valid URLs will be passed.
2580
2581         No test because Clear Key does not provide a defaultURL (in v0.1).
2582
2583         * html/HTMLMediaElement.cpp:
2584         (WebCore::HTMLMediaElement::mediaPlayerKeyMessage):
2585         * html/HTMLMediaElement.h:
2586         (HTMLMediaElement):
2587         * platform/graphics/MediaPlayer.cpp:
2588         (WebCore::MediaPlayer::keyMessage):
2589         * platform/graphics/MediaPlayer.h:
2590         (WebCore::MediaPlayerClient::mediaPlayerKeyAdded):
2591         (WebCore::MediaPlayerClient::mediaPlayerKeyError):
2592         (WebCore::MediaPlayerClient::mediaPlayerKeyMessage):
2593         (WebCore::MediaPlayerClient::mediaPlayerKeyNeeded):
2594         (MediaPlayer):
2595
2596 2012-12-13  Hajime Morrita  <morrita@google.com>
2597
2598         ContentDistributor and ShadowRootContentDistributionData should use RefPtr to hold elements.
2599         https://bugs.webkit.org/show_bug.cgi?id=104918
2600
2601         Reviewed by Kentaro Hara.
2602
2603         This change turns some raw pointers to RefPtrs.
2604
2605         No new tests. Hard to write reliable fast tests since the error
2606         reproduction needs GC to run in certain timing. Although original
2607         report has a repdocution, it takes a few seconds before crash and
2608         isn't suited for a layout test.
2609
2610         * dom/ShadowRoot.cpp:
2611         (WebCore::ShadowRoot::insertionPointList):
2612         * dom/ShadowRoot.h:
2613         (ShadowRoot):
2614         * html/shadow/ContentDistributor.cpp:
2615         (WebCore::ShadowRootContentDistributionData::ensureInsertionPointList):
2616         (WebCore::ContentDistributor::findInsertionPointFor):
2617         (WebCore::ContentDistributor::distribute):
2618         (WebCore::ContentDistributor::invalidate):
2619         * html/shadow/ContentDistributor.h:
2620         (ShadowRootContentDistributionData):
2621         (ContentDistributor):
2622
2623 2012-12-13  Hajime Morrita  <morrita@google.com>
2624
2625         NodeRenderingContext is slow due to ComposedShadowTreeWalker
2626         https://bugs.webkit.org/show_bug.cgi?id=104332
2627
2628         Reviewed by Dimitri Glazkov.
2629
2630         NodeRenderingContext has some slowness due to the complexity of
2631         ComposedShadowTreeWalker that NRC relies on. This change
2632         creates some fast paths to address such slowness.
2633
2634         = NodeRenderingTraversal module:
2635
2636         This change introduces NodeRenderingTraversal namespace, a sister
2637         of NodeTraversal. NRT consists of a set of tree traversal
2638         functions that is responsible for traversal in NRC.  Before this
2639         change, NRC directly used CSTW. This NRT module hides and narrows
2640         the usage of CSTW.
2641
2642         - Traversals provided by NRT have fast paths. In many case, such traversals
2643           don't need to use CSTW and just goes to neighboring nodes in a plain DOM way.
2644         - It also handles NRC specific traversal concerns like pseudo elements.
2645           CSTW::pseudoAwareNextSibling() and CSTW::pseudoAwarePreviousSibling() are
2646           merged into this module.
2647         - CSTW::ParentTraversalDetails is moved and renamed to
2648           NRT::ParentDetails with small modification. This is a pure
2649           refactoring: As the name implies, This class is used only by NRC
2650           and used during a traversal there.
2651
2652         NodeRenderingTraversal is an isolation layer between generic DOM and CSTW. This hides CSTW
2653         behind the wall and will help further reduction of its usage.
2654
2655         = Node::NeedsShadowTreeWalkerFlag flag:
2656
2657         NRT fast path is enabled by newly introduced NeedsShadowTreeWalker
2658         node flag. Each DOM node is now markd as NeedsShadowTreeWalker if
2659         it requires non-trivial traversal in NRT which uses CSTW. This
2660         means that each node can go fast path unless it is marked with this flag.
2661
2662         A node is marked as it NeedsShadowTreeWalker if:
2663
2664         - The node is a shadow boundary like InsertionPoint or ShadowRoot,
2665         - The node has pseudo elements like generated content or
2666         - The node is a pseudo element.
2667
2668         This criteria is defined in Node::needsShadowTreeWalkerSlow(). The node actually needs
2669         the walker if the node or its parent is marked with this flag.
2670
2671         The original idea of this change was demonstrated by Antti Koivisto on bug 103208 and bug 104507.
2672         This chagne has 2-3% speedup on Dromaeo/dom-modify/innerHTML on Apple Mac.
2673
2674         No new tests. Covered by existing tests.
2675
2676         * CMakeLists.txt:
2677         * GNUmakefile.list.am:
2678         * Target.pri:
2679         * WebCore.gypi:
2680         * WebCore.xcodeproj/project.pbxproj:
2681         * dom/ComposedShadowTreeWalker.cpp:
2682         * dom/ComposedShadowTreeWalker.h:
2683         (ComposedShadowTreeWalker): Move some part to NodeRenderingTraversal
2684         * dom/ContainerNode.h:
2685         (WebCore::Node::needsShadowTreeWalker): Added. This is located here since it refers ContainerNode definition.
2686         (WebCore):
2687         * dom/DOMAllInOne.cpp:
2688         * dom/Element.cpp:
2689         (WebCore::Element::updatePseudoElement): Refactored.
2690         (WebCore::Element::hasPseudoElements): Ditto.
2691         (WebCore::Element::pseudoElement): Ditto.
2692         (WebCore::Element::setPseudoElement): Refactored and added a flag update logic.
2693         (WebCore):
2694         * dom/Element.h:
2695         (Element):
2696         (WebCore::Element::beforePseudoElement): Refactored.
2697         (WebCore::Element::afterPseudoElement): Refactored.
2698         * dom/ElementRareData.h:
2699         (WebCore::ElementRareData::hasPseudoElements): Factored out.
2700         * dom/ElementShadow.cpp:
2701         (WebCore::ElementShadow::addShadowRoot): Added a flag update logic.
2702         * dom/Node.cpp:
2703         (WebCore::Node::needsShadowTreeWalkerSlow): Added.
2704         * dom/Node.h:
2705         (WebCore::Node::isInsertionPointNode): Added.
2706         (Node):
2707         (WebCore::Node::isInsertionPoint): Changed to use NeedsShadowTreeWalkerFlag.
2708         (WebCore::Node::setNeedsShadowTreeWalker):
2709         (WebCore::Node::resetNeedsShadowTreeWalker):
2710         * dom/NodeRenderingContext.cpp: Adopted NodeRenderingTraversal.
2711         (WebCore::NodeRenderingContext::NodeRenderingContext):
2712         (WebCore::NodeRenderingContext::nextRenderer):
2713         (WebCore::NodeRenderingContext::previousRenderer):
2714         (WebCore::NodeRenderingContext::parentRenderer):
2715         (WebCore::NodeRenderingContext::shouldCreateRenderer):
2716         * dom/NodeRenderingContext.h: Ditto.
2717         (NodeRenderingContext):
2718         (WebCore::NodeRenderingContext::parentNodeForRenderingAndStyle):
2719         * dom/NodeRenderingTraversal.cpp: Added.
2720         (WebCore):
2721         (NodeRenderingTraversal):
2722         (WebCore::NodeRenderingTraversal::ParentDetails::didTraverseInsertionPoint): Moved from ComposedShadowTreeWalker
2723         (WebCore::NodeRenderingTraversal::ParentDetails::didTraverseShadowRoot): Ditto.
2724         (WebCore::NodeRenderingTraversal::parentSlow): Ditto.
2725         (WebCore::NodeRenderingTraversal::nextSiblingSlow): Ditto. The original was pseudoAwareNextSibling.
2726         (WebCore::NodeRenderingTraversal::previousSiblingSlow): Ditto. The original was pseudoAwarePreviousSibling.
2727         * dom/NodeRenderingTraversal.h: Added.
2728         (WebCore):
2729         (NodeRenderingTraversal):
2730         (ParentDetails): Moved from ComposedShadowTreeWalker.
2731         (WebCore::NodeRenderingTraversal::ParentDetails::ParentDetails):
2732         (WebCore::NodeRenderingTraversal::ParentDetails::insertionPoint):
2733         (WebCore::NodeRenderingTraversal::ParentDetails::resetStyleInheritance):
2734         (WebCore::NodeRenderingTraversal::ParentDetails::outOfComposition):
2735         (WebCore::NodeRenderingTraversal::ParentDetails::childWasOutOfComposition):
2736         (WebCore::NodeRenderingTraversal::ParentDetails::operator==):
2737         (WebCore::NodeRenderingTraversal::parent):
2738         (WebCore::NodeRenderingTraversal::nextSibling):
2739         (WebCore::NodeRenderingTraversal::previousSibling):
2740         * dom/PseudoElement.cpp:
2741         (WebCore::PseudoElement::PseudoElement): Added an assertion.
2742         * dom/Text.cpp:
2743         * html/HTMLOptGroupElement.cpp: Added a #include which revealed by a chagne on NodeRenderingContext.h
2744         * html/HTMLOptionElement.cpp: Ditto.
2745         * html/HTMLProgressElement.cpp: Dito.
2746         * html/shadow/InsertionPoint.h: Added an override of isInsertionPointNode().
2747
2748 2012-12-13  Kent Tamura  <tkent@chromium.org>
2749
2750         Refactoring: Fix indentation of ChromeClient.h
2751         https://bugs.webkit.org/show_bug.cgi?id=104989
2752
2753         Reviewed by Kentaro Hara.
2754
2755         The contents of an outermost namespace block should not be indented.
2756         http://www.webkit.org/coding/coding-style.html#indentation-namespace
2757
2758         No behavior change.
2759
2760         * page/ChromeClient.h:
2761
2762 2012-12-13  Kunihiko Sakamoto  <ksakamoto@chromium.org>
2763
2764         Seconds/Minutes field of date/time input UI should respect step attribute
2765         https://bugs.webkit.org/show_bug.cgi?id=104985
2766
2767         Reviewed by Kent Tamura.
2768
2769         This patch makes step-up/-down UI of the seconds and minutes fields respect
2770         step attribute when possible.
2771
2772         Test: fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer.html
2773
2774         * html/shadow/DateTimeEditElement.cpp:
2775         (DateTimeEditBuilder):
2776         (WebCore::DateTimeEditBuilder::visitField): Compute step parameters for seconds and minutes fields, and pass it to the field element constructors.
2777         (WebCore::DateTimeEditBuilder::createNumericFieldParameters): Added.
2778         * html/shadow/DateTimeFieldElements.cpp:
2779         (WebCore::DateTimeMillisecondFieldElement::DateTimeMillisecondFieldElement): Use Parameters instead of step and stepBase.
2780         (WebCore::DateTimeMillisecondFieldElement::create): Ditto.
2781         (WebCore::DateTimeMinuteFieldElement::DateTimeMinuteFieldElement): Add Parameters argument.
2782         (WebCore::DateTimeMinuteFieldElement::create): Ditto.
2783         (WebCore::DateTimeSecondFieldElement::DateTimeSecondFieldElement): Ditto.
2784         (WebCore::DateTimeSecondFieldElement::create): Ditto.
2785         * html/shadow/DateTimeFieldElements.h:
2786         (DateTimeMillisecondFieldElement): Use Parameters instead of step and stepBase.
2787         (DateTimeMinuteFieldElement): Add Parameters argument.
2788         (DateTimeSecondFieldElement): Ditto.
2789         * html/shadow/DateTimeNumericFieldElement.cpp:
2790         (WebCore::DateTimeNumericFieldElement::DateTimeNumericFieldElement): Use Parameters instead of step and stepBase.
2791         * html/shadow/DateTimeNumericFieldElement.h:
2792         (DateTimeNumericFieldElement):
2793         (WebCore::DateTimeNumericFieldElement::Parameters::Parameters):
2794         (Parameters): Added.
2795
2796 2012-12-13  Filip Pizlo  <fpizlo@apple.com>
2797
2798         Attempt to rationalize and simplify WTF::binarySearch
2799         https://bugs.webkit.org/show_bug.cgi?id=104890
2800
2801         Reviewed by Maciej Stachowiak.
2802
2803         Switch to using the new binarySearch() API. No change in behavior, so no new tests.
2804
2805         * svg/animation/SVGSMILElement.cpp:
2806         (WebCore::SVGSMILElement::findInstanceTime):
2807
2808 2012-12-13  Takashi Sakamoto  <tasak@google.com>
2809
2810         [Shadow DOM]: scoped styles are not applied in the cascade order.
2811         https://bugs.webkit.org/show_bug.cgi?id=103239
2812
2813         Reviewed by Dimitri Glazkov.
2814
2815         If the scoping elements of two declarations have an ancestor/
2816         descendant relationship, the declaration whose scoping element is
2817         the descendant should win.
2818         c.f. http://dev.w3.org/csswg/css3-cascade/#cascade
2819
2820         Test: fast/css/style-scoped/style-scoped-nested.html
2821               fast/css/style-scoped/style-scoped-with-important-rule.html
2822
2823         * css/RuleSet.cpp:
2824         (WebCore::RuleSet::addRule):
2825         Removed specificity for @host @-rules. Now @host @-rules use the
2826         cascading order instead.
2827         * css/RuleSet.h:
2828         Removed increaseSpecificity. The method is used by only @host @-rules.
2829         * css/StyleResolver.cpp:
2830         (WebCore::StyleResolver::matchScopedAuthorRules):
2831         (WebCore::StyleResolver::matchHostRules):
2832         (WebCore::StyleResolver::matchAuthorRules):
2833         Modified to invoke sortAndTransferMatchedRules per scoping element.
2834         The order of "matchXXXRules" must be the same as the cascading order.
2835         So matchHostRules was invoked after collecting all scoped author rules.
2836         * css/StyleScopeResolver.cpp:
2837         (WebCore::StyleScopeResolver::addHostRule):
2838         Removed RuleIsHostRule. We don't need the flag.
2839         * html/HTMLStyleElement.cpp:
2840         (WebCore::HTMLStyleElement::registerWithScopingNode):
2841         Needs to pass the last test case of style-scoped-nested.html.
2842         When appending some style element to a shadow root, we should recalc
2843         styles of all elements in the shadow dom tree. And if the style
2844         element has @host @-rules, we have to update the host's style.
2845
2846 2012-12-13  Filip Pizlo  <fpizlo@apple.com>
2847
2848         MediaPlayerPrivateAVFoundation::m_inbandTrackConfigurationPending is unused except when HAVE(AVFOUNDATION_TEXT_TRACK_SUPPORT)
2849         https://bugs.webkit.org/show_bug.cgi?id=104987
2850
2851         Rubber stamped by Michael Saboff.
2852
2853         No change in behavior so no new tests.
2854
2855         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2856         (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
2857         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2858         (MediaPlayerPrivateAVFoundation):
2859
2860 2012-12-13  Kentaro Hara  <haraken@chromium.org>
2861
2862         Unreviewed. Rebaselined run-bindings-tests results.
2863
2864         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
2865         (JSTestCustomNamedGetter):
2866         * bindings/scripts/test/JS/JSTestEventTarget.h:
2867         (JSTestEventTarget):
2868
2869 2012-12-13  Yoshifumi Inoue  <yosin@chromium.org>
2870
2871         Unreviewed, rolling out r137691.
2872         http://trac.webkit.org/changeset/137691
2873         https://bugs.webkit.org/show_bug.cgi?id=104764
2874
2875         panscroll test on AppleWin failed
2876
2877         * CMakeLists.txt:
2878         * GNUmakefile.list.am:
2879         * Target.pri:
2880         * WebCore.gypi:
2881         * WebCore.vcproj/WebCore.vcproj:
2882         * WebCore.xcodeproj/project.pbxproj:
2883         * page/AutoscrollController.cpp: Removed.
2884         * page/AutoscrollController.h: Removed.
2885         * page/EventHandler.cpp:
2886         (WebCore):
2887         (WebCore::EventHandler::EventHandler):
2888         (WebCore::canAutoscroll):
2889         (WebCore::EventHandler::handleMouseDraggedEvent):
2890         (WebCore::EventHandler::handleMouseReleaseEvent):
2891         (WebCore::EventHandler::handleAutoscroll):
2892         (WebCore::EventHandler::autoscrollTimerFired):
2893         (WebCore::EventHandler::startPanScrolling):
2894         (WebCore::EventHandler::updatePanScrollState):
2895         (WebCore::EventHandler::autoscrollRenderer):
2896         (WebCore::EventHandler::updateAutoscrollRenderer):
2897         (WebCore::EventHandler::setAutoscrollRenderer):
2898         (WebCore::EventHandler::startAutoscrollTimer):
2899         (WebCore::EventHandler::stopAutoscrollTimer):
2900         (WebCore::EventHandler::selectCursor):
2901         (WebCore::EventHandler::handleMousePressEvent):
2902         (WebCore::EventHandler::keyEvent):
2903         * page/EventHandler.h:
2904         (EventHandler):
2905         (WebCore::EventHandler::autoscrollInProgress):
2906         * rendering/RenderBox.cpp:
2907         * rendering/RenderBox.h:
2908         (RenderBox):
2909
2910 2012-12-13  Kentaro Hara  <haraken@chromium.org>
2911
2912         ChildNodesLazySnapshot::nextNode() can crash
2913         https://bugs.webkit.org/show_bug.cgi?id=104982
2914
2915         Reviewed by Hajime Morita.
2916
2917         ChildNodesLazySnapshot::nextNode() can crash for
2918         fast/dom/insertedIntoDocument-no-crash.html.
2919         The root cause is that ChildNodesLazySnapshot::m_currentNode
2920         was not a RefPtr. This patch changes it to a RefPtr.
2921
2922         Test: fast/dom/insertedIntoDocument-no-crash.html
2923
2924         * dom/ContainerNode.h:
2925         (WebCore::ChildNodesLazySnapshot::nextNode):
2926         (WebCore::ChildNodesLazySnapshot::takeSnapshot):
2927         (ChildNodesLazySnapshot):
2928
2929 2012-12-13  Philip Rogers  <pdr@google.com>
2930
2931         Clear m_timeContainer on SVGSMILElement removal.
2932         https://bugs.webkit.org/show_bug.cgi?id=104972
2933
2934         Reviewed by Abhishek Arya.
2935
2936         This patch fixes a regression introduced by r137509 where we did not clear
2937         m_timeContainer in SVGSMILElement::removedFrom.
2938
2939         Test: svg/custom/removed-from-animation-crash.html
2940
2941         * svg/animation/SVGSMILElement.cpp:
2942         (WebCore::SVGSMILElement::removedFrom):
2943
2944 2012-12-13  Filip Pizlo  <fpizlo@apple.com>
2945
2946         Named lookups on HTML documents produce inconsistent results in JavaScriptCore bindings
2947         https://bugs.webkit.org/show_bug.cgi?id=104623
2948
2949         Reviewed by Geoffrey Garen.
2950
2951         All DOM objects that have named getters or directly override getOwnPropertySlot are now marked as
2952         HasImpureGetOwnPropertySlot.
2953
2954         Tests: fast/js/prototype-chain-caching-with-impure-get-own-property-slot-traps
2955                fast/js/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps
2956
2957         * bindings/scripts/CodeGeneratorJS.pm:
2958         (GenerateHeader):
2959
2960 2012-12-13  Xianzhu Wang  <wangxianzhu@chromium.org>
2961
2962         Out-of-view check of fixed position element in frame is incorrect when page is scaled
2963         https://bugs.webkit.org/show_bug.cgi?id=104943
2964
2965         Reviewed by Simon Fraser.
2966
2967         Use frameScaleFactor instead of pageScaleFactor to scale the layer bounds.
2968
2969         Tests: compositing/layer-creation/fixed-position-out-of-view-scaled-iframe-scroll.html
2970                compositing/layer-creation/fixed-position-out-of-view-scaled-iframe.html
2971
2972         * rendering/RenderLayerCompositor.cpp:
2973         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
2974
2975 2012-12-13  Bear Travis  <betravis@adobe.com>
2976
2977         Positioned replaced elements should resolve vertical margins against their containing
2978         block's logical width
2979         https://bugs.webkit.org/show_bug.cgi?id=103579
2980
2981         Reviewed by Emil A Eklund.
2982
2983         According to the CSS box model & writing modes specifications, percentage margin
2984         & padding values, including top & bottom, should be resolved based on the
2985         containing block's logical width (logical with respect to the containing block's
2986         writing mode).
2987         http://www.w3.org/TR/CSS2/box.html#margin-properties
2988         http://dev.w3.org/csswg/css3-writing-modes/#dimension-mapping
2989
2990         Previously, a positioned replaced element resolved margin before/after relative to
2991         its inline direction (containerLogicalHeight), and margin start/end relative to
2992         its block direction (containerLogicalWidth). This patch measures the container's
2993         logical width in its own inline direction (containerRelativeLogicalWidth) to
2994         resolve all margin percentage values.
2995
2996         Test: fast/writing-mode/percentage-margins-absolute-replaced.html
2997
2998         * rendering/RenderBox.cpp:
2999         (WebCore::RenderBox::computePositionedLogicalWidthReplaced): Calculate the logical
3000         width of the container, and use it to calculate margins.
3001         (WebCore::RenderBox::computePositionedLogicalHeightReplaced): Ditto.
3002
3003 2012-12-13  Yoshifumi Inoue  <yosin@chromium.org>
3004
3005         Handling autoscroll in EventHandler should be re-factor
3006         https://bugs.webkit.org/show_bug.cgi?id=104764
3007
3008         Reviewed by Hajime Morita.
3009
3010         This patch introduces new class AutoscrollController for moving autoscroll
3011         and panscroll from EventHandler class for ease of maintenance of
3012         EventHandler and ease of adding autoscroll related features, e.g. autoscroll
3013         during drag-and-drop, autoscoll by gesture.
3014
3015         No new tests. This patch doesn't change behavior.
3016
3017         * CMakeLists.txt: Changed to add page/AutoscrollController.cpp
3018         * GNUmakefile.list.am:  Changed to add page/AutoscrollController.{cpp,h}
3019         * Target.pri:  Changed to add page/AutoscrollController.cpp
3020         * WebCore.gypi: Changed to add page/AutoscrollController.{cpp,h}
3021         * WebCore.vcproj/WebCore.vcproj: Changed to add page/AutoscrollController.{cpp,h}
3022         * WebCore.xcodeproj/project.pbxproj: Changed to add page/AutoscrollController.{cpp,h}
3023         * page/AutoscrollController.cpp: Added.
3024         (WebCore::getMainFrame): Helper function.
3025         (WebCore::AutoscrollController::AutoscrollController): Moved from EventHandler.
3026         (WebCore::AutoscrollController::autoscrollRenderer): Moved from EventHandler.
3027         (WebCore::AutoscrollController::autoscrollInProgress): Moved from EventHandler.
3028         (WebCore::AutoscrollController::startAutoscrollForSelection): Replacement of EventHandler::handleAutoscroll().
3029         (WebCore::AutoscrollController::stopAutoscrollTimer): Moveed from EventHandler.
3030         (WebCore::AutoscrollController::updateAutoscrollRenderer): ditto
3031         (WebCore::AutoscrollController::didPanScrollStart): Added for updating pan scrolling status of main frame.
3032         (WebCore::AutoscrollController::didPanScrollStop): ditto
3033         (WebCore::AutoscrollController::handleMouseReleaseEvent): Extracted from EventHandler.
3034         (WebCore::AutoscrollController::panScrollInProgress): Replacement of EventHandler::m_panScrollInProgress.
3035         (WebCore::AutoscrollController::startPanScrolling): Moved from EventHandler::startPanScrolling()
3036         (WebCore::AutoscrollController::autoscrollTimerFired): Moved from EventHandler::autoscrollTimerFired().
3037         (WebCore::AutoscrollController::startAutoscrollTimer): Moved from EventHandler::startAutoscrollTimer().
3038         (WebCore::AutoscrollController::updatePanScrollState): Moved from EventHandler::updatePanScrollState().
3039         * page/AutoscrollController.h: Added.
3040         (AutoscrollController):
3041         * page/EventHandler.cpp:
3042         (WebCore::EventHandler::EventHandler): Changed autoscroll and panscroll related member variable initializations to m_autoscrollController initialization.
3043         (WebCore::EventHandler::handleMouseDraggedEvent): Changed to call AutoscrollController::startAutoscrollForSelection().
3044         (WebCore::EventHandler::handleMouseReleaseEvent): Changed to remove m_autoscrollInProgress reference.
3045         (WebCore::EventHandler::didPanScrollStart): Added for updating pan scrolling status of main frame.
3046         (WebCore::EventHandler::didPanScrollStop): ditto
3047         (WebCore::EventHandler::startPanScrolling): Changed to call AutoscrollController::startPanScrolling().
3048         (WebCore::EventHandler::autoscrollRenderer): Changed to use AutoscrollController.
3049         (WebCore::EventHandler::updateAutoscrollRenderer): ditto
3050         (WebCore::EventHandler::autoscrollInProgress): ditto
3051         (WebCore::EventHandler::panScrollInProgress): Added to replace m_panScrollInProgress.
3052         (WebCore::EventHandler::stopAutoscrollTimer): Changed to use AutoscrollController.
3053         (WebCore::EventHandler::selectCursor): Changed to use panScrollInProgress().
3054         (WebCore::EventHandler::handleMousePressEvent): Chagned to call AutoscrollController::handleMousePressEvent().
3055         (WebCore::EventHandler::keyEvent): Changed to use panScrollInProgress().
3056         * page/EventHandler.h:
3057         (WebCore::EventHandler::autoscrollController): Added for using main frame's panScrollInProgress().
3058         (WebCore::EventHandler::mouseDownWasInSubframe): Added for AutoscrollController.
3059         * rendering/RenderBox.cpp:
3060         (WebCore::RenderBox::canAutoscroll): Moved from EventHandler.cpp.
3061         (WebCore::RenderBox::findAutoscrollable): Moved from EventHandler.cpp.
3062         * rendering/RenderBox.h:
3063         (RenderBox): Added new functions canAutoscroll() and findAutoscrollable().
3064
3065 2012-12-13  Beth Dakin  <bdakin@apple.com>
3066
3067         https://bugs.webkit.org/show_bug.cgi?id=102599
3068         ASSERT loading Acid3 test in run-safari --debug (r135050)
3069
3070         Reviewed by Simon Fraser.
3071
3072         New flag IncludeCompositedDescendants will always calculate the layer bounds for 
3073         descendants, even when the are composited. 
3074         * rendering/RenderLayer.cpp:
3075         (WebCore::RenderLayer::calculateLayerBounds):
3076         * rendering/RenderLayer.h:
3077
3078         calculateCompositedBounds() should not include this new flag, so instead of 
3079         calling that, call calculateLayerBounds() directly with the 
3080         IncludeCompositedDescendants flag. This will get us the information we need 
3081         upfront and avoid the toggling later on. 
3082         * rendering/RenderLayerCompositor.cpp:
3083         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
3084
3085 2012-12-13  Tien-Ren Chen  <trchen@chromium.org>
3086
3087         Don't consider container nodes of other disambiguated nodes
3088         https://bugs.webkit.org/show_bug.cgi?id=104619
3089
3090         Reviewed by Eric Seidel.
3091
3092         It is not uncommon to have a clickable <div> that contains other clickable objects.
3093         This heuristic avoids excessive disambiguation in that case.
3094
3095         New unit test: WebFrameTest.DisambiguationPopupNoContainer
3096
3097         * page/TouchDisambiguation.cpp:
3098         (WebCore::findGoodTouchTargets):
3099
3100 2012-12-13  Adrienne Walker  <enne@chromium.org>
3101
3102         Unreviewed, rolling out r137645, r137646, and r137667.
3103         http://trac.webkit.org/changeset/137645
3104         http://trac.webkit.org/changeset/137646
3105         http://trac.webkit.org/changeset/137667
3106         https://bugs.webkit.org/show_bug.cgi?id=104911
3107
3108         Breaks some overflow layout tests
3109
3110         * rendering/RenderLayer.cpp:
3111         (WebCore::RenderLayer::RenderLayer):
3112         (WebCore::RenderLayer::updateDescendantDependentFlags):
3113         (WebCore::RenderLayer::addChild):
3114         (WebCore::RenderLayer::removeChild):
3115         (WebCore::RenderLayer::usesCompositedScrolling):
3116         (WebCore::RenderLayer::scrollTo):
3117         (WebCore::RenderLayer::dirtyZOrderLists):
3118         (WebCore::RenderLayer::dirtyNormalFlowList):
3119         (WebCore::RenderLayer::updateLayerListsIfNeeded):
3120         (WebCore::RenderLayer::shouldBeNormalFlowOnly):
3121         (WebCore::RenderLayer::shouldBeSelfPaintingLayer):
3122         (WebCore::RenderLayer::styleChanged):
3123         * rendering/RenderLayer.h:
3124         (RenderLayer):
3125         * rendering/RenderLayerBacking.cpp:
3126         (WebCore::layerOrAncestorIsTransformedOrUsingCompositedScrolling):
3127         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
3128         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
3129         * rendering/RenderLayerBacking.h:
3130         (RenderLayerBacking):
3131         * rendering/RenderLayerCompositor.cpp:
3132         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3133         (WebCore::RenderLayerCompositor::requiresCompositingForOverflowScrolling):
3134         * rendering/RenderLayerCompositor.h:
3135         (RenderLayerCompositor):
3136         * testing/InternalSettings.cpp:
3137         * testing/InternalSettings.h:
3138         (InternalSettings):
3139         * testing/InternalSettings.idl:
3140
3141 2012-12-13  Andreas Kling  <akling@apple.com>
3142
3143         Event dispatch: Avoid heap allocations in ensureEventAncestors() typical case.
3144         <http://webkit.org/b/104938>
3145
3146         Reviewed by Anders Carlsson.
3147
3148         Give the EventTarget and EventContext vectors an inline capacity of 32 (no science here, just a
3149         non-zero number.) As these vectors are created on the stack already, this is merely using a bit
3150         more stack space to avoid malloc()ing all the gosh-darn time.
3151
3152         Looks like ~6% improvement on Dromaeo/jslib-event-prototype.
3153
3154         * dom/EventDispatcher.cpp:
3155         (WebCore::EventRelatedTargetAdjuster::adjust):
3156         (WebCore::EventRelatedTargetAdjuster::findRelatedTarget):
3157         (WebCore::EventDispatcher::ensureEventAncestors):
3158         * dom/EventDispatcher.h:
3159         (EventRelatedTargetAdjuster):
3160         (EventDispatcher):
3161
3162 2012-12-13  James Simonsen  <simonjam@chromium.org>
3163
3164         [Resource Timing] Don't report resources with data: urls
3165         https://bugs.webkit.org/show_bug.cgi?id=104868
3166
3167         Reviewed by Tony Gentilcore.
3168
3169         Test: http/tests/w3c/webperf/submission/resource-timing/html/test_resource_ignore_data_url.html
3170
3171         * loader/cache/CachedResourceLoader.cpp:
3172         (WebCore::CachedResourceLoader::loadDone):
3173
3174 2012-12-13  Ian Vollick  <vollick@chromium.org>
3175
3176         Add a missing nullity check in RenderObject::containingBlock
3177         https://bugs.webkit.org/show_bug.cgi?id=104961
3178
3179         Reviewed by Adrienne Walker.
3180
3181         Adds a missing nullity check in an assert.
3182
3183         No new tests, no change in functionality.
3184
3185         * rendering/RenderObject.cpp:
3186         (WebCore::RenderObject::containingBlock):
3187
3188 2012-12-13  Tab Atkins  <tabatkins@google.com>
3189
3190         Switch the gradient drawing code to use bearing angles
3191         https://bugs.webkit.org/show_bug.cgi?id=104616
3192
3193         Reviewed by Dean Jackson.
3194
3195         Switch the gradient math from polar-coordinate angles to bearing angles.
3196         To make this possible without behavior changes, 
3197         switch the m_deprecatedType boolean to an m_gradientType enum,
3198         and fix all usages accordingly.
3199
3200         No new tests, as this is a refactoring and should have no behavior changes. Existing tests suffice.
3201
3202         * css/CSSGradientValue.cpp:
3203         (WebCore::endPointsFromAngle):
3204         This is the only mechanical change. The rest are just fixing the plumbing around the boolean->enum change.
3205
3206         * css/CSSGradientValue.cpp:
3207         (WebCore::CSSGradientValue::sortStopsIfNeeded):
3208         (WebCore::CSSGradientValue::addStops):
3209         (WebCore::CSSLinearGradientValue::customCssText):
3210         (WebCore::CSSLinearGradientValue::createGradient):
3211         (WebCore::CSSRadialGradientValue::customCssText):
3212         * css/CSSGradientValue.h:
3213         (WebCore::CSSGradientValue::gradientType):
3214         (WebCore::CSSGradientValue::CSSGradientValue):
3215         (WebCore::CSSLinearGradientValue::create):
3216         (WebCore::CSSLinearGradientValue::CSSLinearGradientValue):
3217         (WebCore::CSSRadialGradientValue::create):
3218         (WebCore::CSSRadialGradientValue::CSSRadialGradientValue):
3219         * css/CSSParser.cpp:
3220         (WebCore::CSSParser::parseDeprecatedGradient):
3221         (WebCore::CSSParser::parseDeprecatedLinearGradient):
3222         (WebCore::CSSParser::parseDeprecatedRadialGradient):
3223
3224 2012-12-13  Ian Vollick  <vollick@chromium.org>
3225
3226         [chromium] Automatically use composited scrolling
3227         https://bugs.webkit.org/show_bug.cgi?id=94743
3228
3229         Reviewed by Adrienne Walker.
3230
3231         We currently use the composited scrolling facilities provided by
3232         wkb.ug/91117 if the overflow scroll block element is styled with
3233         -webkit-overflow-scrolling: touch. Ideally, we could automatically
3234         opt into composited scrolling if it is safe to do so. This can affect
3235         antialiasing, so it is important that automatically opting in is only
3236         enabled via a setting.
3237
3238         The way I determine if it is safe is by checking that z-ordering will
3239         not be affected if the overflow scrollable element were promoted to a
3240         stacking context (details below), and that clipping our scrolling
3241         descendants will not affect rendering.
3242
3243         To check the first condition (that z-ordering will not be affected).
3244         I ensure that the candidate element and all its descendants appear as a 
3245         continuous block in the candidate's stacking context. That is, if no 
3246         other elements are 'between' any of the candidates descendants when we
3247         sort in paint order, then we're safe. This is overly conservative,
3248         however. We could, in future, only consider stacking problems between
3249         elements that actually overlap.
3250
3251         To ensure that clipping will not cause a rendering change, I ensure
3252         that the layer has no out of flow positioned descendant whose
3253         containing block is not also a descendant of ours.
3254
3255         Test: compositing/overflow/automatically-opt-into-compositing-scrolling.html
3256
3257         (WebCore):
3258         * rendering/RenderLayer.cpp:
3259         (WebCore::RenderLayer::RenderLayer):
3260         (WebCore::RenderLayer::acceleratedCompositingForOverflowScrollEnabled):
3261         (WebCore):
3262         (WebCore::RenderLayer::updateDescendantsAreContiguousInStackingOrder):
3263         (WebCore::RenderLayer::updateDescendantsAreContiguousInStackingOrderRecursive):
3264         (WebCore::RenderLayer::positionOverflowControlsAfterPromotionToCompositedScrolling):
3265         (WebCore::RenderLayer::canSafelyEstablishAStackingContext):
3266           Returns true if the RenderLayer could become a stacking context without
3267           affecting the stacking order.
3268         (WebCore::RenderLayer::updateDescendantDependentFlags):
3269           We now need to keep track of out of flow positioned descendants.
3270         (WebCore::RenderLayer::addChild):
3271         (WebCore::RenderLayer::removeChild):
3272         (WebCore::RenderLayer::usesCompositedScrolling):
3273           Has been updated to return true if it can safely establish a stacking
3274           context, and the setting is turned on.
3275         (WebCore::RenderLayer::needsCompositedScrolling):
3276           This function returns true if we would like to use composited
3277           scrolling.
3278         (WebCore::RenderLayer::updateNeedsCompositedScrolling):
3279         (WebCore::RenderLayer::scrollTo):
3280         (WebCore::RenderLayer::dirtyZOrderLists):
3281         (WebCore::RenderLayer::dirtyNormalFlowList):
3282           Since these could affect opting into composited scrolling, we must
3283           request that the RenderLayerCompositor reevaluate compositing.
3284         (WebCore::RenderLayer::updateLayerListsIfNeeded):
3285           We call updateCanSafelyEstablishStackingContext here, if necessary.
3286         (WebCore::RenderLayer::shouldBeNormalFlowOnly):
3287         (WebCore::RenderLayer::shouldBeSelfPaintingLayer):
3288           usesCompositedScrolling -> needsCompositedScrolling
3289         (WebCore::RenderLayer::setAncestorChainHasOutOfFlowPositionedDescendant):
3290         (WebCore::RenderLayer::dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus):
3291         (WebCore::RenderLayer::updateOutOfFlowPositioned):
3292           Dirties and sets the out of flow positioned descendant state.
3293         (WebCore::RenderLayer::styleChanged):
3294         * rendering/RenderLayer.h:
3295         (RenderLayer):
3296         (WebCore::RenderLayer::hasOutOfFlowPositionedDescendant):
3297         * rendering/RenderLayerBacking.cpp:
3298         (WebCore::layerOrAncestorIsTransformedOrUsingCompositedScrolling):
3299         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
3300         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
3301         (WebCore::RenderLayerBacking::hasUnpositionedOverflowControlsLayers):
3302         (WebCore):
3303         * rendering/RenderLayerBacking.h:
3304         (RenderLayerBacking):
3305         * rendering/RenderLayerCompositor.cpp:
3306         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3307           We now ensure that newly created overflow scroll controls get
3308           positioned.
3309         (WebCore::RenderLayerCompositor::requiresCompositingForOverflowScrolling):
3310         * rendering/RenderLayerCompositor.h:
3311         (WebCore::RenderLayerCompositor::setShouldReevaluateCompositingAfterLayout):
3312         * testing/InternalSettings.cpp:
3313         (WebCore::InternalSettings::setEnableCompositingForOverflowScroll):
3314           Allows enabling the setting in layout tests.
3315         (WebCore):
3316         * testing/InternalSettings.h:
3317         (InternalSettings):
3318         * testing/InternalSettings.idl:
3319
3320 2012-12-13  Ryosuke Niwa  <rniwa@webkit.org>
3321
3322         REGRESSION(r137406): NodeTraversal changes causing large renderer crash
3323         https://bugs.webkit.org/show_bug.cgi?id=104937
3324
3325         Reviewed by Antti Koivisto.
3326
3327         Add a null pointer check to exit early since ElementTraversal::next assumes a non-null pointer.
3328
3329         No new tests since I don't think this function is ever exposed to any ES5 bindings.
3330
3331         * editing/FrameSelection.cpp:
3332         (WebCore::scanForForm):
3333
3334 2012-12-13  David Grogan  <dgrogan@chromium.org>
3335
3336         IndexedDB: Improve error messages
3337         https://bugs.webkit.org/show_bug.cgi?id=104624
3338
3339         Reviewed by Tony Chang.
3340
3341         Add detail to error messages so that they are more helpful and can be
3342         traced back to a specific line of code.
3343
3344         Updated test: transaction-error.html
3345
3346         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
3347         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreOperation::perform):
3348         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::perform):
3349         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
3350         (WebCore::IDBDatabaseBackendImpl::openConnection):
3351         (WebCore::IDBDatabaseBackendImpl::openConnectionWithVersion):
3352         (WebCore::IDBDatabaseBackendImpl::deleteDatabase):
3353         (WebCore::IDBDatabaseBackendImpl::close):
3354         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
3355         (WebCore::IDBFactoryBackendImpl::getDatabaseNames):
3356         (WebCore::IDBFactoryBackendImpl::deleteDatabase):
3357         (WebCore::IDBFactoryBackendImpl::open):
3358         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
3359         (WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
3360         (WebCore::IDBObjectStoreBackendImpl::createIndex):
3361         (WebCore::IDBObjectStoreBackendImpl::CreateIndexOperation::perform):
3362         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
3363         (WebCore::IDBTransactionBackendImpl::abort):
3364         (WebCore::IDBTransactionBackendImpl::commit):
3365
3366 2012-12-13  Claudio Saavedra  <csaavedra@igalia.com>
3367
3368         [GTK] Safeguard against possible NULL-dereference
3369         https://bugs.webkit.org/show_bug.cgi?id=104931
3370
3371         Reviewed by Chris Fleizach.
3372
3373         This was spotted by Coverity. See bug 104114.
3374
3375         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3376         (webkitAccessibleGetIndexInParent): If parent is NULL
3377         bail out early.
3378
3379 2012-12-13  David Barton  <dbarton@mathscribe.com>
3380
3381         Heap-use-after-free in WebCore::RenderBlock::finishDelayUpdateScrollInfo
3382         https://bugs.webkit.org/show_bug.cgi?id=103750
3383
3384         Reviewed by Tony Chang.
3385
3386         MathML sometimes creates and destroys renderers for descendants during layout (or even to calculate
3387         preferred logical widths), e.g. for operator stretching. RenderBlock::finishDelayUpdateScrollInfo
3388         must therefore leave gDelayedUpdateScrollInfoSet intact as it iterates over it, so
3389         RenderBlock::willBeDestroyed can call gDelayedUpdateScrollInfoSet->remove(this) effectively if needed.
3390         This also prevents duplicate entries from being added to gDelayedUpdateScrollInfoSet.
3391
3392         Test: mathml/mo-stretch-crash.html
3393
3394         * rendering/RenderBlock.cpp:
3395         (WebCore::RenderBlock::startDelayUpdateScrollInfo):
3396             - Allow gDelayedUpdateScrollInfoSet to be non-null when gDelayUpdateScrollInfo is 0 during
3397               RenderBlock::finishDelayUpdateScrollInfo.
3398         (WebCore::RenderBlock::finishDelayUpdateScrollInfo):
3399             - Remove blocks from gDelayedUpdateScrollInfoSet one at a time, waiting for each block until it is
3400               about to be updated.
3401
3402 2012-12-13  Alexey Proskuryakov  <ap@apple.com>
3403
3404         <rdar://problem/12838354> Per-Tab WebProcess: DOM cookie access functions should respect private browsing
3405         https://bugs.webkit.org/show_bug.cgi?id=104691
3406
3407         Reviewed by Sam Weinig.
3408
3409         * platform/network/NetworkingContext.h: Added a function that returns current
3410         context type. Ideally, we would track contexts across processes in a generic manner,
3411         but we only have two now, and don't need such complications.
3412
3413 2012-12-13  Alexey Proskuryakov  <ap@apple.com>
3414
3415         ResourceLoader::didReceiveAuthenticationChallenge uses a wrong client
3416         https://bugs.webkit.org/show_bug.cgi?id=104935
3417         <rdar://problem/12870361>
3418
3419         Reviewed by Anders Carlsson.
3420
3421         * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
3422         The handle is null when NetworkProcess is used. In any case, it should be correct
3423         to use the client carried within AuthenticationChallenge.
3424