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