[Soup] CredentialStorage should only be used for HTTP-family requests
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-11-17  Martin Robinson  <mrobinson@igalia.com>
2
3         [Soup] CredentialStorage should only be used for HTTP-family requests
4         https://bugs.webkit.org/show_bug.cgi?id=102582
5
6         Reviewed by Gustavo Noronha Silva.
7
8         Do not use CredentialStorage when handling non-HTTP family requests. CredentialStorage
9         only expects to handle requests in the HTTP family.
10
11         No new tests. This is covered by existing tests.
12
13         * platform/network/ResourceHandle.h:
14         (ResourceHandle): Add a shouldUseCredentialStorage helper to ResourceHandle. This
15         helper returns false when firstRequest() is a non-HTTP family request.
16         * platform/network/soup/ResourceHandleSoup.cpp:
17         (WebCore::applyAuthenticationToRequest): Use the new helper.
18         (WebCore::createSoupRequestAndMessageForHandle): Ditto.
19         (WebCore::ResourceHandle::start): Ditto.
20         (WebCore::ResourceHandle::shouldUseCredentialStorage): Ditto.
21         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Ditto.
22         (WebCore::ResourceHandle::receivedCredential): Ditto.
23
24 2012-11-16  Patrick Gansterer  <paroga@webkit.org>
25
26         Build fix for !USE(ACCELERATED_COMPOSITING) after r135029.
27
28         * rendering/RenderLayer.cpp:
29         (WebCore::RenderLayer::paintOverflowControls):
30
31 2012-11-16  Benjamin Poulain  <bpoulain@apple.com>
32
33         Improve the performance of rect transform
34         https://bugs.webkit.org/show_bug.cgi?id=101828
35
36         Reviewed by Simon Fraser.
37
38         Mapping a rect and a quad by a transform is a common operation because
39         we use it to recompute the repaint rect, overflow rect, etc.
40
41         The way it was done, is by transforming through mapRect()->mapQuad()->4 times mapPoint().
42         Each of those functions tests isIdentityOrTranslation() which has to read the whole matrix
43         and perform many comparison.
44         Because of that, the simple mapping of a rect was loading and checking the matrix 5 times
45         too many.
46
47         This patch just cut the intermediary calls.
48
49         On ARM, putting the operation together also has the advantage of loading the matrix
50         only once in registers and reusing it for every point.
51
52         * platform/graphics/transforms/TransformationMatrix.cpp:
53         (WebCore::TransformationMatrix::mapPoint):
54         (WebCore::TransformationMatrix::mapRect):
55         * platform/graphics/transforms/TransformationMatrix.h:
56         (WebCore):
57         (WebCore::TransformationMatrix::mapPointImpl): New convenience function to perform the
58         point project without doing isIdentityOrTranslation().
59
60 2012-11-16  Simon Fraser  <simon.fraser@apple.com>
61
62         Avoid calling the virtual isBlockFlow() in RenderBox::computeRectForRepaint()
63         https://bugs.webkit.org/show_bug.cgi?id=102581
64
65         Reviewed by Dan Bernstein.
66
67         isBlockFlow() is a virtual function call, and shows up in profiles of
68         Facebook pages as called from RenderBox::computeRectForRepaint().
69         
70         It's faster to do the hasColumns() bit-check first. Also replace
71         a call to layer() with the hasLayer() bit-check.        
72
73         * rendering/RenderBox.cpp:
74         (WebCore::RenderBox::computeRectForRepaint):
75
76 2012-11-16  Sheriff Bot  <webkit.review.bot@gmail.com>
77
78         Unreviewed, rolling out r134817.
79         http://trac.webkit.org/changeset/134817
80         https://bugs.webkit.org/show_bug.cgi?id=102576
81
82         Broke iframes and causing tons of crashes on ClusterFuzz
83         (Requested by inferno-sec on #webkit).
84
85         * dom/ContainerNode.cpp:
86         (WebCore::willRemoveChildren):
87         * dom/ContainerNodeAlgorithms.cpp:
88         (WebCore::ChildFrameDisconnector::collectDescendant):
89         * dom/ContainerNodeAlgorithms.h:
90         (WebCore::ChildFrameDisconnector::ChildFrameDisconnector):
91         (WebCore::ChildFrameDisconnector::~ChildFrameDisconnector):
92         (ChildFrameDisconnector):
93         (WebCore::ChildFrameDisconnector::collectDescendant):
94         (WebCore::ChildFrameDisconnector::disconnect):
95         * dom/Node.cpp:
96         * dom/Node.h:
97         (Node):
98         * dom/NodeRareData.h:
99         (WebCore::NodeRareData::NodeRareData):
100         (NodeRareData):
101         * html/HTMLFrameOwnerElement.cpp:
102         (WebCore::HTMLFrameOwnerElement::setContentFrame):
103         (WebCore::HTMLFrameOwnerElement::disconnectContentFrame):
104
105 2012-11-16  Simon Fraser  <simon.fraser@apple.com>
106
107         Fix overlay scrollbar painting in compositing layers
108         https://bugs.webkit.org/show_bug.cgi?id=102442
109
110         Reviewed by Beth Dakin.
111
112         There were two issues with overlay scrollbar painting in
113         compositing layers.
114         
115         First, we'd only ever call setContainsDirtyOverlayScrollbars()
116         on the RenderView's layer, even when encountering an overlay scrollbar
117         in some descendant compositing layer. This meant that we'd never
118         run the paintOverlayScrollbars() code for those child compositing
119         layers, so sometimes scrollbars were missing there.
120         
121         Even after fixing that, we would fail to render scrollbars that
122         were not in the composited RenderLayer itself. This happened because
123         we called into RenderLayer::paintOverlayScrollbars(), which called
124         paintLayer() with flags that only said to paint the overlay scrollbars
125         but not any descendants, so this paint path would not walk child
126         RenderLayers.
127         
128         Also remove the containsScrollableAreaWithOverlayScrollbars() flag on
129         ScrollView which is no longer used.
130
131         * platform/ScrollView.cpp:
132         (WebCore::ScrollView::ScrollView): Remove containsScrollableAreaWithOverlayScrollbars().
133         (WebCore::ScrollView::paint): Remove setting of m_containsScrollableAreaWithOverlayScrollbars.
134         * platform/ScrollView.h:
135         * rendering/RenderLayer.cpp:
136         (WebCore::RenderLayer::paintOverflowControls): Call setContainsDirtyOverlayScrollbars()
137         on the compositing ancestor or the root.
138         Remove call to setContainsScrollableAreaWithOverlayScrollbars().
139         (WebCore::RenderLayer::paintOverlayScrollbars): When painting overlay
140         scrollbars, no need to say we have transparency, and no need to use 
141         temporary clip rects.
142         (WebCore::RenderLayer::paintLayer): The PaintLayerPaintingOverlayScrollbars
143         check here was only needed because the compositing entrypoint to painting
144         overlay scrollbars went via paintLayer(), which isn't normally used as
145         a composited painting entry point. Now that we no longer call that, we
146         don't need this special check.
147         * rendering/RenderLayerBacking.cpp:
148         (WebCore::RenderLayerBacking::paintIntoLayer): Jump into overlay scrollbar
149         painting via paintLayerContents(), not paintOverlayScrollbars(), since
150         the latter does not traverse sublayers.
151
152 2012-11-16  Joshua Bell  <jsbell@chromium.org>
153
154         IndexedDB: Assert hit when getting non-existent object store in version change transaction
155         https://bugs.webkit.org/show_bug.cgi?id=102547
156
157         Reviewed by Tony Chang.
158
159         Code did not account for the not-found case in "versionchange" transactions, where all
160         object stores are implicitly in scope.
161
162         Test: storage/indexeddb/object-lookups-in-versionchange.html
163
164         * Modules/indexeddb/IDBTransaction.cpp:
165         (WebCore::IDBTransaction::objectStore):
166
167 2012-11-12  Simon Fraser  <simon.fraser@apple.com>
168
169         Eliminate ancestor tree walk computing outlineBoundsForRepaint() when updating layer positions
170         https://bugs.webkit.org/show_bug.cgi?id=101874
171
172         Reviewed by Dave Hyatt.
173
174         RenderLayer::updateLayerPositions() and updateLayerPositionsAfterScroll() spend a
175         lot of time in computeRepaintRects(), which does two ancestor tree walks, once
176         for clippedOverflowRectForRepaint(), and one for outlineBoundsForRepaint().
177
178         Eliminate the ancestor tree walk in outlineBoundsForRepaint() by maintaining
179         a RenderGeometryMap as we traverse the layer tree, and then using it to map
180         the outline bounds to the repaint container. Replace the hokey cached offsetFromRoot
181         now that the RenderGeometryMap can do a better job.
182         
183         The clipped overflow rect cannot be mapped simply, so cannot yet make use of
184         the geometry map.
185         
186         Modify the RenderGeometryMap to support mapping to some repaintContainer ancestor.
187         Add a RenderObject walk that is necessary to detect flipped writing mode blocks.
188         
189         Pass the RenderGeometryMap as an optional parameter to outlineBoundsForRepaint.
190         
191         * page/FrameView.cpp:
192         (WebCore::FrameView::layout): Make a RenderGeometryMap and pass it down
193         to updateLayerPositions(). For partial layouts, we have to push layers
194         between the root and the enclosing layer of the layout subtree.
195         The geometry map used for repainting does not use SnapOffsetForTransforms,
196         so initialize it explicitly with just the UseTransforms flag.
197         (WebCore::FrameView::repaintFixedElementsAfterScrolling): Make a RenderGeometryMap
198         to pass along to updateLayerPositionsAfterScroll().
199         * rendering/RenderBox.cpp:
200         (WebCore::RenderBox::outlineBoundsForRepaint): Replace the optional cachedOffsetToRepaintContainer
201         parameter with an optional RenderGeometryMap, and it use to map the compute rect to
202         repaintContainer coordinates.
203         * rendering/RenderBox.h:
204         * rendering/RenderGeometryMap.cpp:
205         (WebCore::RenderGeometryMap::RenderGeometryMap): This now has to store the mapping
206         flags to use, so that its behavior can match that of mapLocalToContainer(). The
207         pertinent flag is the confusingly named SnapOffsetForTransforms.
208         (WebCore::RenderGeometryMap::absolutePoint): Call the new mapToContainer() with
209         a null container.
210         (WebCore::RenderGeometryMap::absoluteRect): Ditto.
211         (WebCore::RenderGeometryMap::mapToContainer): Map to the supplied container,
212         asserting that we found it. Add point- and rect-based mapping methods
213         akin to the old absoluteRect/absolutePoint.
214         (WebCore::canMapViaLayer): We need to test for isRenderFlowThread() here too.
215         (WebCore::RenderGeometryMap::pushMappingsToAncestor): When mapping via
216         layers, ensure that the RenderView is pushed as the first step.
217         * rendering/RenderGeometryMap.h:
218         (RenderGeometryMap):
219         * rendering/RenderLayer.cpp:
220         (WebCore::RenderLayer::updateLayerPositionsAfterLayout): New wrapper for updateLayerPositions()
221         that makes the geometry map.
222         (WebCore::RenderLayer::updateLayerPositionsAfterScroll): New wrapper for updateLayerPositionsAfterScroll
223         that makes the geometry map.
224         (WebCore::RenderLayer::updateLayerPositions): Now takes an optional RenderGeometryMap.
225         Remove the old offsetFromRoot code. Push and pop layers to/from the geometry map. Use
226         the geometry map to get the offsetFromRoot as needed by overflow controls. Pass
227         it to computeRepaintRects().
228         (WebCore::RenderLayer::computeRepaintRects): Pass the geometry map to outlineBoundsForRepaint().
229         (WebCore::RenderLayer::updateLayerPositionsAfterScroll): Push and pop to/from the
230         geometry map, and pass it to computeRepaintRects().
231         (WebCore::RenderLayer::removeOnlyThisLayer): Remove the offsetFromRootBeforeMove
232         computation; this could use a geometry map in future if it is shown to be a bottleneck.
233         * rendering/RenderLayer.h:
234         (WebCore::RenderLayer::canUseConvertToLayerCoords): It was thought that the isComposited()
235         was there because the older cached offsetFromRoot logic was sensitive to compositing,
236         but convertToLayerCoords() is not affected by compositing so this check is not needed,
237         and actually harmful.
238         * rendering/RenderLayerCompositor.cpp:
239         (WebCore::RenderLayerCompositor::OverlapMap::OverlapMap): The geometry map
240         used for overlap testing should not use SnapOffsetForTransforms, so initialize
241         it explicitly with just the UseTransforms flag.
242         * rendering/RenderObject.h:
243         (WebCore::RenderObject::outlineBoundsForRepaint):
244         * rendering/svg/RenderSVGModelObject.cpp:
245         (WebCore::RenderSVGModelObject::outlineBoundsForRepaint):
246         * rendering/svg/RenderSVGModelObject.h:
247         (RenderSVGModelObject):
248
249 2012-11-16  Alec Flett  <alecflett@chromium.org>
250
251         Add tests for explicit serialization values
252         https://bugs.webkit.org/show_bug.cgi?id=96818
253
254         Reviewed by Adam Barth.
255
256         Expose direct access to the serialization/deserialization mechanisms
257         of SerializedScriptValue to DumpRenderTree.
258
259         * testing/Internals.cpp:
260         (WebCore::Internals::serializeObject):
261         (WebCore):
262         (WebCore::Internals::deserializeBuffer):
263         * testing/Internals.h:
264         (WebCore):
265         * testing/Internals.idl:
266
267 2012-11-16  Andreas Kling  <akling@apple.com>
268
269         Exploit shared attribute data to avoid parsing identical "style" attributes.
270         <http://webkit.org/b/101163>
271
272         Reviewed by Antti Koivisto.
273
274         Track the "inline style dirty" state on ElementAttributeData instead of in a Node flag.
275         This allows us to avoid duplicate work for ElementAttributeData that are shared between multiple elements,
276         since the state is no longer per-Element.
277
278         * css/StyleResolver.cpp:
279         (WebCore::isCacheableInMatchedPropertiesCache):
280
281             Disable the matched properties cache for styles with non-standard writing-mode.
282             This is necessary because some CSS properties have different meaning depending on context -
283             properties handled by CSSProperty::resolveDirectionAwareProperty().
284
285             Now that multiple elements may have identical inlineStyle() pointers, this is necessary to
286             avoid mapping StylePropertySets with direction-aware properties to RenderStyles with differing
287             writing-modes in the matched properties cache.
288
289         * dom/Node.h:
290         * dom/ElementAttributeData.cpp:
291         (WebCore::ElementAttributeData::ElementAttributeData):
292         * dom/ElementAttributeData.h:
293         (WebCore::ElementAttributeData::ElementAttributeData):
294         (ElementAttributeData):
295         * dom/Element.h:
296         (WebCore::Element::updateInvalidAttributes):
297         * dom/Element.cpp:
298         (WebCore::Element::getAttribute):
299         (WebCore::Element::removeAttribute):
300         * dom/StyledElement.h:
301         (WebCore::StyledElement::invalidateStyleAttribute):
302         * dom/StyledElement.cpp:
303         (WebCore::StyledElement::updateStyleAttribute):
304
305             Move "style attribute dirty" flag to ElementAttributeData.
306
307         (WebCore::Element::cloneAttributesFromElement):
308
309             Remove ugly optimization to avoid reparsing inline style when cloning elements. This now happens
310             automagically since cloning nodes just refs the original attribute data.
311
312         * dom/StyledElement.cpp:
313         (WebCore::StyledElement::updateStyleAttribute):
314         (WebCore::StyledElement::setInlineStyleFromString):
315         (WebCore::StyledElement::styleAttributeChanged):
316         (WebCore::StyledElement::inlineStyleChanged):
317
318             Avoid reparsing the inline style if the element's attribute data is immutable and already has
319             a parsed inlineStyle(). Split the set-inline-style-from-string code out of styleAttributeChanged()
320             to make the code more understandable.
321
322 2012-11-16  Simon Fraser  <simon.fraser@apple.com>
323
324         Don't update layer positions on scrolling if we're in the middle of layout
325         https://bugs.webkit.org/show_bug.cgi?id=102556
326
327         Reviewed by Dan Bernstein.
328
329         RenderLayer::scrollTo() can be called in the middle of layout. When
330         that happens we should not waste time updating layer positions,
331         compositing layers, or widget positions, because we'll do those at the
332         end of layout anyway.
333         
334         This prevents us from having inconsistent RenderLayer state, which
335         hinders future optimizations in this area.
336
337         * rendering/RenderLayer.cpp:
338         (WebCore::RenderLayer::scrollTo):
339
340 2012-11-16  Tony Chang  <tony@chromium.org>
341
342         Remove ENABLE_CSS_HIERARCHIES since it's no longer in use
343         https://bugs.webkit.org/show_bug.cgi?id=102554
344
345         Reviewed by Andreas Kling.
346
347         As mentioned in https://bugs.webkit.org/show_bug.cgi?id=79939#c41 ,
348         we're going to revist this feature once additional vendor support is
349         achieved.
350
351         No new tests, just removing an unused define.
352
353         * Configurations/FeatureDefines.xcconfig:
354         * GNUmakefile.features.am:
355
356 2012-11-16  Mark Pilgrim  <pilgrim@chromium.org>
357
358         [Chromium] Remove cookie-related functions from PlatformSupport
359         https://bugs.webkit.org/show_bug.cgi?id=99340
360
361         Reviewed by Adam Barth.
362
363         Move cookie-related functions out of PlatformSupport and implement
364         new PlatformCookieJar interface via NetworkContext.
365
366         * WebCore.gyp/WebCore.gyp:
367         * WebCore.gypi:
368         * loader/CookieJar.cpp:
369         * loader/chromium/CookieJarChromium.cpp: Removed.
370         * platform/chromium/PlatformSupport.h:
371         (WebCore):
372         (PlatformSupport):
373         * platform/network/NetworkingContext.h:
374         (WebKit):
375         (NetworkingContext):
376         * platform/network/chromium/CookieJarChromium.cpp: Copied from Source/WebCore/loader/chromium/CookieJarChromium.cpp.
377         (WebCore::setCookiesFromDOM):
378         (WebCore::cookiesForDOM):
379         (WebCore::cookieRequestHeaderFieldValue):
380         (WebCore::cookiesEnabled):
381         (WebCore::getRawCookies):
382         (WebCore::deleteCookie):
383         (WebCore::getHostnamesWithCookies):
384         (WebCore::deleteCookiesForHostname):
385         (WebCore::deleteAllCookies):
386
387 2012-11-16  Pablo Flouret  <pablof@motorola.com>
388
389         [JSC] Don't sanitize window.onerror information on crossorigin-enabled scripts
390         https://bugs.webkit.org/show_bug.cgi?id=70574
391
392         Reviewed by Geoffrey Garen.
393
394         For scripts that use CORS (via the crossorigin attribute in this case),
395         don't sanitize the information passed to the window's onerror handler (i.e.
396         message, url, and line number). Useful for scripts hosted on CDNs.
397
398         Tests: http/tests/security/script-crossorigin-onerror-information.html
399                http/tests/security/script-no-crossorigin-onerror-should-be-sanitized.html
400
401         * WebCore.exp.in:
402         * WebCore.order:
403
404         * bindings/js/JSDOMBinding.cpp:
405         (WebCore::reportException):
406         * bindings/js/JSDOMBinding.h:
407         (WebCore):
408         * bindings/js/ScriptController.cpp:
409         (WebCore::ScriptController::evaluateInWorld):
410         * bindings/js/ScriptSourceCode.h:
411         (WebCore::ScriptSourceCode::ScriptSourceCode):
412         (WebCore::ScriptSourceCode::cachedScript):
413         (ScriptSourceCode):
414         * bindings/js/WorkerScriptController.cpp:
415         (WebCore::WorkerScriptController::evaluate):
416             Keep a reference to the cached script in the ScriptSourceCode, so
417             that it can be passed around and be available when reporting the
418             exception.
419
420         * dom/ScriptExecutionContext.cpp:
421         (WebCore::ScriptExecutionContext::sanitizeScriptError):
422         (WebCore::ScriptExecutionContext::reportException):
423         (WebCore::ScriptExecutionContext::dispatchErrorEvent):
424         * dom/ScriptExecutionContext.h:
425         (WebCore):
426         (ScriptExecutionContext):
427             Check if the script passes the access control checks, and if so,
428             don't sanitize the error information.
429
430         * html/parser/HTMLPreloadScanner.cpp:
431         (WebCore::PreloadTask::processAttributes):
432         (WebCore::PreloadTask::preload):
433         (PreloadTask):
434         (WebCore::PreloadTask::crossOriginModeAllowsCookies):
435             When preloading script elements, check for the crossorigin attribute
436             and adjust the request's allowCookies value accordingly. Otherwise
437             when the script is loaded from the cache later on, the cross origin mode
438             (anonymous/use-credentials) will be effectively ignored.
439
440 2012-11-16  Jon Lee  <jonlee@apple.com>
441
442         Change visual look of placeholder
443         https://bugs.webkit.org/show_bug.cgi?id=102149
444         <rdar://problem/12695566>
445
446         Reviewed by Darin Adler.
447
448         Move the button to the lower-right corner. Move the theming into
449         RenderSnapshottedPlugin for now. Eventually we will want to migrate to using the
450         shadow DOM instead, and the metrics of the button are needed for click passthrough.
451
452         * Resources/startButton.png: Added.
453         * Resources/startButton@2x.png: Added.
454         * Resources/startButtonPressed.png: Added.
455         * Resources/startButtonPressed@2x.png: Added.
456         * WebCore.xcodeproj/project.pbxproj: Add button images.
457
458         Maintain variables to track whether the mouse is over the button, and the rect
459         for the button. If the user clicks in the rect, we render a pressed button.
460         * rendering/RenderSnapshottedPlugIn.cpp:
461         (WebCore): Add named constant for bottom and right padding of the button.
462         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn):
463         (WebCore::RenderSnapshottedPlugIn::paintReplaced):
464         (WebCore::startButtonImage): Returns button image.
465         (WebCore::startButtonPressedImage): Returns pressed button image.
466         (WebCore::RenderSnapshottedPlugIn::paintButton): Draw the button image in the
467         lower right hand corner, but only if we are active or hovered.
468         (WebCore::RenderSnapshottedPlugIn::repaintButton): Stubbed to call repaint().
469         (WebCore::RenderSnapshottedPlugIn::handleEvent): Repaint the button if we are
470         hovering over the plugin rect. With a mouse down event, calculate whether the
471         mouse position is within the button rect.
472         (WebCore::RenderSnapshottedPlugIn::layout): Cache the rect representing the button
473         contents.
474         * rendering/RenderSnapshottedPlugIn.h:
475
476         Remove theming function for now.
477         * rendering/RenderTheme.h:
478         (RenderTheme):
479         * rendering/RenderThemeMacShared.h:
480         * rendering/RenderThemeMacShared.mm:
481
482 2012-11-16  Eric Seidel  <eric@webkit.org>
483
484         Deploy ScriptWrappable to more always-wrapped objects
485         https://bugs.webkit.org/show_bug.cgi?id=102539
486
487         Reviewed by Adam Barth.
488
489         Add the ScriptWrappable baseclass to:
490         CSSStyleDeclaration (anttik tells me these should only be used from JS, even though some old Editing code used to use them)
491         ClientRect (element.getBoundingClientRects)
492         Event (Not all events end up wrapped, but any which live past dispatch do)
493         NodeList (this covers Static and Dynamic node list types, like document.all)
494         HTMLCollection (separate from NodeList, for things like table.rows)
495         Storage (for window.storage, always wrapped)
496         XMLHttpRequest (always wrapped, created from JS)
497
498         This should be a small memory savings as the inline pointer is only 4-8 bytes
499         instead of the hashmap entry which would be 8-16.  This may also show up
500         on benchmarks which repeatedly access these objects (like window.storage).
501
502         These were found by adding a couple lines of logging-code to
503         WebCore::createWrapper when we were in the main world, but took the
504         HashMap (instead of inline) storage path. I used sort and uniq -c
505         to find the most-frequently wrapped objects (while surfing
506         a few common sites) and came up with this list.  There are still a few
507         more complicated objects (like CSSStyleDeclaration) which may benifit
508         from inline-wrapper-access and will be covered in a later patch.
509
510         * css/CSSStyleDeclaration.h:
511         * dom/ClientRect.h:
512         * dom/Event.h:
513         * dom/NodeList.h:
514         * html/HTMLCollection.h:
515         * storage/Storage.h:
516         * xml/XMLHttpRequest.h:
517
518 2012-11-16  Jon Lee  <jonlee@apple.com>
519
520         Simulated events instances do not all have the same underlying event
521         https://bugs.webkit.org/show_bug.cgi?id=102468
522         <rdar://problem/12716331>
523
524         Reviewed by Alexey Proskuryakov.
525
526         The PassRefPtr with the underlying event is included as an argument for the mouse
527         down, up, and click events. But the PassRefPtr loses its underlying pointer after
528         the first simulated mouse down event because it gets assigned to that event's
529         private m_underlyingEvent variable. We therefore send NULL to the other events.
530
531         The fix is for this and related functions to pass the raw pointer.
532
533         A layout test is not possible to put together because the call sites that use simulated
534         events with an underlying event do not send mouse events, and those that send mouse
535         events have a NULL underlying event.
536
537         * dom/EventDispatcher.cpp:
538         (WebCore::EventDispatcher::dispatchSimulatedClick): Require passing in the raw pointer.
539         * dom/EventDispatcher.h:
540         * dom/Node.cpp:
541         (WebCore::Node::dispatchSimulatedClick): Ditto.
542         * dom/Node.h:
543
544 2012-11-16  Patrick Gansterer  <paroga@webkit.org>
545
546         Build fix for WinCE after r134936.
547
548         * platform/network/win/CookieJarWin.cpp:
549         (WebCore::cookieRequestHeaderFieldValue):
550
551 2012-11-16  Dimitri Glazkov  <dglazkov@chromium.org>
552
553         Unreviewed, rolling out r134986.
554         http://trac.webkit.org/changeset/134986
555         https://bugs.webkit.org/show_bug.cgi?id=102110
556
557         Triggered ASSERT in fast/frames/seamless/seamless-inherited-
558         origin.html.
559
560         * css/StyleResolver.cpp:
561         (WebCore::StyleResolver::StyleResolver):
562         (WebCore::StyleResolver::addAuthorRulesAndCollectUserRulesFromSheets):
563         (WebCore::collectCSSOMWrappers):
564         * css/StyleResolver.h:
565         (StyleResolver):
566         * dom/Document.cpp:
567         (WebCore::Document::setCompatibilityMode):
568         * dom/DocumentStyleSheetCollection.cpp:
569         (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
570         (WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection):
571         (WebCore::DocumentStyleSheetCollection::pageGroupUserSheets):
572         (WebCore):
573         (WebCore::DocumentStyleSheetCollection::clearPageGroupUserSheets):
574         (WebCore::DocumentStyleSheetCollection::updatePageGroupUserSheets):
575         (WebCore::DocumentStyleSheetCollection::addUserSheet):
576         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
577         (WebCore::DocumentStyleSheetCollection::reportMemoryUsage):
578         * dom/DocumentStyleSheetCollection.h:
579         (DocumentStyleSheetCollection):
580         (WebCore::DocumentStyleSheetCollection::documentUserSheets):
581         * page/PageGroup.cpp:
582         (WebCore::PageGroup::addUserStyleSheetToWorld):
583         (WebCore::PageGroup::removeUserStyleSheetFromWorld):
584         (WebCore::PageGroup::removeUserStyleSheetsFromWorld):
585         (WebCore::PageGroup::removeAllUserContent):
586         (WebCore::PageGroup::resetUserStyleCacheInAllFrames):
587         * page/PageGroup.h:
588         (PageGroup):
589
590 2012-11-16  Michael Pruett  <michael@68k.org>
591
592         IndexedDB: Propagate DOMRequestState to IndexedDB binding utility functions
593         https://bugs.webkit.org/show_bug.cgi?id=102430
594
595         Reviewed by Adam Barth.
596
597         DOMRequestState is currently propagated to some but not all of
598         the IndexedDB binding utility functions. In order to implement
599         these functions for JSC, this state must be propagated to all
600         of the utility functions.
601
602         Tests: storage/indexeddb/*
603
604         * Modules/indexeddb/IDBCursor.cpp:
605         (WebCore::IDBCursor::update):
606         (WebCore::IDBCursor::setValueReady):
607         * Modules/indexeddb/IDBObjectStore.cpp:
608         (WebCore::generateIndexKeysForValue):
609         (WebCore::IDBObjectStore::put):
610         (WebCore):
611         * Modules/indexeddb/IDBRequest.cpp:
612         (WebCore::IDBRequest::onSuccess):
613         (WebCore::IDBRequest::dispatchEvent):
614         * Modules/indexeddb/IDBRequest.h:
615         (WebCore::IDBRequest::requestState):
616         (IDBRequest):
617         * bindings/v8/IDBBindingUtilities.cpp:
618         (WebCore::createIDBKeyFromScriptValueAndKeyPath):
619         (WebCore::serializeIDBValue):
620         (WebCore::injectIDBKeyIntoScriptValue):
621         * bindings/v8/IDBBindingUtilities.h:
622         (WebCore):
623
624 2012-11-16  Byungwoo Lee  <bw80.lee@samsung.com>
625
626         Rebaselined run-bindings-tests.
627         https://bugs.webkit.org/show_bug.cgi?id=102523
628
629         Reviewed by Dimitri Glazkov.
630
631         Expected results need to be updated after r134931
632
633         * bindings/scripts/test/JS/JSTestObj.cpp:
634         (WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute):
635         (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
636         (WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack):
637         * bindings/scripts/test/V8/V8TestObj.cpp:
638         (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrGetter):
639         (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrSetter):
640         (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackCallback):
641
642 2012-11-16  Pratik Solanki  <psolanki@apple.com>
643
644         For single element arrays use the pointer into the CFDataRef instead of copying data
645         https://bugs.webkit.org/show_bug.cgi?id=102306
646         <rdar://problem/12267471>
647
648         Reviewed by Alexey Proskuryakov.
649
650         We generally copy the data received from CFNetwork into our own buffers. But if the
651         CFArrayRef has exactly one CFDataRef inside it, then we can just hold on to the CFDataRef
652         and access its memory directly and avoid making a copy.
653
654         This also moves the creation of PurgeableBuffer from CachedResource to SharedBuffer.
655         SharedBuffer::createPurgeableBuffer() will avoid creating PurgeableBuffer when the
656         SharedBuffer is backed by a NSData/CFDataRef and when we want to optimize and directly use
657         the memory in the data array.
658
659         No new tests because no change in functionality.
660
661         * loader/ResourceBuffer.cpp:
662         (WebCore::ResourceBuffer::createPurgeableBuffer): Added.
663         * loader/ResourceBuffer.h:
664         * loader/cache/CachedResource.cpp:
665         (WebCore::CachedResource::makePurgeable):
666         * platform/SharedBuffer.cpp:
667         (WebCore::SharedBuffer::createPurgeableBuffer): Added.
668         (WebCore::SharedBuffer::data):
669         * platform/SharedBuffer.h:
670         * platform/cf/SharedBufferCF.cpp:
671         (WebCore::SharedBuffer::platformData): Use reinterpret_cast instead of C-style cast.
672         (WebCore::SharedBuffer::maybeTransferPlatformData): Use reinterpret_cast instead of C-style cast.
673         (WebCore::SharedBuffer::singleDataArrayBuffer): Added.
674
675 2012-11-16  Antti Koivisto  <antti@apple.com>
676
677         REGRESSION(r129644): User StyleSheet not applying
678         https://bugs.webkit.org/show_bug.cgi?id=102110
679
680         Reviewed by Andreas Kling.
681
682         Injected stylesheets added as UserStyleAuthorLevel fail to apply. r129644 implicitly assumed that
683         such things don't exists but on Chromium addUserStyleSheet() confusingly uses them.
684         
685         The patch adds injected author stylesheets to DocumentStyleSheetCollection::activeStyleSheets().
686         It also generally cleans up the code around injected and user stylesheets.
687
688         Tests: userscripts/user-script-and-stylesheet.html
689                userscripts/user-stylesheet-invalidate.html
690
691         * css/StyleResolver.cpp:
692         (WebCore::StyleResolver::StyleResolver):
693         (WebCore::StyleResolver::collectRulesFromUserStyleSheets):
694         (WebCore::collectCSSOMWrappers):
695         * css/StyleResolver.h:
696         (StyleResolver):
697         * dom/Document.cpp:
698         (WebCore::Document::setCompatibilityMode):
699         * dom/DocumentStyleSheetCollection.cpp:
700         (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
701         (WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection):
702         (WebCore::DocumentStyleSheetCollection::injectedUserStyleSheets):
703         (WebCore):
704         (WebCore::DocumentStyleSheetCollection::injectedAuthorStyleSheets):
705         (WebCore::DocumentStyleSheetCollection::updateInjectedStyleSheetCache):
706         (WebCore::DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache):
707         (WebCore::DocumentStyleSheetCollection::addUserSheet):
708         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
709         (WebCore::DocumentStyleSheetCollection::reportMemoryUsage):
710         * dom/DocumentStyleSheetCollection.h:
711         (WebCore::DocumentStyleSheetCollection::documentUserStyleSheets):
712         (DocumentStyleSheetCollection):
713         * page/PageGroup.cpp:
714         (WebCore::PageGroup::addUserStyleSheetToWorld):
715         (WebCore::PageGroup::removeUserStyleSheetFromWorld):
716         (WebCore::PageGroup::removeUserStyleSheetsFromWorld):
717         (WebCore::PageGroup::removeAllUserContent):
718         (WebCore::PageGroup::invalidatedInjectedStyleSheetCacheInAllFrames):
719         * page/PageGroup.h:
720         (PageGroup):
721
722 2012-11-16  Andreas Kling  <akling@apple.com>
723
724         StyleResolver: Only input elements need equal "readonly" attribute for style sharing.
725         <http://webkit.org/b/102536>
726
727         Reviewed by Antti Koivisto.
728
729         Move the comparison of the "readonly" attribute into canShareStyleWithControl() since it's only
730         relevant for sharing style between <input> elements.
731
732         Also skip attribute comparisons for form control elements that share the same ElementAttributeData.
733
734         * css/StyleResolver.cpp:
735         (WebCore::StyleResolver::canShareStyleWithControl):
736         (WebCore::haveIdenticalStyleAffectingAttributes):
737
738 2012-11-16  Sheriff Bot  <webkit.review.bot@gmail.com>
739
740         Unreviewed, rolling out r134867.
741         http://trac.webkit.org/changeset/134867
742         https://bugs.webkit.org/show_bug.cgi?id=102544
743
744         Broke security fuzzier test (heap-buffer-overflow) (Requested
745         by bfulgham on #webkit).
746
747         * platform/audio/Biquad.cpp:
748         (WebCore::Biquad::process):
749
750 2012-11-16  Tommy Widenflycht  <tommyw@google.com>
751
752         MediaStream API: Update RTCPeerConnection states to match the latest editors draft
753         https://bugs.webkit.org/show_bug.cgi?id=102382
754
755         Reviewed by Adam Barth.
756
757         Updating readyState & iceState, and adding iceGatheringState.
758         Also safeguarding the event timer callback.
759
760         Patch covered by existing tests.
761
762         * Modules/mediastream/RTCPeerConnection.cpp:
763         (WebCore::RTCPeerConnection::RTCPeerConnection):
764         (WebCore::RTCPeerConnection::createOffer):
765         (WebCore::RTCPeerConnection::createAnswer):
766         (WebCore::RTCPeerConnection::setLocalDescription):
767         (WebCore::RTCPeerConnection::localDescription):
768         (WebCore::RTCPeerConnection::setRemoteDescription):
769         (WebCore::RTCPeerConnection::remoteDescription):
770         (WebCore::RTCPeerConnection::updateIce):
771         (WebCore::RTCPeerConnection::addIceCandidate):
772         (WebCore::RTCPeerConnection::readyState):
773         (WebCore::RTCPeerConnection::iceGatheringState):
774         (WebCore):
775         (WebCore::RTCPeerConnection::iceState):
776         (WebCore::RTCPeerConnection::addStream):
777         (WebCore::RTCPeerConnection::close):
778         (WebCore::RTCPeerConnection::didChangeIceGatheringState):
779         (WebCore::RTCPeerConnection::stop):
780         (WebCore::RTCPeerConnection::changeReadyState):
781         (WebCore::RTCPeerConnection::scheduledEventTimerFired):
782         * Modules/mediastream/RTCPeerConnection.h:
783         (RTCPeerConnection):
784         * Modules/mediastream/RTCPeerConnection.idl:
785         * dom/EventNames.h:
786         (WebCore):
787         * platform/mediastream/RTCPeerConnectionHandlerClient.h:
788         (RTCPeerConnectionHandlerClient):
789         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
790         (WebCore::RTCPeerConnectionHandlerChromium::didChangeICEGatheringState):
791         (WebCore):
792         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
793         (RTCPeerConnectionHandlerChromium):
794
795 2012-11-16  Dimitri Glazkov  <dglazkov@chromium.org>
796
797         Unreviewed, rolling out r134973.
798         http://trac.webkit.org/changeset/134973
799         https://bugs.webkit.org/show_bug.cgi?id=99340
800
801         Broke compile on at least Mac and Linux.
802
803         * WebCore.gyp/WebCore.gyp:
804         * WebCore.gypi:
805         * loader/CookieJar.cpp:
806         * loader/chromium/CookieJarChromium.cpp: Renamed from Source/WebKit/chromium/src/FrameNetworkingContextImpl.cpp.
807         (WebCore):
808         (WebCore::setCookies):
809         (WebCore::cookies):
810         (WebCore::cookieRequestHeaderFieldValue):
811         (WebCore::cookiesEnabled):
812         (WebCore::getRawCookies):
813         (WebCore::deleteCookie):
814         (WebCore::getHostnamesWithCookies):
815         (WebCore::deleteCookiesForHostname):
816         (WebCore::deleteAllCookies):
817         * platform/chromium/PlatformSupport.h:
818         (WebCore):
819         (PlatformSupport):
820         * platform/network/NetworkingContext.h:
821         * platform/network/chromium/CookieJarChromium.cpp: Removed.
822
823 2012-11-16  Martin Robinson  <mrobinson@igalia.com>
824
825         [GTK] [WebKit2] Move GtkAuthenticationDialog to the UIProcess
826         https://bugs.webkit.org/show_bug.cgi?id=101843
827
828         Reviewed by Gustavo Noronha Silva.
829
830         Make GtkAuthenticationDialog more general, so that it can be subclassed in 
831         WebKit2. We cannot use the WebCore authentication-related classes directly there.
832
833         No new tests. This patch does not change behavior.
834
835         * platform/gtk/GtkAuthenticationDialog.cpp:
836         (WebCore::GtkAuthenticationDialog::GtkAuthenticationDialog): Remove an unused include and reorder
837         some field initializers.
838         (WebCore::GtkAuthenticationDialog::authenticate): Now handle both the okay and cancel case here. This
839         makes it simpler to subclass.
840         (WebCore::GtkAuthenticationDialog::authenticationDialogResponseCallback): Handle fetching the username
841         and password here, so that it can be shared with subclasses.
842         * platform/gtk/GtkAuthenticationDialog.h: Make some methods virtual and protected so they can be
843         subclasses.
844
845 2012-11-16  Mark Pilgrim  <pilgrim@chromium.org>
846
847         [Chromium] Remove cookie-related functions from PlatformSupport
848         https://bugs.webkit.org/show_bug.cgi?id=99340
849
850         Reviewed by Adam Barth.
851
852         Move cookie-related functions out of PlatformSupport and implement
853         new PlatformCookieJar interface via NetworkContext.
854
855         * WebCore.gyp/WebCore.gyp:
856         * WebCore.gypi:
857         * loader/CookieJar.cpp:
858         * loader/chromium/CookieJarChromium.cpp: Removed.
859         * platform/chromium/PlatformSupport.h:
860         (WebCore):
861         (PlatformSupport):
862         * platform/network/NetworkingContext.h:
863         (WebKit):
864         (NetworkingContext):
865         * platform/network/chromium/CookieJarChromium.cpp: Copied from Source/WebCore/loader/chromium/CookieJarChromium.cpp.
866         (WebCore::setCookiesFromDOM):
867         (WebCore::cookiesForDOM):
868         (WebCore::cookieRequestHeaderFieldValue):
869         (WebCore::cookiesEnabled):
870         (WebCore::getRawCookies):
871         (WebCore::deleteCookie):
872         (WebCore::getHostnamesWithCookies):
873         (WebCore::deleteCookiesForHostname):
874         (WebCore::deleteAllCookies):
875
876 2012-11-16  Byungwoo Lee  <bw80.lee@samsung.com>
877
878         Fix assertion bug of build fix r134961
879         https://bugs.webkit.org/show_bug.cgi?id=102533
880
881         Reviewed by Martin Robinson.
882
883         Assertion condition should be '!d->m_currentWebChallenge.isNull()'
884
885         * platform/network/soup/ResourceHandleSoup.cpp:
886         (WebCore::ResourceHandle::continueDidReceiveAuthenticationChallenge):
887
888 2012-11-16  Tommy Widenflycht  <tommyw@google.com>
889
890         [chromium] MediaStream API: Add missing WebRTCPeerConnectionHandlerClient::didAddRemoteDataChannel
891         https://bugs.webkit.org/show_bug.cgi?id=102386
892
893         Reviewed by Adam Barth.
894
895         Existing tests expanded to cover patch.
896
897         * platform/mediastream/RTCDataChannelDescriptor.cpp:
898         (WebCore::RTCDataChannelDescriptor::RTCDataChannelDescriptor):
899         (WebCore::RTCDataChannelDescriptor::readyStateChanged):
900         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
901         (WebCore::RTCPeerConnectionHandlerChromium::didAddRemoteDataChannel):
902         (WebCore):
903         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
904         (WebKit):
905         (RTCPeerConnectionHandlerChromium):
906
907 2012-11-16  Scott Violet  <sky@chromium.org>
908
909         [chromium] Copy linux theme related files to default
910         https://bugs.webkit.org/show_bug.cgi?id=102403
911
912         Reviewed by Tony Chang
913
914         Transitional patch that copies linux WebThemeEngine to default directory.
915
916         No new tests, refactoring only.
917
918         * WebCore.gyp/WebCore.gyp: Update compile rules when use_default_render_theme is set.
919         * WebCore.gypi: Adds new files.
920         * platform/chromium/PlatformSupport.h:
921         * platform/chromium/PlatformThemeChromiumDefault.cpp: Copied from Source/WebCore/platform/chromium/PlatformThemeChromiumLinux.cpp.
922         * platform/chromium/PlatformThemeChromiumDefault.h: Copied from Source/WebCore/platform/chromium/PlatformThemeChromiumLinux.h.
923         * platform/chromium/ScrollbarThemeChromiumDefault.cpp: Copied from Source/WebCore/platform/chromium/ScrollbarThemeChromiumLinux.cpp.
924         * platform/chromium/ScrollbarThemeChromiumDefault.h: Copied from Source/WebCore/platform/chromium/ScrollbarThemeChromiumLinux.h.
925         * rendering/RenderThemeChromiumDefault.cpp: Copied from Source/WebCore/rendering/RenderThemeChromiumLinux.cpp.
926         * rendering/RenderThemeChromiumDefault.h: Copied from Source/WebCore/rendering/RenderThemeChromiumLinux.h.
927
928 2012-11-16  Alec Flett  <alecflett@chromium.org>
929
930         IndexedDB: add missing 'explicit' and fix backing store release
931         https://bugs.webkit.org/show_bug.cgi?id=102450
932
933         Reviewed by Tony Chang.
934
935         A inconsequential regression was introduced in http://trac.webkit.org/changeset/134129
936         which resulted in objects sticking around a bit longer than
937         expected. This makes sure the LevelDBTransaction is released
938         at the moment of commit/rollback rather than when IDBTransactionBackendImpl
939         is destroyed.
940
941         No new tests, this is just internal state that will affect
942         some future refactoring.
943
944         * Modules/indexeddb/IDBBackingStore.h:
945         (Cursor):
946         (Transaction):
947         (WebCore::IDBBackingStore::Transaction::reset):
948         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
949         (WebCore::IDBTransactionBackendImpl::abort):
950         (WebCore::IDBTransactionBackendImpl::commit):
951
952 2012-11-16  Dimitri Glazkov  <dglazkov@chromium.org>
953
954         [Chromium] One last tweak to WebCore.gypi to make Win build not sad.
955
956         * WebCore.gypi: Removed one last mention of accessibility/gtk file.
957
958 2012-11-16  Robert Flack  <flackr@chromium.org>
959
960         Handle gesture events on scrollbars.
961         https://bugs.webkit.org/show_bug.cgi?id=101516
962
963         Reviewed by Antonio Gomes.
964
965         Adds a gesture event handler to scrollbars and sends gestures beginning
966         over a scrollbar to this handler to allow touch scrolling scrollbars.
967
968         Test: fast/events/touch/gesture/gesture-scrollbar.html
969
970         * page/EventHandler.cpp:
971         (WebCore::EventHandler::clear):
972         (WebCore::EventHandler::handleGestureEvent):
973         (WebCore::EventHandler::isScrollbarHandlingGestures):
974         (WebCore):
975         * page/EventHandler.h:
976         (EventHandler):
977         * platform/Scrollbar.cpp:
978         (WebCore::Scrollbar::Scrollbar):
979         (WebCore):
980         (WebCore::Scrollbar::gestureEvent):
981         (WebCore::Scrollbar::mouseMoved):
982         (WebCore::Scrollbar::mouseUp):
983         (WebCore::Scrollbar::mouseDown):
984         * platform/Scrollbar.h:
985         (WebCore):
986         (Scrollbar):
987         * platform/ScrollbarTheme.h:
988         (WebCore::ScrollbarTheme::hitTest):
989         * platform/ScrollbarThemeComposite.cpp:
990         (WebCore::ScrollbarThemeComposite::hitTest):
991         * platform/ScrollbarThemeComposite.h:
992         (ScrollbarThemeComposite):
993         * platform/qt/ScrollbarThemeQStyle.cpp:
994         (WebCore::ScrollbarThemeQStyle::hitTest):
995         * platform/qt/ScrollbarThemeQStyle.h:
996         (ScrollbarThemeQStyle):
997
998 2012-11-16  Xianzhu Wang  <wangxianzhu@chromium.org>
999
1000         [Chromium-Android] Stack overflow in MediaControlsChromiumAndroid.cpp
1001         https://bugs.webkit.org/show_bug.cgi?id=102444
1002
1003         Reviewed by Adam Barth.
1004
1005         No new tests. Have been covered by many existing layout tests.
1006
1007         * html/shadow/MediaControlsChromiumAndroid.cpp:
1008         (WebCore::MediaControls::create): Calls createControls instead of itself.
1009
1010 2012-11-16  Andreas Kling  <akling@apple.com>
1011
1012         StyleResolver: Optimize sharing candidate evaluation for elements with shared attribute data.
1013         <http://webkit.org/b/102507>
1014
1015         Reviewed by Antti Koivisto.
1016
1017         When evaluating two elements as potential style sharing candidate, we have a whole bunch of code
1018         comparing the various attributes that would prevent sharing.
1019
1020         If the two elements both share the same ElementAttributeData, we can skip all those checks
1021         since they are guaranteed to have equal attributes.
1022
1023         Cuts the time spent in canShareStyleWithElement() by 25% on the HTML5 spec at <http://whatwg.org/c>.
1024
1025         * css/StyleResolver.cpp:
1026         (WebCore::haveIdenticalStyleAffectingAttributes):
1027         (WebCore::StyleResolver::canShareStyleWithElement):
1028
1029 2012-11-16  Byungwoo Lee  <bw80.lee@samsung.com>
1030
1031         [EFL][GTK] Build fix after r134955
1032         https://bugs.webkit.org/show_bug.cgi?id=102527
1033
1034         Reviewed by Martin Robinson.
1035
1036         Fix the EFL,GTK debug bulid fails after r134955.
1037
1038         * platform/network/soup/ResourceHandleSoup.cpp:
1039         (WebCore::ResourceHandle::continueDidReceiveAuthenticationChallenge):
1040
1041 2012-11-15  Alexey Proskuryakov  <ap@apple.com>
1042
1043         Private Browsing is a per-page setting that sets a global value
1044         https://bugs.webkit.org/show_bug.cgi?id=67870
1045
1046         Reviewed by Sam Weinig.
1047
1048         Make ResourceHandle{Mac,CFNet} use context to access storage session.
1049
1050         * WebCore.exp.in: We track less session state in WebCore now, so we need fewer
1051         exports.
1052
1053         * loader/FrameNetworkingContext.h: Added an OVERRIDE.
1054
1055         * page/Settings.cpp: (WebCore::Settings::setPrivateBrowsingEnabled): WebCore
1056         no longer keeps track of a globally enabled private CFNetwork storage session.
1057
1058         * platform/CookiesStrategy.h: Added defaultCookieStorage(). Some cookie jar methods
1059         don't have a NetworkingContext pointer, and have to use whatever a client expects
1060         them to do. Perhaps we should move those methods away from WebCore eventually.
1061
1062         * platform/network/NetworkingContext.h: Added storageSession().
1063
1064         * platform/network/ResourceHandle.h: Removed sttaic methods for dealing with global
1065         sessions.
1066
1067         * platform/network/ResourceHandleInternal.h: Added m_storageSession. We need to
1068         remember it post-creation to do things in willSendRequest. Alternatively, we could
1069         keep a reference to NetworkingContext itself.
1070
1071         * platform/network/cf/CookieJarCFNet.cpp:
1072         (WebCore::setCookiesFromDOM): currentCFHTTPCookieStorage now needs a context,
1073         there is no globally current one any more. Also, we don't really expect cookie
1074         stirage to be 0 when not using NSURLConnection.
1075         (WebCore::cookiesForDOM): Ditto.
1076         (WebCore::cookieRequestHeaderFieldValue): Ditto.
1077         (WebCore::cookiesEnabled): Ditto.
1078         (WebCore::getRawCookies): Ditto.
1079         (WebCore::deleteCookie): Ditto.
1080         (WebCore::getHostnamesWithCookies): Ditto.
1081         (WebCore::deleteCookiesForHostname): Ditto.
1082         (WebCore::deleteAllCookies): Ditto.
1083         * platform/network/cf/CookieStorageCFNet.cpp:
1084         (WebCore::currentCFHTTPCookieStorage): Use a context.
1085         (WebCore::defaultCFHTTPCookieStorage): Except for Windows-only override session,
1086         this is implemented in a strategy.
1087         (WebCore::overridenCookieStorage): Exposed the override for WebKit use on Windows.
1088
1089         * platform/network/cf/CookieStorageCFNet.h: Ditto.
1090
1091         * platform/network/cf/ResourceHandleCFNet.cpp:
1092         (WebCore::willSendRequest): Use storage session from the context, not global one.
1093         (WebCore::makeFinalRequest): Merged this into the only remaining caller. This
1094         function didn't really make any sense on its own.
1095         (WebCore::shouldRelaxThirdPartyCookiePolicy): Factored out of createCFURLConnection
1096         to match Mac.
1097         (WebCore::ResourceHandle::createCFURLConnection): While merging makeFinalRequest()
1098         in, removed some seemingly nonsensical code that was getting and immediately re-applying
1099         cookie storage accept policy.
1100         (WebCore::ResourceHandle::start): Store context->storageSession() for use in willSendRequest.
1101         (WebCore::ResourceHandle::willSendRequest): Apply the stored session, not global one.
1102         (WebCore::ResourceHandle::storageSession): An accessor for static methods that cannot
1103         access "d".
1104         (WebCore::ResourceHandle::loadResourceSynchronously): Store context->storageSession() for use in willSendRequest.
1105         (WebCore::ResourceHandle::willLoadFromCache): Don't call makeFinalRequest here.
1106         It didn't match Mac, and nothing in makeFinalRequest should have affected the result.
1107
1108         * platform/network/cf/ResourceRequestCFNet.cpp: (WebCore::ResourceRequest::doUpdatePlatformRequest):
1109         This function used to apply current storage session to every request for no apparent
1110         reason.
1111
1112         * platform/network/mac/CookieJarMac.mm:
1113         (WebCore::cookiesForDOM): Changed to pass context to currentCFHTTPCookieStorage.
1114         (WebCore::cookieRequestHeaderFieldValue): Ditto.
1115         (WebCore::setCookiesFromDOM): Ditto.
1116         (WebCore::cookiesEnabled): Ditto.
1117         (WebCore::getRawCookies): Ditto.
1118         (WebCore::deleteCookie): Ditto.
1119         (WebCore::getHostnamesWithCookies): Ditto.
1120         (WebCore::deleteCookiesForHostname): Ditto.
1121         (WebCore::deleteAllCookies): Ditto.
1122         * platform/network/mac/ResourceHandleMac.mm:
1123         (WebCore::shouldRelaxThirdPartyCookiePolicy): There was no need to special case
1124         null currentCFHTTPCookieStorage, WKSI handles that internally. Added a context
1125         argument, so that the function can access current session.
1126         (WebCore::ResourceHandle::createNSURLConnection): Updated for other code changes.
1127         (WebCore::ResourceHandle::start): Store context->storageSession() for use in willSendRequest.
1128         (WebCore::ResourceHandle::willLoadFromCache): Style fix.
1129         (WebCore::ResourceHandle::loadResourceSynchronously): Store context->storageSession()
1130         for use in willSendRequest. 
1131         (WebCore::ResourceHandle::willSendRequest): Use stored session, not global one.
1132
1133 2012-11-16  Dimitri Glazkov  <dglazkov@chromium.org>
1134
1135         [Chromium] Land a proper fix for r134939.
1136
1137         * WebCore.gyp/WebCore.gyp: Added exclusion for "atk".
1138         * WebCore.gypi: Put the accessibility/atk directory back into WebCore.gypi.
1139
1140 2012-11-16  Dimitri Glazkov  <dglazkov@chromium.org>
1141
1142         [Chromium] Just yank the whole accessibility/atk dir out of WebCore.gypi.
1143
1144 2012-11-16  Dimitri Glazkov  <dglazkov@chromium.org>
1145
1146         [Chromium] Updated WebCore.gypi after r134939.
1147
1148         * WebCore.gypi: Renamed acessibility/gtk to accessibility/atk.
1149
1150 2012-11-16  Martin Robinson  <mrobinson@igalia.com>
1151
1152         [GTK] Move CredentialBackingStore usage from GtkAuthenticationDialog to ResourceHandleSoup
1153         https://bugs.webkit.org/show_bug.cgi?id=101840
1154
1155         Reviewed by Gustavo Noronha Silva.
1156
1157         Make ResourceHandleSoup aware of per-session CredentialStorage and persistent CredentialStorage.
1158         Persistent credential storage interaction is moved from GtkAuthenticationDialog, so that it can
1159         be used whether or not GtkAuthenticationDialog is used or not. We try to properly handle redirects
1160         in the manner that the CFNet backend does.
1161
1162         No new tests. There are tests for this behavior, but they cannot be activated until we finish
1163         plumbing this through to the API layer. Once that patch lands, the tests will be turned on.
1164
1165         * platform/gtk/GtkAuthenticationDialog.cpp: No longer store credentials into the persistent
1166         storage manually, instead rely on ResourceHandleSoup. Also, we no longer get proposed credentials
1167         from the persistent storage here as well. They are pre-loaded by the ResourceHanndle.
1168         * platform/gtk/GtkAuthenticationDialog.h: Remove callbacks and members associated with saving
1169         credentials to the persistent credential store.
1170         * platform/network/ResourceHandle.h:
1171         (ResourceHandle): Add a method which is used to continue asynchronously after looking for
1172         proposed credentials in the persistent credential store.
1173         * platform/network/ResourceHandleInternal.h: Add a member which tracks persistent credentials to be added once we know
1174         an authentication succeeded.
1175         * platform/network/gtk/CredentialBackingStore.cpp:
1176         (CredentialForChallengeAsyncReadyCallbackData): Added this data structure used for asynchronous access
1177         of stored credentials.
1178         (WebCore::credentialForChallengeAsyncReadyCallback): Ditto for this callback.
1179         (WebCore::CredentialBackingStore::credentialForChallenge): Make this method asynchronous.
1180         * platform/network/gtk/CredentialBackingStore.h:
1181         (CredentialBackingStore): Update method signatures for for making credentialForChallenge asynchronous.
1182         * platform/network/soup/AuthenticationChallenge.h:
1183         (WebCore::AuthenticationChallenge::setProposedCredential): Added a setter so that ResourceHandleSoup
1184         can set proposed credentials from the persistent credential store.
1185         * platform/network/soup/ResourceHandleSoup.cpp:
1186         (WebCore::gotHeadersCallback): For GTK+ save any pending credential in the persistent credential storage
1187         if the authentication succeeded.
1188         (WebCore::applyAuthenticationToRequest): Added this method which generically embeds stored credentials
1189         in the request URI. This is the method that Soup uses to override any soup-stored session credential.
1190         (WebCore::restartedCallback): Strip credentials for requests that span a security origin. Handle
1191         authenticating requests from the session store.
1192         (WebCore::createSoupRequestAndMessageForHandle): Make the local request reference mutable.
1193         (WebCore::ResourceHandle::start): Remove some code which is now part of applyAuthenticationToRequest.
1194         Call applyAuthenticationToRequest and clear the user and password members like the CFNet backend does.
1195         (WebCore::getCredentialFromPersistentStoreCallback): Added this callback for getting persistently stored credentials.
1196         (WebCore::ResourceHandle::continueDidReceiveAuthenticationChallenge): Split out didReceiveAuthenticationChallenge
1197         into this asynchronous bit.
1198         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): For GTK+ continue handling this situation after
1199         first looking in the persistent credential store.
1200         (WebCore::ResourceHandle::receivedCredential): Store session credentials in the session storage, which is
1201         at the moment a redundant version of the Soup session storage and also prepare any persistent credentials
1202         for storage later (see gotHeadersCallback).
1203
1204 2012-11-16  Erik Arvidsson  <arv@chromium.org>
1205
1206         Update DOMException name: TypeMismatchError
1207         https://bugs.webkit.org/show_bug.cgi?id=102418
1208
1209         Reviewed by Kentaro Hara.
1210
1211         Patch 17 of 25 to update DOMException name to match the spec and Firefox.
1212
1213         Updated existing tests.
1214
1215         * dom/DOMCoreException.cpp:
1216         (WebCore):
1217         * dom/ExceptionCode.h:
1218
1219 2012-11-16  Balazs Kelemen  <kbalazs@webkit.org>
1220
1221         Coordinated Graphics: support the "freeze animations" API
1222         https://bugs.webkit.org/show_bug.cgi?id=100703
1223
1224         Reviewed by Noam Rosenthal.
1225
1226         Typo fix after previous patch.
1227
1228         No new tests, it's just a typo that only takes effect in the browser.
1229
1230         * platform/graphics/GraphicsLayerAnimation.cpp:
1231         (WebCore::GraphicsLayerAnimation::GraphicsLayerAnimation):
1232         Initialize members.
1233
1234 2012-11-16  Dan Carney  <dcarney@google.com>
1235
1236         add 7 bit strings capabilities to the v8 binding layer
1237         https://bugs.webkit.org/show_bug.cgi?id=91850
1238
1239         Reviewed by Adam Barth.
1240
1241         This change enables the v8 binding layer to make use of webkit's
1242         8 bit string capabilities. Using 8 bit strings leads to certain
1243         benchmark performance improvemnts as can be seen in
1244         https://bug-91850-attachments.webkit.org/attachment.cgi?id=163334.
1245
1246         No new tests.  Test coverage already extensive.
1247
1248         * bindings/v8/V8PerIsolateData.cpp:
1249         (WebCore::V8PerIsolateData::visitExternalStrings):
1250         * bindings/v8/V8StringResource.cpp:
1251         (StringTraits):
1252         (WebCore::false):
1253         (WebCore):
1254         (WebCore::true):
1255         (WebCore::v8StringToWebCoreString):
1256         * bindings/v8/V8ValueCache.cpp:
1257         (WebCore::makeExternalString):
1258         (WebCore::WebCoreStringResourceBase::toWebCoreStringResourceBase):
1259         (WebCore):
1260         (WebCore::WebCoreStringResourceBase::visitStrings):
1261         * bindings/v8/V8ValueCache.h:
1262         (WebCoreStringResourceBase):
1263         (WebCore::WebCoreStringResourceBase::WebCoreStringResourceBase):
1264         (WebCore::WebCoreStringResourceBase::~WebCoreStringResourceBase):
1265         (WebCore::WebCoreStringResourceBase::atomicString):
1266         (WebCore::WebCoreStringResourceBase::memoryConsumption):
1267         (WebCoreStringResource16):
1268         (WebCore::WebCoreStringResource16::WebCoreStringResource16):
1269         (WebCore):
1270         (WebCoreStringResource8):
1271         (WebCore::WebCoreStringResource8::WebCoreStringResource8):
1272
1273 2012-11-16  Erik Arvidsson  <arv@chromium.org>
1274
1275         Update DOMException name: InvalidAccessError
1276         https://bugs.webkit.org/show_bug.cgi?id=102400
1277
1278         Reviewed by Kentaro Hara.
1279
1280         Patch 15 of 25 to update DOMException name to match the spec and Firefox.
1281
1282         Updated existing tests.
1283
1284         * dom/DOMCoreException.cpp:
1285
1286 2012-11-16  Alexandru Chiculita  <achicu@adobe.com>
1287
1288         [Texmap][CSS Shaders] Make the CustomFilterValidatedProgram maintain the platform compiled program
1289         https://bugs.webkit.org/show_bug.cgi?id=102414
1290
1291         Reviewed by Noam Rosenthal.
1292
1293         Added WebCore classes needed for the WebKit2 implementation of Texture Mapper to keep a reference to the 
1294         platform compiled custom filter. It is just used to maintain the life-time of the objects. WebKit2 injects a
1295         client in TextureMapperPlatformCompiledProgram and receives a callback when the custom filter program is not
1296         used to render any layer on the page. 
1297
1298         Note that CustomFilterValidatedProgram are reused across multiple elements of the same page. Also, the instances
1299         are reused across frames, so animations should reuse the same pre-validated program. In this case, the mechanism is
1300         extended and reused in the platform compositor.
1301         
1302         No new tests, existing tests for CSS Custom Filters already cover this path.
1303
1304         * CMakeLists.txt:
1305         * GNUmakefile.am:
1306         * GNUmakefile.list.am:
1307         * Target.pri:
1308         * WebCore.pri:
1309         * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
1310         (WebCore):
1311         * platform/graphics/filters/CustomFilterValidatedProgram.h:
1312         (WebCore):
1313         (CustomFilterValidatedProgram):
1314         * platform/graphics/filters/texmap/CustomFilterValidatedProgramTextureMapper.cpp: Added.
1315         (WebCore):
1316         (WebCore::CustomFilterValidatedProgram::platformCompiledProgram): Platform implementation for creating and deleting the reference.
1317         (WebCore::CustomFilterValidatedProgram::platformInit):
1318         (WebCore::CustomFilterValidatedProgram::platformDestroy):
1319         * platform/graphics/filters/texmap/TextureMapperPlatformCompiledProgram.h: Added.
1320         (WebCore):
1321         (TextureMapperPlatformCompiledProgramClient):
1322         (WebCore::TextureMapperPlatformCompiledProgramClient::ref):
1323         (WebCore::TextureMapperPlatformCompiledProgramClient::deref):
1324         (TextureMapperPlatformCompiledProgram):
1325         Stores a link to a TextureMapperPlatformCompiledProgramClient. It's main purpose is to call unref on the client when
1326         the shader is not needed anymore. WebKit2 can use that to delete the corresponding shader from the compositor side.
1327         (WebCore::TextureMapperPlatformCompiledProgram::create):
1328         (WebCore::TextureMapperPlatformCompiledProgram::setClient): Used by WebKit2 to inject the platform client.
1329         (WebCore::TextureMapperPlatformCompiledProgram::client):
1330         (WebCore::TextureMapperPlatformCompiledProgram::TextureMapperPlatformCompiledProgram):
1331
1332 2012-11-16  Andreas Kling  <akling@apple.com>
1333
1334         Short-circuit Element::hasEquivalentAttributes() if elements share attribute data.
1335         <http://webkit.org/b/102498>
1336
1337         Reviewed by Antti Koivisto.
1338
1339         Add a fast path to hasEquivalentAttributes() that checks if both elements are using
1340         the same ElementAttributeData.
1341
1342         * dom/Element.cpp:
1343         (WebCore::Element::hasEquivalentAttributes):
1344
1345 2012-11-16  Zeno Albisser  <zeno@webkit.org>
1346
1347         [Qt] Adding a null pointer check for currentContext to GraphicsContext3DQt.
1348         https://bugs.webkit.org/show_bug.cgi?id=102360
1349
1350         QOpenGLContext::currentContext() will return null, in case there is
1351         no current context. Therefore currentContext must be null-checked
1352         before it can be reused.
1353         Making a context current on a null-surface on the other hand is
1354         perfectly possible.
1355
1356         Reviewed by Kenneth Rohde Christiansen.
1357
1358         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1359         (WebCore::GraphicsContext3DPrivate::blitMultisampleFramebufferAndRestoreContext):
1360
1361 2012-11-16  Eugene Klyuchnikov  <eustas.bug@gmail.com>
1362
1363         Web Inspector: Workaround to show shortcuts for panels that hasn't been loaded.
1364         https://bugs.webkit.org/show_bug.cgi?id=102488
1365
1366         Reviewed by Vsevolod Vlasov.
1367
1368         Panels are lazily loaded / instantiated.
1369         Panel constructors register keyboard shortcuts.
1370
1371         When user open shortcuts screen all panel should be loaded.
1372         Otherwise some shortcuts will be missing.
1373
1374         * inspector/front-end/ShortcutsScreen.js: Added callback invokation.
1375         * inspector/front-end/inspector.js:
1376         Provided callback that loads all panels.
1377
1378 2012-11-16  Kentaro Hara  <haraken@chromium.org>
1379
1380         [V8] Remove IsSubType() from CodeGeneratorV8.pm
1381         https://bugs.webkit.org/show_bug.cgi?id=102348
1382
1383         Reviewed by Adam Barth.
1384
1385         CodeGenerator.pm has IsStrictSubType(). CodeGeneratorV8.pm should use it.
1386
1387         No tests. No change in behavior.
1388
1389         * bindings/scripts/CodeGenerator.pm:
1390         (IsSubType):
1391         * bindings/scripts/CodeGeneratorJS.pm:
1392         (GenerateImplementation):
1393         * bindings/scripts/CodeGeneratorV8.pm:
1394         (GenerateHeader):
1395         (GetInternalFields):
1396         (GenerateNormalAttrGetter):
1397         (GenerateNormalAttrSetter):
1398         (GenerateFunctionCallback):
1399         (GenerateImplementationIndexer):
1400         (GenerateToV8Converters):
1401
1402 2012-11-16  Mario Sanchez Prada  <mario@webkit.org>
1403
1404         [EFL] Share WebKit-Gtk's Accessibility implementation with others WebKit ports.
1405         https://bugs.webkit.org/show_bug.cgi?id=99578
1406
1407         Reviewed by Martin Robinson.
1408
1409         Renamed WebCore/accessibility/gtk to WebCore/accessibility/atk.
1410
1411         * GNUmakefile.am:
1412         * GNUmakefile.list.am:
1413         * accessibility/atk/AXObjectCacheAtk.cpp: Renamed from
1414         Source/WebCore/accessibility/gtk/AXObjectCacheAtk.cpp.
1415         * accessibility/atk/AccessibilityObjectAtk.cpp: Renamed from
1416         Source/WebCore/accessibility/gtk/AccessibilityObjectAtk.cpp.
1417         * accessibility/atk/WebKitAccessibleHyperlink.cpp: Renamed from
1418         Source/WebCore/accessibility/gtk/WebKitAccessibleHyperlink.cpp.
1419         * accessibility/atk/WebKitAccessibleHyperlink.h: Renamed from
1420         Source/WebCore/accessibility/gtk/WebKitAccessibleHyperlink.h.
1421         * accessibility/atk/WebKitAccessibleInterfaceAction.cpp: Renamed
1422         from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceAction.cpp.
1423         * accessibility/atk/WebKitAccessibleInterfaceAction.h: Renamed
1424         from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceAction.h.
1425         * accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:
1426         Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceComponent.cpp.
1427         * accessibility/atk/WebKitAccessibleInterfaceComponent.h: Renamed
1428         from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceComponent.h.
1429         * accessibility/atk/WebKitAccessibleInterfaceDocument.cpp: Renamed
1430         from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceDocument.cpp.
1431         * accessibility/atk/WebKitAccessibleInterfaceDocument.h: Renamed
1432         from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceDocument.h.
1433         * accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp:
1434         Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceEditableText.cpp.
1435         * accessibility/atk/WebKitAccessibleInterfaceEditableText.h:
1436         Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceEditableText.h.
1437         * accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.cpp:
1438         Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceHyperlinkImpl.cpp.
1439         * accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.h:
1440         Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceHyperlinkImpl.h.
1441         * accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp:
1442         Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceHypertext.cpp.
1443         * accessibility/atk/WebKitAccessibleInterfaceHypertext.h: Renamed
1444         from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceHypertext.h.
1445         * accessibility/atk/WebKitAccessibleInterfaceImage.cpp: Renamed
1446         from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceImage.cpp.
1447         * accessibility/atk/WebKitAccessibleInterfaceImage.h: Renamed from
1448         Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceImage.h.
1449         * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
1450         Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceSelection.cpp.
1451         * accessibility/atk/WebKitAccessibleInterfaceSelection.h: Renamed
1452         from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceSelection.h.
1453         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp: Renamed
1454         from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceTable.cpp.
1455         * accessibility/atk/WebKitAccessibleInterfaceTable.h: Renamed from
1456         Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceTable.h.
1457         * accessibility/atk/WebKitAccessibleInterfaceText.cpp: Renamed
1458         from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceText.cpp.
1459         * accessibility/atk/WebKitAccessibleInterfaceText.h: Renamed from
1460         Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceText.h.
1461         * accessibility/atk/WebKitAccessibleInterfaceValue.cpp: Renamed
1462         from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceValue.cpp.
1463         * accessibility/atk/WebKitAccessibleInterfaceValue.h: Renamed from
1464         Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceValue.h.
1465         * accessibility/atk/WebKitAccessibleUtil.cpp: Renamed from
1466         Source/WebCore/accessibility/gtk/WebKitAccessibleUtil.cpp.
1467         * accessibility/atk/WebKitAccessibleUtil.h: Renamed from
1468         Source/WebCore/accessibility/gtk/WebKitAccessibleUtil.h.
1469         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: Renamed from
1470         Source/WebCore/accessibility/gtk/WebKitAccessibleWrapperAtk.cpp.
1471         * accessibility/atk/WebKitAccessibleWrapperAtk.h: Renamed from
1472         Source/WebCore/accessibility/gtk/WebKitAccessibleWrapperAtk.h.
1473
1474 2012-11-16  Shinya Kawanaka  <shinyak@chromium.org>
1475
1476         Changing pseudoClass (:indeterminate) should cause distribution
1477         https://bugs.webkit.org/show_bug.cgi?id=101903
1478
1479         Reviewed by Dimitri Glazkov.
1480
1481         <progress> and <input type="checkbox"> have 'indeterminate' state. When their state is changed, we have to
1482         invalidate distribution if necessary. To check it, we collect a feature that :invalidate is used in select attributes.
1483
1484         For <input>, we also have to see 'type' is changed. According to the spec, :indeterminate should match only
1485         progress element or <input type="checkbox">. So changing 'type' might also change :indeterminate state.
1486
1487         Tests: fast/dom/shadow/pseudoclass-update-indeterminate-input.html
1488                fast/dom/shadow/pseudoclass-update-indeterminate-progress.html
1489
1490         * html/HTMLInputElement.cpp:
1491         (WebCore::HTMLInputElement::updateType):
1492         (WebCore::HTMLInputElement::setIndeterminate):
1493         * html/HTMLProgressElement.cpp:
1494         (WebCore::HTMLProgressElement::didElementStateChange):
1495
1496 2012-11-16  Alexis Menard  <alexis@webkit.org>
1497
1498         Factorize the creation of primitive values with a pair into a function.
1499         https://bugs.webkit.org/show_bug.cgi?id=102485
1500
1501         Reviewed by Antti Koivisto.
1502
1503         The pattern is already existing in various call sites inside CSSParser
1504         and more will be added in the future (see bug 102104).
1505
1506         No new tests : It's a refactoring only, the tests should cover it.
1507
1508         * css/CSSParser.cpp:
1509         (WebCore):
1510         (WebCore::createPrimitiveValuePair):
1511         (WebCore::CSSParser::parseValue):
1512         (WebCore::CSSParser::parseFillSize):
1513         (WebCore::CSSParser::parseBorderImageRepeat):
1514         (WebCore::CSSParser::parseBorderRadius):
1515         (WebCore::CSSParser::parseCounter):
1516
1517 2012-11-16  Mark Pilgrim  <pilgrim@chromium.org>
1518
1519         Expand PlatformCookieJar interface to allow for other ports
1520         https://bugs.webkit.org/show_bug.cgi?id=102456
1521
1522         Reviewed by Adam Barth.
1523
1524         Add firstParty and cookieURL arguments to several functions to
1525         prepare for integrating Chromium port into new PlatformCookieJar
1526         interface.
1527
1528         * loader/CookieJar.cpp:
1529         (WebCore::cookiesEnabled):
1530         (WebCore::cookieRequestHeaderFieldValue):
1531         (WebCore::getRawCookies):
1532         * platform/network/PlatformCookieJar.h:
1533         (WebCore):
1534         * platform/network/cf/CookieJarCFNet.cpp:
1535         (WebCore::cookieRequestHeaderFieldValue):
1536         (WebCore::cookiesEnabled):
1537         (WebCore::getRawCookies):
1538         * platform/network/curl/CookieJarCurl.cpp:
1539         (WebCore::cookieRequestHeaderFieldValue):
1540         (WebCore::cookiesEnabled):
1541         (WebCore::getRawCookies):
1542         * platform/network/mac/CookieJarMac.mm:
1543         (WebCore::cookieRequestHeaderFieldValue):
1544         (WebCore::cookiesEnabled):
1545         (WebCore::getRawCookies):
1546         * platform/network/qt/CookieJarQt.cpp:
1547         (WebCore::cookieRequestHeaderFieldValue):
1548         (WebCore::cookiesEnabled):
1549         (WebCore::getRawCookies):
1550         * platform/network/soup/CookieJarSoup.cpp:
1551         (WebCore::cookieRequestHeaderFieldValue):
1552         (WebCore::cookiesEnabled):
1553         (WebCore::getRawCookies):
1554         * platform/network/win/CookieJarWin.cpp:
1555         (WebCore::cookieRequestHeaderFieldValue):
1556         (WebCore::cookiesEnabled):
1557         (WebCore::getRawCookies):
1558
1559 2012-11-16  Julien Chaffraix  <jchaffraix@webkit.org>
1560
1561         RenderGrid should have a function to resolve grid position
1562         https://bugs.webkit.org/show_bug.cgi?id=102441
1563
1564         Reviewed by Ojan Vafai.
1565
1566         The code was doing this conversion implicitly inside RenderGrid::findChildLogicalPosition.
1567         Also note that we also provided a fallback by returning LayoutPoint() (ie the (0, 0) position
1568         on the grid) if we couldn't handle the value. The explicit conversion is needed in order to
1569         support render areas and add a proper grid model to RenderGrid.
1570
1571         No expected change in behavior.
1572
1573         * rendering/RenderGrid.h:
1574         * rendering/RenderGrid.cpp:
1575         (WebCore::RenderGrid::resolveGridPosition):
1576         Added this new function to handle the conversion. We re-use Length but should never see
1577         a lot of the <length> values so I added some ASSERTs to enforce and catch that.
1578
1579         (WebCore::RenderGrid::findChildLogicalPosition):
1580         Simplified the function now that it just use resolveGridPosition.
1581
1582 2012-11-16  Ulan Degenbaev  <ulan@chromium.org>
1583
1584         [V8] Increment the amount of externally allocated memory for the receiving V8 isolate when transferring ArrayBuffer
1585         https://bugs.webkit.org/show_bug.cgi?id=94463
1586
1587         Reviewed by Kentaro Hara.
1588
1589         Call AdjustAmountOfExternalAllocatedMemory when V8ArrayBuffer is deserialized and transferred.
1590
1591         Test: ManualTests/typed-array-memory.html
1592
1593         * bindings/v8/SerializedScriptValue.cpp:
1594
1595 2012-11-16  Sheriff Bot  <webkit.review.bot@gmail.com>
1596
1597         Unreviewed, rolling out r134694.
1598         http://trac.webkit.org/changeset/134694
1599         https://bugs.webkit.org/show_bug.cgi?id=102481
1600
1601         it made API test crash on EFL port (Requested by gyuyoung on
1602         #webkit).
1603
1604         * platform/efl/RenderThemeEfl.cpp:
1605         (WebCore::fillColorsFromEdjeClass):
1606         (WebCore::RenderThemeEfl::setColorFromThemeClass):
1607         (WebCore::RenderThemeEfl::loadTheme):
1608         (WebCore::RenderThemeEfl::RenderThemeEfl):
1609         * platform/efl/RenderThemeEfl.h:
1610         (RenderThemeEfl):
1611
1612 2012-11-16  Mike West  <mkwst@chromium.org>
1613
1614         Web Inspector: Move call stack generation out of bindings.
1615         https://bugs.webkit.org/show_bug.cgi?id=101331
1616
1617         Reviewed by Yury Semikhatsky.
1618
1619         Currently, we generate stack traces for console messages at each call
1620         site. Bug 100650 has the end goal of moving all stack trace generation
1621         inside of the Inspector in order to ensure that we never send a console
1622         message without a stack trace if it's possible to generate one. This
1623         also ensures that we never generate unused call stacks.
1624
1625         This patch is the first step in that direction, moving stack trace
1626         generation out of the Console bindings, and into either Console or
1627         InspectorConsoleAgent.
1628
1629         No visible change in behavior should result; this refactoring should
1630         continue to pass all existing inspector tests.
1631
1632         * bindings/js/JSConsoleCustom.cpp:
1633         (WebCore::JSConsole::profile):
1634         (WebCore::JSConsole::profileEnd):
1635             Adjust custom JSC Console bindings to drop call stack generation.
1636         * bindings/scripts/CodeGeneratorJS.pm:
1637         (GenerateCallWith):
1638         * bindings/scripts/CodeGeneratorV8.pm:
1639         (GenerateCallWith):
1640             Drop call stack generation from JSC and V8 bindings.
1641         * bindings/scripts/CodeGeneratorGObject.pm:
1642             Skip timeEnd explicitly in these bindings; it used to include
1643             ScriptArguments, which autoskipped it. Now it doesn't, so it needs
1644             to be called out on its own.
1645         * bindings/v8/ScriptCallStackFactory.cpp:
1646         (WebCore::createScriptCallStackForConsole):
1647         (WebCore::createScriptCallStack):
1648         (WebCore):
1649         * bindings/v8/ScriptCallStackFactory.h:
1650         (WebCore):
1651             Add 'createScriptCallStack(ScriptState*, size_t)' to V8's
1652             ScriptCallStackFactory in order to match JCS' implementation.
1653             It simply delegates to 'createScriptCallStackForConsole', which
1654             now also accepts a 'maxStackSize' parameter.
1655         * bindings/v8/custom/V8ConsoleCustom.cpp:
1656         (WebCore::V8Console::traceCallback):
1657         (WebCore::V8Console::assertCallback):
1658         (WebCore::V8Console::profileCallback):
1659         (WebCore::V8Console::profileEndCallback):
1660             Adjust custom V8 bindings to drop call stack generation.
1661         * inspector/InspectorConsoleAgent.cpp:
1662         (WebCore::InspectorConsoleAgent::addMessageToConsole):
1663             With the eventual goal of getting rid of the call stack parameter
1664             entirely, this patch drops it from one version of
1665             'addMessageToConsole' (replacing it with ScriptState*), and creates
1666             a new version that only accepts a call stack. We should be able to
1667             migrate most (all?) external call sites over to the arguments
1668             version in future patches.
1669         (WebCore):
1670         (WebCore::InspectorConsoleAgent::count):
1671             Count takes 'ScriptState*' instead of a call stack, and generates
1672             the stack as needed.
1673         * inspector/InspectorConsoleAgent.h:
1674         (InspectorConsoleAgent):
1675         * inspector/InspectorConsoleInstrumentation.h:
1676         (WebCore::InspectorInstrumentation::addMessageToConsole):
1677         (WebCore):
1678         (WebCore::InspectorInstrumentation::consoleCount):
1679         * inspector/InspectorInstrumentation.cpp:
1680         (WebCore):
1681         (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
1682         (WebCore::InspectorInstrumentation::consoleCountImpl):
1683         * inspector/InspectorInstrumentation.h:
1684         (InspectorInstrumentation):
1685             Changes the InspectorInstrumentation pipeline to match the
1686             InspectorConsoleAgent changes.
1687         * page/Console.cpp:
1688         (WebCore::Console::addMessage):
1689             We now (always) generate one frame of a stack trace in order to
1690             populate line numbers and caller URLs. If we need to print the whole
1691             trace here, we generate a full stack.
1692         (WebCore::Console::debug):
1693         (WebCore::Console::error):
1694         (WebCore::Console::info):
1695         (WebCore::Console::log):
1696         (WebCore::Console::warn):
1697         (WebCore::Console::dir):
1698         (WebCore::Console::dirxml):
1699         (WebCore::Console::clear):
1700         (WebCore::Console::trace):
1701         (WebCore::Console::assertCondition):
1702         (WebCore::Console::count):
1703         (WebCore::Console::markTimeline):
1704         (WebCore::Console::timeEnd):
1705         (WebCore::Console::timeStamp):
1706         (WebCore::Console::group):
1707         (WebCore::Console::groupCollapsed):
1708         (WebCore::Console::profile):
1709         (WebCore::Console::profileEnd):
1710             s/ScriptCallStack/ScriptState*/g. Also, printing the stack trace
1711             has been moved out of 'trace' and into 'addMessage'.
1712         * page/Console.h:
1713         (Console):
1714         * page/Console.idl:
1715             Drop the call stack, add the script state.
1716         * workers/WorkerContext.cpp:
1717         (WebCore::WorkerContext::addMessageToWorkerConsole):
1718             Use the new, explicitly call stacked addMessageToConsole. We'll kill
1719             this in a future patch.
1720
1721 2012-11-16  Marja Hölttä  <marja@chromium.org>
1722
1723         Add initiator to CachedResourceRequest.
1724         https://bugs.webkit.org/show_bug.cgi?id=101935
1725
1726         Reviewed by Adam Barth.
1727
1728         Motivation: Chromium needs to know which elements request a
1729         resource (such as an image or a script) (bug 92761). In addition,
1730         for exposing resource timing information (bug 84883) we need to
1731         store the initiator, and this is the first step towards it.
1732
1733         No new tests: No visible change in behavior.
1734
1735         * CMakeLists.txt:
1736         * GNUmakefile.list.am:
1737         * Target.pri:
1738         * WebCore.gypi:
1739         * WebCore.vcproj/WebCore.vcproj:
1740         * WebCore.xcodeproj/project.pbxproj:
1741         * css/CSSCursorImageValue.cpp:
1742         (WebCore::CSSCursorImageValue::cachedImage):
1743         * css/CSSFontFaceSrcValue.cpp:
1744         (WebCore::CSSFontFaceSrcValue::cachedFont):
1745         * css/CSSImageSetValue.cpp:
1746         (WebCore::CSSImageSetValue::cachedImageSet):
1747         * css/CSSImageValue.cpp:
1748         (WebCore::CSSImageValue::cachedImage):
1749         * css/CSSImageValue.h:
1750         (WebCore):
1751         (CSSImageValue):
1752         * css/StyleResolver.cpp:
1753         (WebCore::StyleResolver::loadPendingImage):
1754         * css/StyleRuleImport.cpp:
1755         (WebCore::StyleRuleImport::requestStyleSheet):
1756         * css/WebKitCSSSVGDocumentValue.cpp:
1757         (WebCore::WebKitCSSSVGDocumentValue::load):
1758         * css/WebKitCSSShaderValue.cpp:
1759         (WebCore::WebKitCSSShaderValue::cachedShader):
1760         * dom/ScriptElement.cpp:
1761         (WebCore::ScriptElement::requestScript):
1762         * html/HTMLLinkElement.cpp:
1763         (WebCore::HTMLLinkElement::process):
1764         * html/parser/CSSPreloadScanner.cpp:
1765         (WebCore::CSSPreloadScanner::emitRule):
1766         * html/parser/CSSPreloadScanner.h:
1767         (CSSPreloadScanner):
1768         * html/parser/HTMLPreloadScanner.cpp:
1769         (WebCore::PreloadTask::preload):
1770         * loader/ImageLoader.cpp:
1771         (WebCore::ImageLoader::updateFromElement):
1772         * loader/cache/CachedResourceLoader.cpp:
1773         (WebCore::CachedResourceLoader::requestImage):
1774         (WebCore::CachedResourceLoader::requestResource):
1775         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
1776         (WebCore):
1777         (WebCore::CachedResourceLoader::preload):
1778         * loader/cache/CachedResourceLoader.h:
1779         (WebCore):
1780         (CachedResourceLoader):
1781         * loader/cache/CachedResourceRequest.cpp:
1782         (WebCore::CachedResourceRequest::CachedResourceRequest):
1783         (WebCore):
1784         (WebCore::CachedResourceRequest::~CachedResourceRequest):
1785         (WebCore::CachedResourceRequest::setInitiator):
1786         (WebCore::CachedResourceRequest::initiatorName):
1787         (WebCore::CachedResourceRequest::initiatorDocument):
1788         (WebCore::CachedResourceRequest::initiatorElement):
1789         * loader/cache/CachedResourceRequest.h:
1790         (WebCore):
1791         (WebCore::CachedResourceRequest::setOptions):
1792         (WebCore::CachedResourceRequest::defer):
1793         (WebCore::CachedResourceRequest::setDefer):
1794         (CachedResourceRequest):
1795         * loader/cache/CachedResourceRequestInitiators.cpp: Copied from Source/WebCore/loader/cache/CachedResourceRequest.cpp.
1796         (WebCore):
1797         (WebCore::CachedResourceRequestInitiators::CachedResourceRequestInitiators):
1798         * loader/cache/CachedResourceRequestInitiators.h: Copied from Source/WebCore/loader/cache/CachedResourceRequest.cpp.
1799         (WebCore):
1800         (CachedResourceRequestInitiators):
1801         (WebCore::cachedResourceRequestInitiators):
1802         * loader/icon/IconLoader.cpp:
1803         (WebCore::IconLoader::startLoading):
1804         * platform/ThreadGlobalData.cpp:
1805         (WebCore::ThreadGlobalData::ThreadGlobalData):
1806         * platform/ThreadGlobalData.h:
1807         (WebCore):
1808         (WebCore::ThreadGlobalData::cachedResourceRequestInitiators):
1809         (ThreadGlobalData):
1810         * svg/SVGFEImageElement.cpp:
1811         (WebCore::SVGFEImageElement::requestImageResource):
1812         * svg/SVGFontFaceUriElement.cpp:
1813         (WebCore::SVGFontFaceUriElement::loadFont):
1814         * svg/SVGUseElement.cpp:
1815         (WebCore::SVGUseElement::svgAttributeChanged):
1816
1817 2012-11-16  Yury Semikhatsky  <yurys@chromium.org>
1818
1819         Web Inspector: don't show an Error when evaluating a watch expression results in an exception
1820         https://bugs.webkit.org/show_bug.cgi?id=102470
1821
1822         Reviewed by Vsevolod Vlasov.
1823
1824         Dim watch expression and show "<not available>" as its value in cases when it evaluates
1825         into an exception.
1826
1827         * English.lproj/localizedStrings.js:
1828         * inspector/front-end/WatchExpressionsSidebarPane.js:
1829         (WebInspector.WatchExpressionTreeElement.prototype.update):
1830         * inspector/front-end/inspector.css:
1831
1832 2012-11-16  Vsevolod Vlasov  <vsevik@chromium.org>
1833
1834         Web Inspector: Rollout 134404 134548 134552 Temporarily rolling out to ease merging.
1835         https://bugs.webkit.org/show_bug.cgi?id=102476
1836
1837         Unreviewed rolling out.
1838
1839         * English.lproj/localizedStrings.js:
1840         * WebCore.gypi:
1841         * WebCore.vcproj/WebCore.vcproj:
1842         * inspector/compile-front-end.py:
1843         * inspector/front-end/AdvancedSearchController.js:
1844         * inspector/front-end/CallStackSidebarPane.js:
1845         (WebInspector.CallStackSidebarPane.prototype.registerShortcuts):
1846         * inspector/front-end/ConsoleView.js:
1847         (WebInspector.ConsoleView.prototype._registerShortcuts):
1848         * inspector/front-end/ElementsPanel.js:
1849         (WebInspector.ElementsPanel):
1850         (WebInspector.ElementsPanel.prototype._registerShortcuts):
1851         * inspector/front-end/ElementsPanelDescriptor.js:
1852         * inspector/front-end/GoToLineDialog.js:
1853         (WebInspector.GoToLineDialog.install):
1854         * inspector/front-end/KeyboardShortcut.js:
1855         (WebInspector.KeyboardShortcut._keyName):
1856         * inspector/front-end/Panel.js:
1857         (WebInspector.Panel.prototype.registerShortcut):
1858         (WebInspector.Panel.prototype.unregisterShortcut):
1859         (WebInspector.PanelDescriptor.prototype.panel):
1860         * inspector/front-end/ScriptsPanel.js:
1861         (WebInspector.ScriptsPanel):
1862         (WebInspector.ScriptsPanel.prototype._createDebugToolbar):
1863         (WebInspector.ScriptsPanel.prototype._createButtonAndRegisterShortcuts):
1864         * inspector/front-end/ScriptsPanelDescriptor.js:
1865         * inspector/front-end/ShortcutsScreen.js:
1866         (WebInspector.ShortcutsScreen):
1867         (WebInspector.ShortcutsSection):
1868         (WebInspector.ShortcutsSection.prototype._renderKey):
1869         * inspector/front-end/StylesSidebarPane.js:
1870         (WebInspector.StylesSidebarPane.prototype.registerShortcuts):
1871         * inspector/front-end/TimelinePanel.js:
1872         (WebInspector.TimelinePanel.prototype._registerShortcuts):
1873         * inspector/front-end/TimelinePanelDescriptor.js: Removed.
1874         * inspector/front-end/WebKit.qrc:
1875         * inspector/front-end/inspector.html:
1876         * inspector/front-end/inspector.js:
1877         (WebInspector._panelDescriptors):
1878         (WebInspector._registerShortcuts):
1879
1880 2012-11-16  Eugene Klyuchnikov  <eustas.bug@gmail.com>
1881
1882         Web Inspector: Memory Timeline Crash
1883         https://bugs.webkit.org/show_bug.cgi?id=102390
1884
1885         Reviewed by Vsevolod Vlasov.
1886
1887         Crash seems to be caused by IPC overflow.
1888         Messages "ParsedScriptSource" are routed to
1889         ResourceScriptMapping.prototype.addScript that process them in time
1890         linear to number of already registered non-anonymous non-inline scripts.
1891
1892         Fixed this with replacing repreated filtering with "on-line" bucketing.
1893
1894         * inspector/front-end/ResourceScriptMapping.js:
1895         (WebInspector.ResourceScriptMapping):
1896         Removed duplicating initialization code.
1897         (WebInspector.ResourceScriptMapping.prototype.addScript):
1898         Added script bucketing by sourceURL/isInline parameters.
1899         (WebInspector.ResourceScriptMapping.prototype._scriptsForSourceURL):
1900         Avoid filterfig.
1901         (WebInspector.ResourceScriptMapping.prototype._createUISourceCode):
1902         Added outgoing muatable array safeguard.
1903         (WebInspector.ResourceScriptMapping.prototype._reset):
1904         Added type information and added two new maps.
1905
1906 2012-11-16  Helder Correia  <helder.correia@nokia.com>
1907
1908         [CoordGfx] Follow coding style on explicit constructors
1909         https://bugs.webkit.org/show_bug.cgi?id=102451
1910
1911         Reviewed by Noam Rosenthal.
1912
1913         Use the explicit keyword on single argument constructors.
1914
1915         No new tests needed.
1916
1917         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
1918         (GraphicsLayerTextureMapper):
1919         * platform/graphics/texmap/TextureMapper.h:
1920         (TextureMapper):
1921         * platform/graphics/texmap/TextureMapperBackingStore.h:
1922         (WebCore::TextureMapperTile::TextureMapperTile):
1923         * platform/graphics/texmap/TextureMapperGL.cpp:
1924         (WebCore::TextureMapperGLData::SharedGLData::SharedGLData):
1925         (WebCore::TextureMapperGLData::TextureMapperGLData):
1926         * platform/graphics/texmap/TextureMapperGL.h:
1927         (BitmapTextureGL):
1928         * platform/graphics/texmap/TextureMapperShaderManager.h:
1929         (TextureMapperShaderManager):
1930
1931 2012-11-16  Kihong Kwon  <kihong.kwon@samsung.com>
1932
1933         Add DeviceController base-class to remove duplication of DeviceXXXControler
1934         https://bugs.webkit.org/show_bug.cgi?id=96894
1935
1936         Reviewed by Hajime Morita.
1937
1938         Add DeviceController which is extracted from DeviceOrientationController to remove duplication.
1939         And soon-to-be-added DeviceMotionController and ProximityController.
1940
1941         Covered by existing tests.
1942
1943         * CMakeLists.txt:
1944         * GNUmakefile.list.am:
1945         * Target.pri:
1946         * WebCore.gypi:
1947         * WebCore.vcproj/WebCore.vcproj:
1948         * WebCore.xcodeproj/project.pbxproj:
1949         * dom/DeviceOrientationClient.h:
1950         * dom/DeviceOrientationController.cpp:
1951         Remove member functions to move to DeviceController.
1952         - addListener(), removeListener(), removeAllListeners(), isActive()
1953         (WebCore::DeviceOrientationController::DeviceOrientationController):
1954         (WebCore::DeviceOrientationController::didChangeDeviceOrientation):
1955         (WebCore::DeviceOrientationController::client):
1956         (WebCore::DeviceOrientationController::hasLastData):
1957         (WebCore::DeviceOrientationController::getLastEvent):
1958         (WebCore::DeviceOrientationController::from):
1959         (WebCore):
1960         * dom/DeviceOrientationController.h:
1961         (WebCore):
1962         (WebCore::DeviceOrientationController::~DeviceOrientationController):
1963         (DeviceOrientationController):
1964         * dom/Document.cpp:
1965         Remove suspendEventsForAllListeners() and resumeEventsForAllListeners() function calls.
1966         These calls can be made by checking activeDOMObjectsAreSuspended() and activeDOMObjectsAreStopped() before dispatchEvent.
1967         (WebCore::Document::suspendActiveDOMObjects):
1968         (WebCore::Document::resumeActiveDOMObjects):
1969         * loader/EmptyClients.h:
1970         (EmptyDeviceClient):
1971         (WebCore::EmptyDeviceClient::startUpdating):
1972         (WebCore::EmptyDeviceClient::stopUpdating):
1973         (WebCore):
1974         * page/DOMWindow.cpp:
1975         (WebCore::DOMWindow::addEventListener):
1976         (WebCore::DOMWindow::removeEventListener):
1977         (WebCore::DOMWindow::removeAllEventListeners):
1978         * page/DeviceClient.h: Added.
1979         (WebCore):
1980         (DeviceClient):
1981         (WebCore::DeviceClient::~DeviceClient):
1982         * page/DeviceController.cpp: Added.
1983         DeviceController has extracted functions from DeviceOrientationController and DeviceMotionController.
1984         - addDeviceEventListener(), removeDeviceEventlistener(), removeAllDeviceEventListeners(), dispatchDeviceEvent()
1985         All kind of device event controller which has DeviceClient can be inherited from DeviceController.
1986         (WebCore):
1987         (WebCore::DeviceController::DeviceController):
1988         (WebCore::DeviceController::addDeviceEventListener):
1989         (WebCore::DeviceController::removeDeviceEventListener):
1990         (WebCore::DeviceController::removeAllDeviceEventListeners):
1991         (WebCore::DeviceController::dispatchDeviceEvent):
1992         (WebCore::DeviceController::fireDeviceEvent):
1993         * page/DeviceController.h: Added.
1994         (WebCore):
1995         (DeviceController):
1996         (WebCore::DeviceController::~DeviceController):
1997         (WebCore::DeviceController::isActive):
1998         (WebCore::DeviceController::client):
1999         (WebCore::DeviceController::hasLastData):
2000         (WebCore::DeviceController::getLastEvent):
2001
2002 2012-11-16  Alexander Pavlov  <apavlov@chromium.org>
2003
2004         Web Inspector: [Overrides] Device metrics get reset on navigation, yet remain in the Overrides view
2005         https://bugs.webkit.org/show_bug.cgi?id=102467
2006
2007         Reviewed by Pavel Feldman.
2008
2009         Restore the device metrics overrides from the inspector cookie in InspectorPageAgent::restore().
2010         Drive-by: move the script execution and FPS counter display state restoration from enable() into restore(),
2011         so that they will get restored only upon page navigation, not upon any agent enablement.
2012
2013         * inspector/InspectorPageAgent.cpp:
2014         (WebCore::InspectorPageAgent::restore): Restore device metrics overrides, script execution and FPS counter display state.
2015         (WebCore::InspectorPageAgent::enable): Don't restore script execution and FPS counter display state on any enablement.
2016
2017 2012-11-16  Sheriff Bot  <webkit.review.bot@gmail.com>
2018
2019         Unreviewed, rolling out r134908.
2020         http://trac.webkit.org/changeset/134908
2021         https://bugs.webkit.org/show_bug.cgi?id=102473
2022
2023         Broke the Apple Windows Debug build. (Requested by dydx on
2024         #webkit).
2025
2026         * WebCore.exp.in:
2027         * dom/ViewportArguments.cpp:
2028         (WebCore::computeViewportAttributes):
2029         * dom/ViewportArguments.h:
2030         (WebCore):
2031
2032 2012-11-16  Peter Rybin  <prybin@chromium.org>
2033
2034         Web Inspector: show internal properties in inspector frontend
2035         https://bugs.webkit.org/show_bug.cgi?id=100021
2036
2037         Reviewed by Yury Semikhatsky.
2038
2039         New field 'internalProperties' is parsed and passed via all callbacks to Object Properties section.
2040
2041         Test: inspector/debugger/properties-special.html
2042
2043         * inspector/front-end/ObjectPropertiesSection.js:
2044         (WebInspector.ObjectPropertiesSection.prototype.update.callback):
2045         (WebInspector.ObjectPropertiesSection.prototype.update):
2046         (.callback):
2047         (WebInspector.ObjectPropertyTreeElement.populate):
2048         (.processProperties):
2049         (WebInspector.ArrayGroupingTreeElement._populateAsFragment):
2050         (WebInspector.ArrayGroupingTreeElement._populateNonIndexProperties):
2051         * inspector/front-end/RemoteObject.js:
2052         (WebInspector.RemoteObject.prototype.set else):
2053
2054 2012-11-06  Alexander Pavlov  <apavlov@chromium.org>
2055
2056         Web Inspector: metrics, geolocation, orientation overrides do not belong to the settings panel
2057         https://bugs.webkit.org/show_bug.cgi?id=93691
2058
2059         Reviewed by Vsevolod Vlasov.
2060
2061         - The Overrides tab contents have been moved from the Settings dialog into a brand new Overrides drawer view,
2062         both receiving a new, more light-weight design.
2063         - The Cog button now brings up a popup menu with the "Overrides" and "Settings" items.
2064
2065         * WebCore.gypi:
2066         * WebCore.vcproj/WebCore.vcproj:
2067         * inspector/compile-front-end.py:
2068         * inspector/front-end/ContextMenu.js:
2069         (WebInspector.ContextMenu.prototype.showSoftMenu): Display the ContextMenu as a soft menu.
2070         * inspector/front-end/OverridesView.js: Copied from Source/WebCore/inspector/front-end/SettingsScreen.js.
2071         (WebInspector.OverridesView.appendBlockTo):
2072         (WebInspector.OverridesView):
2073         (WebInspector.OverridesView.showInDrawer):
2074         (WebInspector.OverridesView.prototype.get listener):
2075         (WebInspector.OverridesView.prototype._createUserAgentSelectRowElement.get const):
2076         (WebInspector.OverridesView.prototype._createUserAgentSelectRowElement.textDoubleClicked):
2077         (WebInspector.OverridesView.prototype._createUserAgentSelectRowElement.textChanged):
2078         (WebInspector.OverridesView.prototype._createUserAgentSelectRowElement.set checkboxClicked):
2079         (WebInspector.OverridesView.prototype._createUserAgentSelectRowElement):
2080         (WebInspector.OverridesView.prototype._createInput):
2081         (WebInspector.OverridesView.prototype._onMetricsCheckboxClicked):
2082         (WebInspector.OverridesView.prototype._applyDeviceMetricsUserInput):
2083         (WebInspector.OverridesView.prototype.):
2084         (WebInspector.OverridesView.prototype.set if):
2085         (WebInspector.OverridesView.prototype._createDeviceMetricsElement.swapDimensionsClicked):
2086         (WebInspector.OverridesView.prototype._createDeviceMetricsElement):
2087         (WebInspector.OverridesView.prototype._onGeolocationOverrideCheckboxClicked):
2088         (WebInspector.OverridesView.prototype._applyGeolocationUserInput):
2089         (WebInspector.OverridesView.prototype._setGeolocationPosition):
2090         (WebInspector.OverridesView.prototype._createGeolocationOverrideElement):
2091         (WebInspector.OverridesView.prototype._onDeviceOrientationOverrideCheckboxClicked):
2092         (WebInspector.OverridesView.prototype._applyDeviceOrientationUserInput):
2093         (WebInspector.OverridesView.prototype._setDeviceOrientation):
2094         (WebInspector.OverridesView.prototype._createDeviceOrientationOverrideElement):
2095         * inspector/front-end/ScriptsPanel.js:
2096         (WebInspector.ScriptsPanel): Fix the "DOM Breakpoints" pane move upon the panel creation.
2097         * inspector/front-end/SettingsScreen.js:
2098         (WebInspector.SettingsTab):
2099         (WebInspector.SettingsTab.prototype._appendSection):
2100         (WebInspector.GenericSettingsTab):
2101         (WebInspector.ExperimentsSettingsTab):
2102         (WebInspector.SettingsController): Implement the popup menu upon the button click.
2103         (WebInspector.SettingsController.prototype.showOverrides):
2104         (WebInspector.SettingsController.prototype.showSettings):
2105         (WebInspector.SettingsController.prototype.appendApplicableItems):
2106         (WebInspector.SettingsController.prototype._buttonPressed):
2107         (WebInspector.SettingsController.prototype._onHideSettingsScreen):
2108         (WebInspector.SettingsController.prototype.showSettingsScreen):
2109         * inspector/front-end/ShortcutsScreen.js: Add "Shortcuts" header.
2110         (WebInspector.ShortcutsScreen.prototype.createShortcutsTabView):
2111         * inspector/front-end/SoftContextMenu.js: Enable in all cases, implement the alignToCurrentTarget mode in show().
2112         (WebInspector.SoftContextMenu.prototype.show):
2113         * inspector/front-end/TabbedPane.js: Implement vertical tab layout (skipping the tab width computations).
2114         (WebInspector.TabbedPane.prototype.set verticalTabLayout):
2115         (WebInspector.TabbedPane.prototype._updateWidths):
2116         (WebInspector.TabbedPaneTab.prototype.setWidth):
2117         (WebInspector.TabbedPaneTab.prototype._createTabElement):
2118         * inspector/front-end/WebKit.qrc:
2119         * inspector/front-end/helpScreen.css: Update styles for the new Settings and Overrides look-and-feel.
2120         * inspector/front-end/inspector.css: Drive-by fix small artifacts in the soft menu and drawer view statusbar item label.
2121         (.soft-context-menu-item):
2122         (.drawer-header):
2123         * inspector/front-end/inspector.html:
2124
2125 2012-11-16  Sheriff Bot  <webkit.review.bot@gmail.com>
2126
2127         Unreviewed, rolling out r134865.
2128         http://trac.webkit.org/changeset/134865
2129         https://bugs.webkit.org/show_bug.cgi?id=102466
2130
2131         Broke the Apple Windows Debug build. (Requested by dydx on
2132         #webkit).
2133
2134         * WebCore.exp.in:
2135         * bindings/js/SerializedScriptValue.h:
2136         * testing/Internals.cpp:
2137         * testing/Internals.h:
2138         (WebCore):
2139         * testing/Internals.idl:
2140
2141 2012-11-16  Takashi Sakamoto  <tasak@google.com>
2142
2143         ASSERT_NOT_REACHED() when building a CSSOM wrapper for StyleRuleHost
2144         https://bugs.webkit.org/show_bug.cgi?id=102116
2145
2146         Reviewed by Alexander Pavlov.
2147
2148         Provide a CSSUnknownRule instance as a CSSOM wrapper for StyleRuleHost
2149         rules. Since there is no CSSOM wrapper for @host @-rules and
2150         ASSERT_NOT_REACHED is used when a CSSOM wrapper is requested,
2151         this crash occurs.
2152
2153         Tests: fast/css/at-host-cssom-crash.html
2154                inspector/styles/styles-include-host-rules-crash.html
2155
2156         * css/StyleRule.cpp:
2157         (WebCore::StyleRuleBase::createCSSOMWrapper):
2158         Return a CSSUnknownRule instance for StyleRuleHost rules instead of
2159         calling ASSERT_NOT_REACHED().
2160
2161 2012-11-16  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2162
2163         Avoid copying of ViewportArguments in computeViewportAttributes function
2164         https://bugs.webkit.org/show_bug.cgi?id=102354
2165
2166         Reviewed by Kenneth Rohde Christiansen.
2167
2168         Since r134749 we do not need copying of ViewportArguments parameter in
2169         computeViewportAttributes() as it is not modified any more.
2170
2171         Tested by existing tests fast/viewport.
2172
2173         * WebCore.exp.in: Updated exported symbols for MAC.
2174         * dom/ViewportArguments.cpp:
2175         (WebCore::computeViewportAttributes):
2176         * dom/ViewportArguments.h:
2177         (WebCore):
2178
2179 2012-11-15  Yury Semikhatsky  <yurys@chromium.org>
2180
2181         Memory instrumentation: add code for reporting stack traces of unknown instrumented objects
2182         https://bugs.webkit.org/show_bug.cgi?id=102384
2183
2184         Reviewed by Pavel Feldman.
2185
2186         * inspector/InspectorMemoryAgent.cpp:
2187         (WebCore::MemoryInstrumentationClientImpl::checkCountedObject): return false
2188         if the check fails.
2189         * inspector/MemoryInstrumentationImpl.h:
2190         (MemoryInstrumentationClientImpl):
2191
2192 2012-11-15  Jer Noble  <jer.noble@apple.com>
2193
2194         Crash at WebCore::PluginData::pluginFileForMimeType const + 38
2195         https://bugs.webkit.org/show_bug.cgi?id=102454
2196
2197         Reviewed by Dan Bernstein.
2198
2199         NULL-check the return value of Page::pluginData().
2200
2201         * loader/SubframeLoader.cpp:
2202         (WebCore::logPluginRequest):
2203
2204 2012-11-15  Kenichi Ishibashi  <bashi@chromium.org>
2205
2206         [Chromium] Unreviewed build fix attempt on win
2207
2208         Include OpenTypeVerticalData.h
2209
2210         * platform/graphics/chromium/FontPlatformDataChromiumWin.h:
2211         (WebCore):
2212
2213 2012-11-15  Kentaro Hara  <haraken@chromium.org>
2214
2215         Unreviewed, rolling out r134881.
2216         http://trac.webkit.org/changeset/134881
2217         https://bugs.webkit.org/show_bug.cgi?id=102348
2218
2219         http/tests/appcache tests on JSC platforms are broken
2220
2221         * bindings/scripts/CodeGenerator.pm:
2222         (IsStrictSubtype):
2223         * bindings/scripts/CodeGeneratorJS.pm:
2224         (GenerateImplementation):
2225         * bindings/scripts/CodeGeneratorV8.pm:
2226         (GenerateHeader):
2227         (GetInternalFields):
2228         (IsSubType):
2229         (IsNodeSubType):
2230         (GenerateNormalAttrGetter):
2231         (GenerateNormalAttrSetter):
2232         (GenerateFunctionCallback):
2233         (GenerateImplementationIndexer):
2234         (GenerateToV8Converters):
2235
2236 2012-11-15  Viatcheslav Ostapenko  <v.ostapenko@samsung.com>
2237
2238         [TexMap][Cairo][Qt] Refactor BitmapTextureGL::updateContents().
2239         https://bugs.webkit.org/show_bug.cgi?id=102420
2240
2241         Reviewed by Gyuyoung Kim.
2242
2243         Moved out texture upload without swizzle to the separate method and changed
2244         drawRepaintCounter to use no-swizzle method. This also fixes blue background
2245         of repaint counters in Qt Minibrowser.
2246         Added condition for sub-image buffer creation to not create it if full image is
2247         uploaded. This should give noticeable improvement for platforms that do not
2248         support sub-image upload to texture.
2249
2250         Covered by existing tests.
2251
2252         * platform/graphics/texmap/TextureMapperGL.cpp:
2253         (WebCore::TextureMapperGL::drawRepaintCounter):
2254         (WebCore::BitmapTextureGL::updateContentsNoSwizzle):
2255         (WebCore):
2256         (WebCore::BitmapTextureGL::updateContents):
2257         * platform/graphics/texmap/TextureMapperGL.h:
2258         (BitmapTextureGL):
2259
2260 2012-11-15  Kent Tamura  <tkent@chromium.org>
2261
2262         A Spin button should release mouse event capturing when a modal dialog opens
2263         https://bugs.webkit.org/show_bug.cgi?id=98007
2264
2265         Reviewed by Hajime Morita.
2266
2267         Description of bug:
2268         If the mouse left button is pressed on a spin button in
2269         input[type=number] and a 'change' event handler opens a modal dialog
2270         such as alert(), a repeating timer doesn't stop and mouse event
2271         capturing isn't released even though the mouse pointer isn't on the spin
2272         button.
2273         A user will see repeating alert dialogs for a document like <input
2274         type=number value=1 onchange="if (this.value==1) {alert(...);
2275         this.value=1;}"> by clicking the up button.
2276
2277         How to solve:
2278         We should notify modal dialog or popup open to a spin button.
2279         This patch introduce PopupOpeningObserver. Chrome notifies it when
2280         any dialogs / popups is opening. SpinButtonElement implements
2281         PopupOpeningObserver and registers/unregisters itself to/from
2282         Chrome.
2283
2284         No new tests. This is a behavior change, but it's very hard to make an
2285         automated test for timer-related behavior.
2286
2287         * page/PopupOpeningObserver.h: Added.
2288         * GNUmakefile.list.am: Add PopupOpeningObserver.h
2289         * Target.pri: Ditto.
2290         * WebCore.gypi: Ditto.
2291         * WebCore.vcproj/WebCore.vcproj: Ditto.
2292         * WebCore.xcodeproj/project.pbxproj: Ditto.
2293
2294         * page/Chrome.cpp:
2295         (WebCore::Chrome::runJavaScriptAlert): Calls notifyPopupOpeningObservers.
2296         (WebCore::Chrome::runJavaScriptConfirm): Ditto.
2297         (WebCore::Chrome::runJavaScriptPrompt): Ditto.
2298         (WebCore::Chrome::createColorChooser): Ditto.
2299         (WebCore::Chrome::openDateTimeChooser):
2300         Added. Calls notifyPopupOpeningObservers before calling
2301         ChromeClient::openDateTimeChooser.
2302         (WebCore::Chrome::runOpenPanel): Calls notifyPopupOpeningObservers.
2303         (WebCore::Chrome::createPopupMenu): Ditto.
2304         (WebCore::Chrome::createSearchPopupMenu): Ditto.
2305         (WebCore::Chrome::registerPopupOpeningObserver): Added.
2306         (WebCore::Chrome::unregisterPopupOpeningObserver): Added.
2307         (WebCore::Chrome::notifyPopupOpeningObservers): Added.
2308         * page/Chrome.h: Added new members and required class/struct declarations.
2309
2310         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
2311         (WebCore::BaseChooserOnlyDateAndTimeInputType::handleDOMActivateEvent):
2312         Use Chrome::openDateTimeChooser instead of ChromeClient::openDateTimeChooser.
2313         * html/shadow/PickerIndicatorElement.cpp:
2314         (WebCore::PickerIndicatorElement::openPopup): Ditto.
2315
2316         * html/shadow/SpinButtonElement.h:
2317         (SpinButtonElement): Declare willOpenPopup.
2318         * html/shadow/SpinButtonElement.cpp:
2319         (WebCore::SpinButtonElement::defaultEventHandler):
2320         Change the order of timer start and changing the value so that we
2321         can cancel the timer correctly.
2322         Calls Chrome::registerPopupOpeningObserver on starting mouse capturing.
2323         (WebCore::SpinButtonElement::willOpenPopup):
2324         Release mouse event capturing before opening a modal dialog.
2325         (WebCore::SpinButtonElement::releaseCapture):
2326         Calls Chrome::unregisterPopupOpeningObserver.
2327
2328
2329 2012-11-15  Shinya Kawanaka  <shinyak@chromium.org>
2330
2331         Chaging pseudoClass (:enabled) should cause distribution
2332         https://bugs.webkit.org/show_bug.cgi?id=101900
2333
2334         Reviewed by Dimitri Glazkov.
2335
2336         When element's 'enabled' state is changed, we have to invalidate distribution.
2337
2338         According to the spec, :enabled matches anchor/area/link element having href attribute,
2339         and several form control elements which is not disabled. However, currently :enalbed does not match
2340         anchor/area/link yet. See https://bugs.webkit.org/show_bug.cgi?id=102349
2341
2342         Tests: fast/dom/shadow/pseudoclass-update-enabled-anchor.html
2343                fast/dom/shadow/pseudoclass-update-enabled-area.html
2344                fast/dom/shadow/pseudoclass-update-enabled-button.html
2345                fast/dom/shadow/pseudoclass-update-enabled-fieldset.html
2346                fast/dom/shadow/pseudoclass-update-enabled-input.html
2347                fast/dom/shadow/pseudoclass-update-enabled-optgroup.html
2348                fast/dom/shadow/pseudoclass-update-enabled-option.html
2349                fast/dom/shadow/pseudoclass-update-enabled-select.html
2350                fast/dom/shadow/pseudoclass-update-enabled-textarea.html
2351
2352         * html/HTMLAnchorElement.cpp:
2353         (WebCore::HTMLAnchorElement::parseAttribute):
2354         * html/HTMLFormControlElement.cpp:
2355         (WebCore::HTMLFormControlElement::disabledAttributeChanged):
2356         * html/HTMLOptGroupElement.cpp:
2357         (WebCore::HTMLOptGroupElement::parseAttribute):
2358         * html/HTMLOptionElement.cpp:
2359         (WebCore::HTMLOptionElement::parseAttribute):
2360
2361 2012-11-15  Erik Arvidsson  <arv@chromium.org>
2362
2363         Update DOMException name: ValidationError
2364         https://bugs.webkit.org/show_bug.cgi?id=102416
2365
2366         Reviewed by Kentaro Hara.
2367
2368         Patch 16 of 25 to update DOMException name to match the spec and Firefox.
2369
2370         VALIDATION_ERR is historical and not used in any spec or our code.
2371
2372         * dom/DOMCoreException.cpp:
2373         * dom/ExceptionCode.h:
2374
2375 2012-11-15  Kentaro Hara  <haraken@chromium.org>
2376
2377         [V8] Remove IsSubType() from CodeGeneratorV8.pm
2378         https://bugs.webkit.org/show_bug.cgi?id=102348
2379
2380         Reviewed by Adam Barth.
2381
2382         CodeGenerator.pm has IsStrictSubType(). CodeGeneratorV8.pm should use it.
2383
2384         No tests. No change in behavior.
2385
2386         * bindings/scripts/CodeGenerator.pm:
2387         (IsSubType):
2388         * bindings/scripts/CodeGeneratorJS.pm:
2389         (GenerateImplementation):
2390         * bindings/scripts/CodeGeneratorV8.pm:
2391         (GenerateHeader):
2392         (GetInternalFields):
2393         (GenerateNormalAttrGetter):
2394         (GenerateNormalAttrSetter):
2395         (GenerateFunctionCallback):
2396         (GenerateImplementationIndexer):
2397         (GenerateToV8Converters):
2398
2399 2012-11-15  Erik Arvidsson  <arv@chromium.org>
2400
2401         Update DOMException name: NamespaceError
2402         https://bugs.webkit.org/show_bug.cgi?id=102395
2403
2404         Reviewed by Kentaro Hara.
2405
2406         Patch 14 of 25 to update DOMException name to match the spec and Firefox.
2407
2408         Updated existing tests.
2409
2410         * dom/DOMCoreException.cpp:
2411
2412 2012-11-15  Tien-Ren Chen  <trchen@chromium.org>
2413
2414         Add Settings to disable custom scrollbars on main frame
2415         https://bugs.webkit.org/show_bug.cgi?id=102323
2416
2417         Reviewed by Adam Barth.
2418
2419         Custom scrollbars on main frame don't really work well on touch devices.
2420         Add a setting to inhibit their creation.
2421
2422         No new tests. No change in default layout behavior.
2423
2424         * page/FrameView.cpp:
2425         (WebCore::FrameView::createScrollbar):
2426         * page/Settings.in:
2427
2428 2012-11-15  Rick Byers  <rbyers@chromium.org>
2429
2430         custom CSS cursors ignore hotspot values embedded in CUR files
2431         https://bugs.webkit.org/show_bug.cgi?id=100059
2432
2433         Reviewed by Kenneth Russell.
2434
2435         Add reading the hotspot values to the ICOImageDecoder (for CUR files only),
2436         and plumb it through so that the existing calls to ImageSource::getHotSpot
2437         actually return the hot spot value when there is one.
2438
2439         Tests: fast/events/mouse-cursor.html, fast/events/mouse-cursor-multiframecur.html
2440
2441         * platform/graphics/ImageSource.cpp:
2442         (WebCore::ImageSource::getHotSpot):
2443         * platform/graphics/chromium/DeferredImageDecoder.cpp:
2444         (WebCore::DeferredImageDecoder::hotSpot):
2445         (WebCore::DeferredImageDecoder::hotSpotAtIndex):
2446         * platform/graphics/chromium/DeferredImageDecoder.h:
2447         (DeferredImageDecoder):
2448         * platform/image-decoders/ImageDecoder.h:
2449         (WebCore::ImageDecoder::hotSpot):
2450         (WebCore::ImageDecoder::hotSpotAtIndex):
2451         (ImageDecoder):
2452         * platform/image-decoders/ico/ICOImageDecoder.cpp:
2453         (WebCore::ICOImageDecoder::hotSpot):
2454         (WebCore::ICOImageDecoder::hotSpotAtIndex):
2455         (WebCore::ICOImageDecoder::processDirectory):
2456         (WebCore::ICOImageDecoder::readDirectoryEntry):
2457         * platform/image-decoders/ico/ICOImageDecoder.h:
2458         (ICOImageDecoder):
2459         (IconDirectoryEntry):
2460
2461 2012-11-15  Kenichi Ishibashi  <bashi@chromium.org>
2462
2463         Make OpenTypeVerticalData be ref-counted
2464         https://bugs.webkit.org/show_bug.cgi?id=101971
2465
2466         Reviewed by Tony Chang.
2467
2468         FontCache::purgeInactiveFontData() uses mark & sweep algorithm to remove unused
2469         OpenTypeVerticalData objects. It marks only OpenTypeVerticalData which can be reached
2470         via SimpleFontData in gFontDataCache. However, OpenTypeVerticalData can be referred by
2471         SimpleFontData which resides in CSSFontFaceSource::m_fontDataTable so the algorithm can
2472         delete active OpenTypeVerticalData. To avoid deleting active OpenTypeVerticalData, make
2473         it be ref-counted.
2474
2475         No new tests. No changes in behavior. Checked manually that the use-after-free was fixed.
2476
2477         * platform/graphics/FontCache.cpp:
2478         (WebCore): Use RefPtr instead of OwnPtr for FontVerticalDataCache.
2479         (WebCore::FontCache::getVerticalData): Return PassRefPtr<OpenTypeVerticalData>.
2480         (WebCore::FontCache::purgeInactiveFontData): Follow the change of OwnPtr -> RefPtr.
2481         * platform/graphics/FontCache.h:
2482         * platform/graphics/SimpleFontData.cpp:
2483         (WebCore::SimpleFontData::SimpleFontData):
2484         * platform/graphics/SimpleFontData.h:
2485         Use RefPtr instead of raw const pointer for OpenTypeVerticalData.
2486         (WebCore::SimpleFontData::verticalData):
2487         * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
2488         (WebCore::FontPlatformData::verticalData): Return PassRefPtr<OpenTypeVerticalData>.
2489         * platform/graphics/chromium/FontPlatformDataChromiumWin.h:
2490         (FontPlatformData):
2491         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
2492         (WebCore::FontPlatformData::verticalData): Ditto.
2493         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h:
2494         (WebCore):
2495         (FontPlatformData):
2496         * platform/graphics/opentype/OpenTypeVerticalData.h:
2497         (WebCore::OpenTypeVerticalData::create): Added.
2498         (OpenTypeVerticalData):
2499
2500 2012-11-15  Xingnan Wang  <xingnan.wang@intel.com>
2501
2502         Optimize the multiply-add in Biquad.cpp::process
2503         https://bugs.webkit.org/show_bug.cgi?id=75528
2504
2505         Reviewed by Brent Fulgham.
2506
2507         Pipeline the multiply-add with SSE2 intrinsics.
2508         Get ~45% performance improvement for the function.
2509
2510         * platform/audio/Biquad.cpp:
2511         (WebCore::Biquad::process):
2512
2513 2012-11-15  Alec Flett  <alecflett@chromium.org>
2514
2515         Add tests for explicit serialization values
2516         https://bugs.webkit.org/show_bug.cgi?id=96818
2517
2518         Reviewed by Adam Barth.
2519
2520         Expose direct access to the serialization/deserialization mechanisms
2521         of SerializedScriptValue to DumpRenderTree.
2522
2523         * testing/Internals.cpp:
2524         (WebCore::Internals::serializeObject):
2525         (WebCore):
2526         (WebCore::Internals::deserializeBuffer):
2527         * testing/Internals.h:
2528         (WebCore):
2529         * testing/Internals.idl:
2530
2531 2012-11-15  Gustavo Noronha Silva  <gns@gnome.org>
2532
2533         [GTK] Split WebCore/platform into a separate library
2534         https://bugs.webkit.org/show_bug.cgi?id=94435
2535
2536         Reviewed by Martin Robinson.
2537
2538         More people have been reporting problems when linking WebCore because
2539         the command line limit is being exceeded. Splitting WebCore a bit more
2540         is in order.
2541
2542         * GNUmakefile.am: add new libWebCorePlatform convenience library.
2543         * GNUmakefile.list.am: move list of platform/* files to its own variable.
2544
2545 2012-11-15  Luke Macpherson   <macpherson@chromium.org>
2546
2547         Remove unused macro HANDLE_INHERIT_AND_INITIAL_WITH_VALUE in StyleResolver.cpp
2548         https://bugs.webkit.org/show_bug.cgi?id=102036
2549
2550         Reviewed by Darin Adler.
2551
2552         Remove HANDLE_INHERIT_AND_INITIAL_WITH_VALUE macro, as it is not used anywhere.
2553
2554         No tests added because code is unused, and compile is enough to verify that conculsively.
2555
2556         * css/StyleResolver.cpp:
2557
2558 2012-11-15  Erik Arvidsson  <arv@chromium.org>
2559
2560         Update DOMException name: SyntaxError
2561         https://bugs.webkit.org/show_bug.cgi?id=102279
2562
2563         Reviewed by Kentaro Hara.
2564
2565         Patch 12 of 25 to update DOMException name to match the spec and Firefox.
2566
2567         Updated existing tests.
2568
2569         * dom/DOMCoreException.cpp:
2570
2571 2012-11-15  Takashi Sakamoto  <tasak@google.com>
2572
2573         [Win] key event's location does not work on Windows platform.
2574         https://bugs.webkit.org/show_bug.cgi?id=89742
2575
2576         Reviewed by Brent Fulgham.
2577
2578         As WM_KEYDOWN, WM_KEYUP, WM_SYSKEYDOWN, and WM_SYSKEYUP doesn't
2579         directly provide a virtual keycode which distinguish between left-hand
2580         and right-hand keys. To obtain a virtual keycode, we have to look at
2581         lparam, i.e. scancode and extended key bit. So if the given virtual
2582         keycode is control, shift, or menu, use MapVirtualKey with scancode and
2583         extended key bit and recreate a virtual keycode which distinguishes
2584         between left-hand and right-hand.
2585
2586         No new tests, because left-hand keys, right-hand keys layout tests
2587         have been already added.
2588
2589         * platform/win/KeyEventWin.cpp:
2590         (WebCore::windowsKeycodeWithLocation):
2591         Use wparam and lparam to recreate a virtual keycode which distinguishes
2592         between left-hand and right-hand if the given wparam (=virtual keycode)
2593         is control, shift, or menu.
2594         (WebCore):
2595         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2596         Use the newly added function to obtain windows virtual keycode.
2597
2598 2012-11-15  Joe Mason  <jmason@rim.com>
2599
2600         [BlackBerry] Don't assert when notifyAuthReceived is called with a different auth type
2601         https://bugs.webkit.org/show_bug.cgi?id=102436
2602
2603         Reviewed by Rob Buis.
2604
2605         The server type could change if we contact a site taking HTTP auth, through an HTTP proxy
2606         taking auth of its own. First we get a 407 from the proxy, and then when get past the
2607         proxy, we get a 401 from the end site - so notifyAuthReceived gets called again with auth
2608         type Proxy instead of HTTP.
2609
2610         The correct thing to do when that happens is skip the "update the auth type in the
2611         credentials" step, since these are actually new credentials and not just credentials being
2612         reused for a different auth type on the same server.
2613
2614         PR 241637
2615
2616         * platform/network/blackberry/NetworkJob.cpp:
2617         (WebCore::NetworkJob::notifyAuthReceived):
2618
2619 2012-11-15  Stephen Chenney  <schenney@chromium.org>
2620
2621         mpath elements do not clear resource lists before destruction
2622         https://bugs.webkit.org/show_bug.cgi?id=101505
2623
2624         Reviewed by Abhishek Arya.
2625
2626         The destructor for SVGMPathElement should clear its resources before
2627         deletion, so as not to leave hanging pointers in resource lists.
2628
2629         Test: svg/animations/mpath-remove-from-dependents-on-delete-crash.html
2630
2631         * svg/SVGMPathElement.cpp:
2632         (WebCore::SVGMPathElement::~SVGMPathElement): Add destructor that calls clearResourceReferences.
2633         (WebCore):
2634         * svg/SVGMPathElement.h:
2635         (SVGMPathElement): Add destructor.
2636
2637 2012-11-15  Kentaro Hara  <haraken@chromium.org>
2638
2639         Remove CodeGenerator::StripModule
2640         https://bugs.webkit.org/show_bug.cgi?id=102338
2641
2642         Reviewed by Adam Barth.
2643
2644         Now WebKit IDL files have no modules. (The Web IDL spec has no modules.)
2645         We can remove CodeGenerator::StripModule.
2646         This might break some internal builds if the internal builds are still
2647         using modules. Ping haraken@ you observe it.
2648
2649         No tests. No change in behavior.
2650
2651         * bindings/scripts/CodeGenerator.pm:
2652         (ForAllParents):
2653         (AttributeNameForGetterAndSetter):
2654         (IsStrictSubtype):
2655         * bindings/scripts/CodeGeneratorCPP.pm:
2656         (GetClassName):
2657         (GetImplClassName):
2658         (GetParentImplClassName):
2659         (GetParent):
2660         (ConversionNeeded):
2661         (GetCPPTypeGetter):
2662         (AddForwardDeclarationsForType):
2663         (AddIncludesForType):
2664         (GenerateImplementation):
2665         * bindings/scripts/CodeGeneratorGObject.pm:
2666         (GetParentClassName):
2667         (GetParentGObjType):
2668         (GetClassName):
2669         * bindings/scripts/CodeGeneratorJS.pm:
2670         (GetParentClassName):
2671         (AddIncludesForTypeInImpl):
2672         (AddIncludesForTypeInHeader):
2673         (GenerateParametersCheckExpression):
2674         (GenerateImplementation):
2675         (GenerateParametersCheck):
2676         (GetNativeTypeFromSignature):
2677         (JSValueToNative):
2678         (NativeToJSValue):
2679         * bindings/scripts/CodeGeneratorObjC.pm:
2680         (GetClassName):
2681         (GetImplClassName):
2682         (GetParentImplClassName):
2683         (GetParentAndProtocols):
2684         (GetPropertyAttributes):
2685         (ConversionNeeded):
2686         (GetObjCTypeGetter):
2687         (AddForwardDeclarationsForType):
2688         (AddIncludesForType):
2689         (GenerateImplementation):
2690         * bindings/scripts/CodeGeneratorV8.pm:
2691         (AddIncludesForType):
2692         (GenerateHeader):
2693         (IsSubType):
2694         (GenerateSingleBatchedAttribute):
2695         (GenerateImplementation):
2696         (BaseInterfaceName):
2697         (GetTypeFromSignature):
2698         (IsWrapperType):
2699
2700 2012-11-15  Luke Macpherson   <macpherson@chromium.org>
2701
2702         Make assumptions about m_parentStyle consistent within StyleResolver::applyProperty()
2703         https://bugs.webkit.org/show_bug.cgi?id=101696
2704
2705         Reviewed by Tony Chang.
2706
2707         Most of the code in StyleResolver::applyProperty assumes that isInherit implies that m_parentStyle is available.
2708         This patch ASSERTs that this assumption is correct, and removes the few existing checks to maintain consistency.
2709
2710         No new tests / covered by all existing CSS tests.
2711
2712         * css/StyleResolver.cpp:
2713         (WebCore::StyleResolver::applyProperty):
2714
2715 2012-11-15  Kentaro Hara  <haraken@chromium.org>
2716
2717         [V8] Remove redundant $interfaceName from function parameters
2718         https://bugs.webkit.org/show_bug.cgi?id=102334
2719
2720         Reviewed by Adam Barth.
2721
2722         'sub func { my $dataNode = shift; my $interfaceName = shift; }'
2723         is redundant. We can get $interfaceName by $dataNode->name.
2724
2725         No tests. No change in behavior.
2726
2727         * bindings/scripts/CodeGeneratorV8.pm:
2728         (GenerateOpaqueRootForGC):
2729         (GenerateHeader):
2730         (GenerateConstructorGetter):
2731         (GenerateNormalAttrGetter):
2732         (GenerateReplaceableAttrSetter):
2733         (GenerateNormalAttrSetter):
2734         (GenerateOverloadedFunctionCallback):
2735         (GenerateFunctionCallback):
2736         (GenerateOverloadedConstructorCallback):
2737         (GenerateSingleConstructorCallback):
2738         (GenerateConstructorCallback):
2739         (GenerateEventConstructorCallback):
2740         (GenerateTypedArrayConstructorCallback):
2741         (GenerateNamedConstructorCallback):
2742         (GenerateBatchedAttributeData):
2743         (GenerateImplementation):
2744         (GenerateToV8Converters):
2745         (GetNativeTypeForConversions):
2746
2747 2012-11-15  Simon Fraser  <simon.fraser@apple.com>
2748
2749         Ensure that scrollbar layers show debug borders
2750         https://bugs.webkit.org/show_bug.cgi?id=102429
2751
2752         Reviewed by Anders Carlsson.
2753
2754         After r133517, scrollbar layers no longer showed debug borders, which
2755         was very confusing. Fix this by explicitly calling setShowDebugBorder()
2756         on the scrollbar-related layers owned by RenderLayerCompositor
2757         and RenderLayerBacking.
2758         
2759         * rendering/RenderLayerBacking.cpp:
2760         (WebCore::RenderLayerBacking::updateDebugIndicators):
2761         * rendering/RenderLayerCompositor.cpp:
2762         (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
2763         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
2764
2765 2012-11-15  Andreas Kling  <akling@apple.com>
2766
2767         ASSERTION FAILED: fastAttributeLookupAllowed(name) for 7 layout tests
2768         <http://webkit.org/b/102423>
2769
2770         Reviewed by Anders Carlsson.
2771
2772         Use Element::getAttributeItem() to find out if the element has a given attribute
2773         instead of fastHasAttribute() since that causes assertions for the "style" attribute.
2774
2775         * html/parser/HTMLConstructionSite.cpp:
2776         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
2777
2778 2012-11-15  Erik Arvidsson  <arv@chromium.org>
2779
2780         Update DOMException name: DOMStringSizeError
2781         https://bugs.webkit.org/show_bug.cgi?id=102089
2782
2783         Reviewed by Ojan Vafai.
2784
2785         Patch 2 of 25 to update DOMException name to match the spec and Firefox.
2786
2787         DOMSTRING_SIZE_ERR is historical and not used in any spec or in our code.
2788
2789         * dom/DOMCoreException.cpp:
2790         * dom/ExceptionCode.h:
2791
2792 2012-11-15  Joshua Bell  <jsbell@chromium.org>
2793
2794         IndexedDB: Indexing tests are flaky-crashing
2795         https://bugs.webkit.org/show_bug.cgi?id=102283
2796
2797         Reviewed by Tony Chang.
2798
2799         Processing the final task can cause IDBTransactionBackendImpl references to be released
2800         by all holders. Prior to looping over the tasks (or, in an even earlier implementation,
2801         swapping queues) control would fall off the end of the function. The loop termination
2802         check introduced in http://wkrev.com/134529 requires that |this| be kept alive until
2803         the method completes.
2804
2805         Test: storage/indexeddb/transaction-crash-in-tasks.html
2806
2807         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
2808         (WebCore::IDBTransactionBackendImpl::abort): Rename self => protect.
2809         (WebCore::IDBTransactionBackendImpl::commit): Rename self => protect.
2810         (WebCore::IDBTransactionBackendImpl::taskTimerFired): New self-ref.
2811
2812 2012-11-15  Elliott Sprehn  <esprehn@chromium.org>
2813
2814         MutationObserver wrapper should not be collected while still observing
2815         https://bugs.webkit.org/show_bug.cgi?id=102328
2816
2817         Reviewed by Adam Barth.
2818
2819         Make MutationObserver an ActiveDOMObject so that the wrapper is not
2820         collected while it is still observing the DOM. This is needed because
2821         the wrapper is passed into the callback and expandos on the wrapper
2822         should be preserved.
2823
2824         Test: fast/mutation/observer-wrapper-dropoff.html
2825
2826         * bindings/js/JSMutationObserverCustom.cpp:
2827         (WebCore::JSMutationObserverConstructor::constructJSMutationObserver):
2828         * bindings/v8/custom/V8MutationObserverCustom.cpp:
2829         (WebCore::V8MutationObserver::constructorCallback):
2830         * dom/MutationObserver.cpp:
2831         (WebCore::MutationObserver::create):
2832         (WebCore::MutationObserver::MutationObserver):
2833         (WebCore::MutationObserver::observationStarted):
2834         (WebCore::MutationObserver::observationEnded):
2835         * dom/MutationObserver.h:
2836         (WebCore):
2837         * dom/MutationObserver.idl:
2838
2839 2012-11-15  Tony Chang  <tony@chromium.org>
2840
2841         Generate Settings from a .in file
2842         https://bugs.webkit.org/show_bug.cgi?id=100393
2843
2844         Reviewed by Adam Barth.
2845
2846         Generate most settings from an .in file to reduce human mistakes and
2847         to make it easier to add/remove new settings.
2848
2849         I only moved settings that are easy to move at this point.  There are many more that
2850         have some minor naming inconsistencies that we can also move to Settings.in, but I'll
2851         do that in a follow up patch.
2852
2853         This doesn't generate SettingInternals.* yet-- we can do that in a follow up patch.
2854
2855         No new tests, this is a refactor.
2856
2857         * CMakeLists.txt:
2858         * DerivedSources.make: Run make_settings.pl.
2859         * DerivedSources.pri: Run make_settings.pl.
2860         * GNUmakefile.am: Run make_settings.pl.
2861         * GNUmakefile.list.am:
2862         * WebCore.exp.in: Remove functions that are now inline in the header.
2863         * WebCore.gyp/WebCore.gyp: Run action_makenames.py, which will run make_settings.pl.
2864         * WebCore.gyp/scripts/action_makenames.py:
2865         (main): Allow make_settings.pl.
2866         * WebCore.order: Remove functions that are now inline in the header.
2867         * html/ValidationMessage.cpp:
2868         (WebCore::ValidationMessage::setMessageDOMAndStartTimer): Fix a typo in "magnification".
2869         * page/Settings.cpp:
2870         (WebCore::Settings::Settings): Replace generated settings with SETTINGS_INITIALIZER_LIST.
2871         * page/Settings.h:
2872         (Settings): Replace generated settings with SETTINGS_GETTERS_AND_SETTERS and SETTINGS_MEMBER_VARIABLES.
2873         * page/Settings.in: Added.
2874         * page/make_settings.pl: Added.
2875         (defaultItemFactory):
2876         (generateCode):
2877         (generateHeader): Use a similar model as make_names.pl.
2878         (printConditionalMacros):
2879         (printGettersAndSetters):
2880         (printMemberVariables):
2881         (printGetterAndSetter):
2882         (printInitializerList):
2883         (printInitializer):
2884
2885 2012-11-15  Alpha Lam  <hclam@chromium.org>
2886
2887         [chromium] Refactoring to move logic of creating lazy decoded SkBitmap into DeferredImageDecoder
2888         https://bugs.webkit.org/show_bug.cgi?id=102019
2889
2890         Reviewed by Stephen White.
2891
2892         Goal of this change is to keep ImageDecodingStore clean and only do
2893         image caching. Logic of creating lazily decoded SkBitmaps is moved into
2894         DeferredImageDecoder.
2895
2896         In particular these two methods are moved:
2897         - ImageDecodingStore::createLazyDecodedSkBitmap
2898         - ImageDecodingStore::resizeLazyDecodedSkBitmap
2899
2900         No new tests. There is no new code (really). It is just moved from
2901         ImageDecodingStore to DeferredImageDecoder.
2902
2903         No change in behavior. Code is tested with:
2904         Unit tests: webkit_unit_tests
2905         Layout test: platform/chromium/virtual/deferred
2906
2907         * platform/graphics/chromium/DeferredImageDecoder.cpp:
2908         (WebCore::DeferredImageDecoder::isLazyDecoded):
2909         (WebCore):
2910         (WebCore::DeferredImageDecoder::resizeLazyDecodedSkBitmap):
2911         (WebCore::DeferredImageDecoder::frameBufferAtIndex):
2912         (WebCore::DeferredImageDecoder::setData):
2913         (WebCore::DeferredImageDecoder::createLazyDecodedSkBitmap):
2914         * platform/graphics/chromium/DeferredImageDecoder.h:
2915         (WebCore):
2916         (DeferredImageDecoder):
2917         * platform/graphics/chromium/ImageDecodingStore.cpp:
2918         * platform/graphics/chromium/ImageDecodingStore.h:
2919         (ImageDecodingStore):
2920         * platform/graphics/chromium/ImageFrameGenerator.cpp:
2921         (WebCore::ImageFrameGenerator::ImageFrameGenerator):
2922         * platform/graphics/chromium/ImageFrameGenerator.h:
2923         (WebCore::ImageFrameGenerator::create):
2924         (ImageFrameGenerator):
2925         * platform/graphics/skia/NativeImageSkia.cpp:
2926         (WebCore::NativeImageSkia::resizedBitmap):
2927
2928 2012-11-15  Roger Fong  <roger_fong@apple.com>
2929
2930         Unreviewed. Build fix for Windows after r134767.
2931
2932         Update vsprops and vcproj files to reflect changes to file locations in r134767.
2933
2934         * WebCore.vcproj/WebCore.vcproj:
2935         * WebCore.vcproj/WebCoreCommon.vsprops:
2936
2937 2012-11-15  Elliott Sprehn  <esprehn@chromium.org>
2938
2939         Track subframe count to avoid traversing the tree when there's no subframes
2940         https://bugs.webkit.org/show_bug.cgi?id=101821
2941
2942         Reviewed by Ojan Vafai.
2943
2944         Bug 101619 showed a 9-14% improvement from not walking the children during
2945         removeChild looking for frames when there's known to be no frames. The fix
2946         in that bug only avoids this walk when the whole document has no frames, this
2947         patch extends it to skip traversing subtrees that have no iframes by hooking
2948         the frame assignment to walk up the tree and keep track of the count of frames
2949         in the subtree on contentFrame assignment and then decrement it on disconnect.
2950
2951         No new tests, this is just a perf refactor.
2952
2953         * dom/ContainerNode.cpp:
2954         (WebCore::willRemoveChildren):
2955         * dom/ContainerNodeAlgorithms.cpp:
2956         (WebCore::ChildFrameDisconnector::collectFrameOwners):
2957         * dom/ContainerNodeAlgorithms.h:
2958         (WebCore::ChildFrameDisconnector::ChildFrameDisconnector):
2959         (ChildFrameDisconnector):
2960         (WebCore::ChildFrameDisconnector::collectFrameOwners):
2961           Renamed from collectDescendant() to better reflect what it really does.
2962         (WebCore::ChildFrameDisconnector::disconnectCollectedFrameOwners):
2963           Renamed from disconnect() to better reflect what it really does.
2964         (WebCore::ChildFrameDisconnector::disconnect):
2965           New method that does the collection of frame owners on either the root
2966           or only it's descendants.
2967         * dom/Node.cpp:
2968         (WebCore::Node::connectedSubframeCount):
2969         (WebCore::Node::incrementConnectedSubframeCount):
2970         (WebCore::Node::decrementConnectedSubframeCount):
2971         * dom/Node.h:
2972         * dom/NodeRareData.h:
2973         (WebCore::NodeRareData::NodeRareData):
2974         (WebCore::NodeRareData::connectedSubframeCount):
2975         (WebCore::NodeRareData::incrementConnectedSubframeCount):
2976         (WebCore::NodeRareData::decrementConnectedSubframeCount):
2977         * html/HTMLFrameOwnerElement.cpp:
2978         (WebCore::HTMLFrameOwnerElement::setContentFrame):
2979         (WebCore::HTMLFrameOwnerElement::disconnectContentFrame):
2980
2981 2012-11-15  Alpha Lam  <hclam@chromium.org>
2982
2983         [chromium] WebGL texImage2D fails with deferred image decoding
2984         https://bugs.webkit.org/show_bug.cgi?id=102310
2985
2986         Reviewed by Kenneth Russell.
2987
2988         Skia's implementation of GraphicsContext3D::getImageData() uses ImageSource
2989         to decode an image. When deferred image decoding is enabled this class
2990         generates an ImageFrame marked as incomplete, which WebGL rejects. This results
2991         in failing of texImage2D.
2992
2993         This change uses ImageDecoder directly instead of ImageSource. This skips
2994         the code path of deferred image decoding. This behavior is correct because
2995         GraphicsContext3D wants to decode the image differently with alpha not
2996         premultiplied and color profile applied optionally.
2997
2998         Added a test to prove this change fixed the bug.
2999
3000         Test: fast/images/webgl-teximage2d.html
3001
3002         * platform/graphics/skia/GraphicsContext3DSkia.cpp:
3003         (WebCore::GraphicsContext3D::getImageData):
3004
3005 2012-11-15  Jer Noble  <jer.noble@apple.com>
3006
3007         Further unreviewed build fix. Add explicit static_casts to avoid implicit precision warnings.
3008
3009         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
3010         (WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource):
3011
3012 2012-11-15  Jer Noble  <jer.noble@apple.com>
3013
3014         Unreviewed build fix. Avoid implicit precision and unused parameter warnings.
3015
3016         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
3017         (WebCore::WebCoreAVFResourceLoader::responseReceived):
3018         (WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource):
3019
3020 2012-11-15  Adam Barth  <abarth@webkit.org>
3021
3022         [V8] We shouldn't call deprecated V8 APIs
3023         https://bugs.webkit.org/show_bug.cgi?id=102407
3024
3025         Reviewed by Eric Seidel.
3026
3027         This patch was written by Sven Panne on the V8 team. He would prefer
3028         that we not call deprecated V8 APIs. This patch updates these call
3029         sites to more modern idioms.
3030
3031         * bindings/scripts/CodeGeneratorV8.pm:
3032         (GenerateConstructorGetter):
3033         (GenerateImplementation):
3034         * bindings/scripts/test/V8/V8TestObj.cpp:
3035         (WebCore::TestObjV8Internal::TestObjConstructorGetter):
3036         * bindings/v8/PageScriptDebugServer.cpp:
3037         (WebCore::PageScriptDebugServer::addListener):
3038         * bindings/v8/ScriptController.cpp:
3039         (WebCore::ScriptController::setContextDebugId):
3040         (WebCore::ScriptController::contextDebugId):
3041         * bindings/v8/ScriptProfiler.cpp:
3042         (WebCore::ScriptProfiler::objectByHeapObjectId):
3043             - This code doesn't seem to do anything anymore.
3044         * bindings/v8/V8DOMConfiguration.h:
3045         (WebCore::V8DOMConfiguration::configureAttribute):
3046         * bindings/v8/V8DOMWindowShell.cpp:
3047         (WebCore::setInjectedScriptContextDebugId):
3048         * bindings/v8/V8DOMWrapper.cpp:
3049         (WebCore::V8DOMWrapper::maybeDOMWrapper):
3050         (WebCore::V8DOMWrapper::isWrapperOfType):
3051         * bindings/v8/V8EventListenerList.h:
3052         (WebCore::V8EventListenerList::doFindWrapper):
3053         (WebCore::V8EventListenerList::findOrCreateWrapper):
3054         * bindings/v8/WorkerContextExecutionProxy.cpp:
3055         (WebCore::WorkerContextExecutionProxy::initializeIfNeeded):
3056         * bindings/v8/WrapperTypeInfo.h:
3057         (WebCore::WrapperTypeInfo::unwrap):
3058
3059 2012-11-15  Sheriff Bot  <webkit.review.bot@gmail.com>
3060
3061         Unreviewed, rolling out r134800 and r134805.
3062         http://trac.webkit.org/changeset/134800
3063         http://trac.webkit.org/changeset/134805
3064         https://bugs.webkit.org/show_bug.cgi?id=102417
3065
3066         This patch broke chromium port (Requested by jianli on
3067         #webkit).
3068
3069         * Modules/mediastream/RTCPeerConnection.cpp:
3070         (WebCore::RTCPeerConnection::RTCPeerConnection):
3071         (WebCore::RTCPeerConnection::createOffer):
3072         (WebCore::RTCPeerConnection::createAnswer):
3073         (WebCore::RTCPeerConnection::setLocalDescription):
3074         (WebCore::RTCPeerConnection::localDescription):
3075         (WebCore::RTCPeerConnection::setRemoteDescription):
3076         (WebCore::RTCPeerConnection::remoteDescription):
3077         (WebCore::RTCPeerConnection::updateIce):
3078         (WebCore::RTCPeerConnection::addIceCandidate):
3079         (WebCore::RTCPeerConnection::readyState):
3080         (WebCore::RTCPeerConnection::iceState):
3081         (WebCore::RTCPeerConnection::addStream):
3082         (WebCore::RTCPeerConnection::close):
3083         (WebCore::RTCPeerConnection::stop):
3084         (WebCore::RTCPeerConnection::changeReadyState):
3085         (WebCore::RTCPeerConnection::scheduledEventTimerFired):
3086         * Modules/mediastream/RTCPeerConnection.h:
3087         (RTCPeerConnection):
3088         * Modules/mediastream/RTCPeerConnection.idl:
3089         * dom/EventNames.h:
3090         (WebCore):
3091         * platform/mediastream/RTCDataChannelDescriptor.cpp:
3092         (WebCore::RTCDataChannelDescriptor::RTCDataChannelDescriptor):
3093         (WebCore::RTCDataChannelDescriptor::readyStateChanged):
3094         * platform/mediastream/RTCPeerConnectionHandlerClient.h:
3095         (RTCPeerConnectionHandlerClient):
3096         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
3097         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
3098         (RTCPeerConnectionHandlerChromium):
3099
3100 2012-11-15  Elliott Sprehn  <esprehn@chromium.org>
3101
3102         Remove Node::aboutToUnload and be more explicit about what it was for
3103         https://bugs.webkit.org/show_bug.cgi?id=102357
3104
3105         Reviewed by Ryosuke Niwa.
3106
3107         Node::aboutToUnload was confusingly named because it was only called on
3108         the focused node, and it really only existed to support notifying the
3109         embedder that inputs should stop being editable on unload. Instead add
3110         a new method to HTMLInputElement that ends editing and call that
3111         explicitly in the FrameLoader so it's clear what this is about.
3112
3113         No new tests, this is just a refactoring.
3114
3115         * dom/Node.h:
3116         * html/HTMLInputElement.cpp:
3117         (WebCore::HTMLInputElement::endEditing):
3118             New method that handles finishing editing.
3119         * html/HTMLInputElement.h:
3120         (HTMLInputElement):
3121         * html/TextFieldInputType.cpp:
3122         (WebCore::TextFieldInputType::handleBlurEvent):
3123             Use the new method to reduce code duplication.
3124         * loader/FrameLoader.cpp:
3125         (WebCore::FrameLoader::stopLoading):
3126             Be explicit about what this check was for.
3127
3128 2012-11-15  Tommy Widenflycht  <tommyw@google.com>
3129
3130         [chromium] MediaStream API: Add missing WebRTCPeerConnectionHandlerClient::didAddRemoteDataChannel
3131         https://bugs.webkit.org/show_bug.cgi?id=102386
3132
3133         Reviewed by Adam Barth.
3134
3135         Existing tests expanded to cover patch.
3136
3137         * platform/mediastream/RTCDataChannelDescriptor.cpp:
3138         (WebCore::RTCDataChannelDescriptor::RTCDataChannelDescriptor):
3139         (WebCore::RTCDataChannelDescriptor::readyStateChanged):
3140         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
3141         (WebCore::RTCPeerConnectionHandlerChromium::didAddRemoteDataChannel):
3142         (WebCore):
3143         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
3144         (WebKit):
3145         (RTCPeerConnectionHandlerChromium):
3146
3147 2012-11-15  Rick Byers  <rbyers@chromium.org>
3148
3149         No tests for changing mouse cursors
3150         https://bugs.webkit.org/show_bug.cgi?id=100550
3151
3152         Reviewed by Brent Fulgham.
3153
3154         Add infrastructure to keep track of the last set mouse cursor,
3155         and then to query it from DumpRenderTree.  Also adds ASSERTs to help ensure
3156         we can reliably detect when an uninitialized Cursor object is used (such as
3157         the one that can be returned from OptionalCursor in the NoCursorChange scenario).
3158
3159         Test: fast/events/mouse-cursor.html
3160
3161         * WebCore.exp.in: Add Cursor copy ctor export
3162         * page/EventHandler.cpp:
3163         (WebCore::OptionalCursor::cursor):
3164         (WebCore::EventHandler::handleMouseMoveEvent): Keep track of last set mouse cursor
3165         * page/EventHandler.h:
3166         (WebCore::EventHandler::currentMouseCursor): New getter for last set mouse cursor
3167         * platform/Cursor.h:
3168         (WebCore::Cursor::Cursor): Mark uninitialized cursor types as invalid.
3169         (WebCore::Cursor::type): Assert cursor type is valid.
3170         * testing/Internals.cpp:
3171         (WebCore::cursorTypeToString): Helper to convert cursor type to enum
3172         (WebCore):
3173         (WebCore::Internals::getCurrentCursorInfo): New function to return a string describing the last set mouse cursor
3174         * testing/Internals.h: Declare getCurrentCursorInfo
3175         * testing/Internals.idl: Declare getCurrentCursorInfo
3176
3177 2012-11-13  Jer Noble  <jer.noble@apple.com>
3178
3179         Support loading of blob URLs in AVFoundation.
3180         https://bugs.webkit.org/show_bug.cgi?id=102182
3181
3182         Reviewed by Eric Carlson.
3183
3184         Add support for BLOB (and other non-natively supported schemed) URLs through the AVAssetResourceLoader API.
3185
3186         Test: media/video-src-blob.html
3187
3188         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3189         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3190         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource): Only go down the encrypted
3191             media path if the key scheme is skp://.
3192         (WebCore::MediaPlayerPrivateAVFoundationObjC::didCancelLoadingRequest): Added.  Cancel resource loading if
3193             the media engine requests it.
3194         (WebCore::MediaPlayerPrivateAVFoundationObjC::addKey): Use the new, non-deprecated API.
3195         
3196         Use the dispatch_main_queue() as the AVAssetResourceLoadDelegate queue now that <rdar://problem/12362461> is fixed.
3197         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3198         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
3199         (-[WebCoreAVFLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]):
3200         (-[WebCoreAVFLoaderDelegate resourceLoader:didCancelLoadingRequest:]):
3201
3202         Add a new helper class to manage loading the CachedRawResource and feed the incoming
3203         data to the AVAssetResourceLoader.
3204         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h: Added.
3205         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm: Added.
3206         (WebCore::WebCoreAVFResourceLoader::create): Simple factory.
3207         (WebCore::WebCoreAVFResourceLoader::WebCoreAVFResourceLoader): Simple constructor.
3208         (WebCore::WebCoreAVFResourceLoader::~WebCoreAVFResourceLoader): Simple destructor.
3209         (WebCore::WebCoreAVFResourceLoader::startLoading): Tell the cachedResourceLoader to schedule loading.
3210         (WebCore::WebCoreAVFResourceLoader::stopLoading): Remove this as a client of the resource.
3211         (WebCore::WebCoreAVFResourceLoader::responseReceived): Fill in the contentInformation field of the 
3212             AVAssetResourceLoadingRequest.
3213         (WebCore::WebCoreAVFResourceLoader::dataReceived): Call fulfillRequestWithResource.
3214         (WebCore::WebCoreAVFResourceLoader::notifyFinished): Tell the AVAssetResourceLoadingRequest that loading
3215             has completed.
3216         (WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource): Fill in (if possible) the dataRequest
3217             field of the AVAssetResourceLoadingRequest.
3218
3219         Add a MediaPlayerClient method allowing MediaPlayerPrivate subclasses to access the HTMLMediaElement's
3220         document's cachedResourceLoader.
3221         * html/HTMLMediaElement.cpp:
3222         (WebCore::HTMLMediaElement::mediaPlayerCachedResourceLoader):
3223         * html/HTMLMediaElement.h:
3224         * platform/graphics/MediaPlayer.cpp:
3225         (WebCore::MediaPlayer::cachedResourceLoader):
3226         * platform/graphics/MediaPlayer.h:
3227         (WebCore::MediaPlayerClient::mediaPlayerCachedResourceLoader):
3228
3229         Add a convenience method to convert from MIME type -> UTI.
3230         * platform/network/mac/UTIUtilities.h:
3231         * platform/network/mac/UTIUtilities.mm:
3232         (WebCore::UTIFromMIMEType):
3233
3234         Add new files to project.
3235         * WebCore.xcodeproj/project.pbxproj:
3236
3237 2012-11-15  Kenneth Rohde Christiansen  <kenneth@webkit.org>
3238
3239         Remove initiallyFitToViewport attribute
3240         https://bugs.webkit.org/show_bug.cgi?id=102392
3241
3242         Reviewed by Noam Rosenthal.
3243
3244         Remove the initiallyFitToViewport which shouldn't have been
3245         added in the first place. We now reset userScalable to auto (-1)
3246         in case it was not explicitly set by the web author.
3247
3248         Same behavior, covered by existing tests.
3249
3250         * dom/ViewportArguments.cpp:
3251         (WebCore::ViewportArguments::resolve):
3252         * dom/ViewportArguments.h:
3253         (ViewportAttributes):
3254
3255 2012-11-15  Tommy Widenflycht  <tommyw@google.com>
3256
3257         MediaStream API: Update RTCPeerConnection states to match the latest editors draft
3258         https://bugs.webkit.org/show_bug.cgi?id=102382
3259
3260         Reviewed by Adam Barth.
3261
3262         Updating readyState & iceState, and adding iceGatheringState.
3263         Also safeguarding the event timer callback.
3264
3265         Patch covered by existing tests.
3266
3267         * Modules/mediastream/RTCPeerConnection.cpp:
3268         (WebCore::RTCPeerConnection::RTCPeerConnection):
3269         (WebCore::RTCPeerConnection::createOffer):
3270         (WebCore::RTCPeerConnection::createAnswer):
3271         (WebCore::RTCPeerConnection::setLocalDescription):
3272         (WebCore::RTCPeerConnection::localDescription):
3273         (WebCore::RTCPeerConnection::setRemoteDescription):
3274         (WebCore::RTCPeerConnection::remoteDescription):
3275         (WebCore::RTCPeerConnection::updateIce):
3276         (WebCore::RTCPeerConnection::addIceCandidate):
3277         (WebCore::RTCPeerConnection::readyState):
3278         (WebCore::RTCPeerConnection::iceGatheringState):
3279         (WebCore):
3280         (WebCore::RTCPeerConnection::iceState):
3281         (WebCore::RTCPeerConnection::addStream):
3282         (WebCore::RTCPeerConnection::close):
3283         (WebCore::RTCPeerConnection::didChangeIceGatheringState):
3284         (WebCore::RTCPeerConnection::stop):
3285         (WebCore::RTCPeerConnection::changeReadyState):
3286         (WebCore::RTCPeerConnection::scheduledEventTimerFired):
3287         * Modules/mediastream/RTCPeerConnection.h:
3288         (RTCPeerConnection):
3289         * Modules/mediastream/RTCPeerConnection.idl:
3290         * dom/EventNames.h:
3291         (WebCore):
3292         * platform/mediastream/RTCPeerConnectionHandlerClient.h:
3293         (RTCPeerConnectionHandlerClient):
3294         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
3295         (WebCore::RTCPeerConnectionHandlerChromium::didChangeICEGatheringState):
3296         (WebCore):
3297         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
3298         (RTCPeerConnectionHandlerChromium):
3299
3300 2012-11-15  Sheriff Bot  <webkit.review.bot@gmail.com>
3301
3302         Unreviewed, rolling out r134649 and r134665.
3303         http://trac.webkit.org/changeset/134649
3304         http://trac.webkit.org/changeset/134665
3305         https://bugs.webkit.org/show_bug.cgi?id=102413
3306
3307         Broke a ton of downstream chromium tests (Requested by japhet
3308         on #webkit).
3309
3310         * loader/DocumentLoader.cpp:
3311         (WebCore::DocumentLoader::DocumentLoader):
3312         (WebCore::DocumentLoader::~DocumentLoader):
3313         (WebCore::DocumentLoader::finishedLoading):
3314         (WebCore::DocumentLoader::clearMainResourceLoader):
3315         (WebCore::DocumentLoader::isLoadingInAPISense):
3316         (WebCore::DocumentLoader::documentURL):
3317         (WebCore::DocumentLoader::isLoadingMainResource):
3318         (WebCore::DocumentLoader::startLoadingMainResource):
3319         * loader/DocumentLoader.h:
3320         (DocumentLoader):
3321         * loader/FrameLoader.cpp:
3322         (WebCore::FrameLoader::FrameLoader):
3323         (WebCore::FrameLoader::init):
3324         * loader/FrameLoaderStateMachine.cpp:
3325         (WebCore::FrameLoaderStateMachine::FrameLoaderStateMachine):
3326         * loader/FrameLoaderStateMachine.h:
3327         * loader/MainResourceLoader.cpp:
3328         (WebCore::shouldLoadAsEmptyDocument):
3329         (WebCore):
3330         (WebCore::MainResourceLoader::continueAfterContentPolicy):
3331         (WebCore::MainResourceLoader::didReceiveResponse):
3332         (WebCore::MainResourceLoader::didFinishLoading):
3333         (WebCore::MainResourceLoader::handleEmptyLoad):
3334         (WebCore::MainResourceLoader::loadNow):
3335         (WebCore::MainResourceLoader::load):
3336         * loader/MainResourceLoader.h:
3337         (MainResourceLoader):
3338
3339 2012-11-15  Kentaro Hara  <haraken@chromium.org>
3340
3341         Correct syntax of old-style IDL files
3342         https://bugs.webkit.org/show_bug.cgi?id=102335
3343
3344         Reviewed by Adam Barth.
3345
3346         Recently tasak@ corrected an IDL syntax of almost all IDL files.
3347         We should correct the rest of them.
3348
3349         No tests. No change in behavior.
3350
3351         * html/canvas/OESElementIndexUint.idl:
3352         * page/PerformanceMark.idl:
3353         * page/PerformanceMeasure.idl:
3354
3355 2012-11-15  Elliott Sprehn  <esprehn@chromium.org>
3356
3357         Remove isHTMLInputElement since it's unused and toInputElement exists 
3358         https://bugs.webkit.org/show_bug.cgi?id=102358
3359
3360         Reviewed by Ojan Vafai.
3361
3362         Remove isHTMLInputElement as no one uses it. Everyone just uses
3363         Node::toInputElement and checks for a 0 return value instead.
3364
3365         toInputElement is also more reliable as there's no requirement that
3366         subclasses of HTMLInputElement have the tag name of inputTag so using
3367         this method in a check could potentially miss future subclasses with
3368         different tag names, though none exist right now.
3369
3370         No new tests, this just deletes dead code.
3371
3372         * html/HTMLInputElement.h:
3373
3374 2012-11-15  Erik Arvidsson  <arv@chromium.org>
3375
3376         Update DOMException name: NotSupportedError
3377         https://bugs.webkit.org/show_bug.cgi?id=102139
3378
3379         Reviewed by Ojan Vafai.
3380
3381         Patch 9 of 25 to update DOMException name to match the spec and Firefox.
3382
3383         Updated existing tests.
3384
3385         * dom/DOMCoreException.cpp:
3386
3387 2012-11-15  Elliott Sprehn  <esprehn@chromium.org>
3388
3389         Remove isHTMLInputElement since it's unused and toInputElement exists 
3390         https://bugs.webkit.org/show_bug.cgi?id=102358
3391
3392         Reviewed by Ojan Vafai.
3393
3394         Remove isHTMLInputElement as no one uses it. Everyone just uses
3395         Node::toInputElement and checks for a 0 return value instead.
3396
3397         toInputElement is also more reliable as there's no requirement that
3398         subclasses of HTMLInputElement have the tag name of inputTag so using
3399         this method in a check could potentially miss future subclasses with
3400         different tag names, though none exist right now.
3401
3402         No new tests, this just deletes dead code.
3403
3404         * html/HTMLInputElement.h:
3405
3406 2012-11-15  Erik Arvidsson  <arv@chromium.org>
3407
3408         Update DOMException name: NoModificationAllowedError
3409         https://bugs.webkit.org/show_bug.cgi?id=102134
3410
3411         Reviewed by Ojan Vafai.
3412
3413         Patch 7 of 25 to update DOMException name to match the spec and Firefox.
3414
3415         Updated existing tests.
3416
3417         * dom/DOMCoreException.cpp:
3418
3419 2012-11-15  Miguel Garcia  <miguelg@chromium.org>
3420
3421         Remove unnecesary dependencies INPUT_TYPE_COLOR
3422         https://bugs.webkit.org/show_bug.cgi?id=102379
3423
3424         Reviewed by Darin Adler.
3425
3426         Platforms should be able to enable INPUT_TYPE_COLOR without enabling
3427         CALENDAR_PICKER and DATALIST_ELEMENT. Before this patch however there would be
3428         compile errors in such configuration.
3429
3430         No new tests since this is not adding any extra functionality.
3431
3432         * WebCore.gyp/WebCore.gyp:
3433         * html/ColorInputType.cpp:
3434         (WebCore::ColorInputType::shouldShowSuggestions):
3435         * make-file-arrays.py:
3436         (main):
3437
3438 2012-11-15  Eric Carlson  <eric.carlson@apple.com>
3439
3440         Update computed line position algorithm