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