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