2011-01-17 MORITA Hajime <morrita@google.com>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-01-17  MORITA Hajime  <morrita@google.com>
2
3         Unreviewed, rolling out r75995.
4         http://trac.webkit.org/changeset/75995
5         https://bugs.webkit.org/show_bug.cgi?id=51914
6
7         Causes assertion failures.
8
9         * dom/Element.cpp:
10         (WebCore::Element::shadowRoot):
11         (WebCore::Element::setShadowRoot):
12         (WebCore::Element::removeShadowRoot):
13         * dom/ElementRareData.h:
14         (WebCore::ElementRareData::ElementRareData):
15
16 2011-01-17  MORITA Hajime  <morrita@google.com>
17
18         Unreviewed, rolling out r75999.
19         http://trac.webkit.org/changeset/75999
20
21         * dom/Element.cpp:
22         (WebCore::Element::removeShadowRoot):
23
24 2011-01-17 MORITA Hajime  <morrita@google.com>
25
26         Unreviewed crash fix, which introduced at r75995
27
28         * dom/Element.cpp:
29         (WebCore::Element::removeShadowRoot):
30
31 2011-01-17  MORITA Hajime  <morrita@google.com>
32
33         Reviewed by Dimitri Glazkov.
34
35         ElementRareData::m_shadowRoot should not be RefPtr.
36         https://bugs.webkit.org/show_bug.cgi?id=51914
37
38         This change makes m_shadowRoot a raw pointer, as Node::m_parent is.
39         This change is safe because shadow host pointer is stored as TreeShared::m_parent
40         which prevents deletion unless set to null.
41         
42         No test, no behavioral change.
43
44         * dom/Element.cpp:
45         (WebCore::Element::shadowRoot):
46         (WebCore::Element::setShadowRoot):
47         (WebCore::Element::removeShadowRoot):
48         * dom/ElementRareData.h:
49         (WebCore::ElementRareData::ElementRareData):
50
51 2011-01-17  Maciej Stachowiak  <mjs@apple.com>
52
53         Reviewed by Dan Bernstein.
54
55         Some WebKit2 layout tests crash due to focus being on a frame in the page cache
56         https://bugs.webkit.org/show_bug.cgi?id=52607
57
58         No new tests. Existing tests crash in WebKit2 without this fix.
59         
60         I suspect there are other consequences besides the WebKit2 crash, but I
61         was unable to identify any for certain.
62
63         * history/CachedFrame.cpp:
64         (WebCore::CachedFrame::CachedFrame): If a frame still has focus when its page
65         goes in the page cache, reset focus to the main frame.
66
67 2011-01-17  Adam Roben  <aroben@apple.com>
68
69         Simplify WKCACFLayerRenderer's API
70
71         createRenderer/destroyRenderer are now hidden behind setHostWindow.
72         WKCACFLayerRendererClient::animationsStarted has been removed, as it
73         was never called. (The work it was supposed to do was already being
74         accomplished by WKCACFLayerRenderer::render telling each layer that
75         animations are starting.)
76
77         Fixes <http://webkit.org/b/52587> WKCACFLayerRenderer is hard to use
78
79         Reviewed by Chris Marrin.
80
81         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
82         (WebCore::MediaPlayerPrivateFullscreenWindow::createWindow): Moved the
83         call to setHostWindow here from the WM_CREATE handler. The WM_CREATE
84         handler was causing the Direct3D device to be created, but MSDN says
85         you shouldn't create a device while handling WM_CREATE. Removed
86         no-longer-needed call to createRenderer (setHostWindow does this now)
87         and the never-needed call to setNeedsDisplay (we never draw into the
88         root layer; this was just creating an unnecessary backing store the
89         size of the screen!).
90         (WebCore::MediaPlayerPrivateFullscreenWindow::wndProc): Moved WM_CREATE
91         code, as described above. Removed call to destroyRenderer when handling
92         WM_DESTROY; setHostWindow does this now. Fixed up our WM_PAINT handler
93         to do a synchronous paint and to clear our dirty region, while I was in
94         here.
95
96         * platform/graphics/win/WKCACFLayerRenderer.cpp:
97         (WebCore::WKCACFLayerRenderer::~WKCACFLayerRenderer): Changed to call
98         setHostWindow instead of destroyRenderer; the former calls the latter
99         if needed.
100         (WebCore::WKCACFLayerRenderer::setHostWindow): Moved here from the
101         header file. Destroys our old renderer (i.e., IDirect3DDevice9) if
102         we're losing our window, or creates a renderer if we're gaining a
103         window.
104         (WebCore::WKCACFLayerRenderer::createRenderer): Updated for WKSI function rename.
105         (WebCore::WKCACFLayerRenderer::destroyRenderer): Changed to clear the
106         D3D device from our context before releasing the device.
107
108         * platform/graphics/win/WKCACFLayerRenderer.h: Removed
109         WKCACFLayerRendererClient::animationsStarted. Removed setNeedsDisplay.
110         Make createRenderer, destroyRenderer, and renderSoon private.
111
112 2011-01-17  Adam Roben  <aroben@apple.com>
113
114         Remove special-cased support for providing content for the root layer
115
116         Clients will just have to provide content through the normal
117         GraphicsLayer channels now!
118
119         Support for <http://webkit.org/b/52582> WebView should paint directly
120         into a GraphicsLayer when in accelerated compositing mode
121
122         Reviewed by Simon Fraser and Chris Marrin.
123
124         * platform/graphics/win/WKCACFLayerRenderer.cpp:
125         (WebCore::WKCACFLayerRenderer::WKCACFLayerRenderer): Removed
126         initialization of m_backingStoreDirty, which has itself been removed.
127         (WebCore::WKCACFLayerRenderer::setNeedsDisplay): Moved code to schedule
128         a sync from here to syncCompositingStateSoon. We only need to call
129         renderSoon if we don't call syncCompositingStateSoon; the latter
130         function calls the former.
131         (WebCore::WKCACFLayerRenderer::paint): Removed code to handle
132         m_backingStoreDirty. We don't want to know anything about clients'
133         backing stores.
134         (WebCore::WKCACFLayerRenderer::syncCompositingStateSoon): Added. Code
135         came from setNeedsDisplay.
136
137         * platform/graphics/win/WKCACFLayerRenderer.h:
138         Removed setRootContents[AndDisplay], setBackingStoreDirty, and
139         m_backingStoreDirty. Made paint() public so that clients can force a
140         synchronous render (e.g., when handling WM_PAINT).
141
142 2011-01-17  Adam Roben  <aroben@apple.com>
143
144         Remove contexts from WKCACFContextFlusher before destroying them
145
146         We aren't really using WKCACFContextFlusher for anything useful at the
147         moment, but that will probably change in the near future.
148
149         I couldn't come up with a way to test this because it isn't possible to
150         resize a window in DumpRenderTree.
151
152         Fixes <http://webkit.org/b/52573> REGRESSION (r75262): Crash beneath
153         WKCACFContextFlusher::flushAllContexts when resizing window on page
154         that uses accelerated compositing
155
156         Reviewed by Simon Fraser.
157
158         * platform/graphics/win/WKCACFLayerRenderer.cpp:
159         (WebCore::WKCACFLayerRenderer::~WKCACFLayerRenderer): Remove our
160         context from WKCACFContextFlusher. (This code was erroneously removed
161         from WKCACFLayerRenderer::destroyRenderer in r75262. This is a more
162         sensible place for it.)
163
164 2011-01-17  Adam Roben  <aroben@apple.com>
165
166         Don't access the CACFLayerRef's sublayers directly from PlatformCALayer
167
168         There might be a secret extra sublayer (the tile parent layer) that
169         PlatformCALayer doesn't know about. When PlatformCALayer would
170         encounter this, it would try to use the tile parent layer's
171         PlatformCALayer wrapper, which was null, and then would crash. We now
172         ask PlatformCALayerWinInternal for the sublayer list, since that class
173         knows about the tile parent layer and can exclude it from the sublayer
174         list.
175
176         Covered by compositing/tiling/huge-layer-resize.html.
177
178         Fixes <http://webkit.org/b/52597> Crash beneath
179         PlatformCALayer::adoptSublayers when switching out of tiling mode
180         (null-dereference of a PlatformCALayer)
181
182         Reviewed by Darin Adler and Chris Marrin.
183
184         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
185         (PlatformCALayer::adoptSublayers):
186         (printLayer):
187         Changed to use PlatformCALayerWinInternal::getSublayers.
188
189         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
190         (PlatformCALayerWinInternal::getSublayers): Added. Retrieves the list
191         of PlatformCALayers that represent our sublayers. Significantly, this
192         code knows about the tile parent layer and can thus exclude it.
193
194         * platform/graphics/ca/win/PlatformCALayerWinInternal.h: Added
195         getSublayers.
196
197 2011-01-17  Naoki Takano  <takano.naoki@gmail.com>
198
199         Reviewed by Kent Tamura.
200
201         [Chromium] Fix popup menu re-positioning when the menu is opened upward, above the corresponding form field.
202         https://bugs.webkit.org/show_bug.cgi?id=51382
203         http://crbug.com/60427
204
205         Calculate correct location of popup window whenever the items in the window change.
206
207         No new tests, because this fix is for Chromium project and hard to test only in WebKit project
208
209         * platform/chromium/PopupMenuChromium.cpp:
210         (WebCore::PopupContainer::layoutAndCalculateWidgetRect): New Function to layout and calculate popup widget rect.
211         (WebCore::PopupContainer::showPopup): Move widgetRect calculation logic to calculateWidgetRect().
212         (WebCore::PopupContainer::refresh): Add parameter focusRect to take the location and the size of focus text input field to calculate correct popup window location.
213         * platform/chromium/PopupMenuChromium.h: Append new input parameter for refresh().
214
215 2011-01-17  Mark Rowe  <mrowe@apple.com>
216
217         Fix the 32-bit build.
218
219         * WebCore.exp.in:
220
221 2011-01-17  Dan Bernstein  <mitz@apple.com>
222
223         Reviewed by Darin Adler.
224
225         Use of invalid hash map key in CSSFontFaceSource::getFontData() with 0-sized remote font
226         https://bugs.webkit.org/show_bug.cgi?id=52598
227
228         Test: fast/css/font-face-zero-hash-key.html
229
230         * css/CSSFontFaceSource.cpp:
231         (WebCore::CSSFontFaceSource::getFontData): Add 1 to the font size to avoid a 0 hash key.
232         * css/CSSSegmentedFontFace.cpp:
233         (WebCore::CSSSegmentedFontFace::getFontData): Ditto.
234
235 2011-01-17  David Kilzer  <ddkilzer@apple.com>
236
237         <http://webkit.org/b/52596> Add missing DOMDocument/DOMDocumentFragment headers to Xcode project
238
239         Reviewed by Dan Bernstein.
240
241         This fixes two issues:
242
243         Add missing DOMDocumentFragmentPrivate.h and
244         DOMDocumentPrivate.h files to the project.  These files were
245         never added to the the project although their *Internal.h
246         counterparts were added in r16548 and r17390.
247
248         Add missing DOMDocumentFragmentInternal.h to the Headers
249         section.  It was moved from Headers to "Copy Generated Headers"
250         in r31045, but it should have an entry in both sections.
251
252         * WebCore.xcodeproj/project.pbxproj:
253
254 2011-01-17  Helder Correia  <helder@sencha.com>
255
256         Reviewed by Andreas Kling.
257
258         [Qt] Incorrect shadow alpha with pattern fillStyle
259         https://bugs.webkit.org/show_bug.cgi?id=52559
260
261         The shadow color opacity needs to be set on the shadow painter.
262         This is related to bug 52556.
263
264         Test: fast/canvas/canvas-fillPath-pattern-shadow.html
265
266         * platform/graphics/qt/GraphicsContextQt.cpp:
267         (WebCore::GraphicsContext::fillPath):
268
269 2011-01-17  Martin Robinson  <mrobinson@igalia.com>
270
271         Reviewed by Andreas Kling.
272
273         [GTK] Port a crash fix from libsoup upstream to the libsoup cache code
274         https://bugs.webkit.org/show_bug.cgi?id=52586
275
276         No new tests. This is just a merge from upstream.
277
278         * platform/network/soup/cache/soup-http-input-stream.c:
279         (webkit_soup_http_input_stream_got_chunk): Properly handle unsigned numbers.
280
281 2011-01-17  Tony Gentilcore  <tonyg@chromium.org>
282
283         Reviewed by Alexey Proskuryakov.
284
285         Fix some headers with missing or misspelled #ifndef guards
286         https://bugs.webkit.org/show_bug.cgi?id=52545
287
288         No new tests because no new functionality.
289
290         * ForwardingHeaders/runtime/InitializeThreading.h:
291         * editing/SmartReplace.h:
292         * loader/CrossOriginAccessControl.h:
293         * loader/NetscapePlugInStreamLoader.h:
294         * platform/chromium/ClipboardUtilitiesChromium.h:
295         * platform/graphics/cairo/DrawErrorUnderline.h:
296         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
297         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
298         * platform/graphics/cg/PDFDocumentImage.h:
299         * platform/win/WebCoreTextRenderer.h:
300
301 2011-01-17  Pavel Feldman  <pfeldman@chromium.org>
302
303         Not reviewed: follow-up fix for r52574: do not reuse clear() for navigation.
304
305         * inspector/front-end/NetworkPanel.js:
306         (WebInspector.NetworkPanel.prototype.clear):
307         (WebInspector.NetworkPanel.prototype.mainResourceChanged):
308
309 2011-01-17  Sergio Villar Senin  <svillar@igalia.com>
310
311         Reviewed by Martin Robinson.
312
313         [Gtk] No need to content sniff 304 Not Modified responses
314         https://bugs.webkit.org/show_bug.cgi?id=52570
315
316         Makes no sense to wait for the outcome of content sniffing when WebCore
317         is validating resources. If we get a 304 Not Modified it means that we can
318         safely use the cached version of the resource we're asking for.
319
320         No new tests because it does not change functionality, it just
321         calls didReceiveResponse sooner for 304 Not Modified responses.
322
323         * platform/network/soup/ResourceHandleSoup.cpp:
324         (WebCore::gotHeadersCallback):
325
326 2011-01-17  Jessie Berlin  <jberlin@apple.com>
327
328         Reviewed by Anders Carlsson.
329
330         REGRESSION: Assertion failure in FrameLoader::continueLoadAfterWillSubmitForm() when
331         navigating back to an unreachable URL
332         https://bugs.webkit.org/show_bug.cgi?id=52388
333
334         Test: http/tests/navigation/go-back-to-error-page.html
335
336         * history/PageCache.cpp:
337         (WebCore::PageCache::canCachePageContainingThisFrame):
338         Do not cache any error pages (which we can recognize as having substitute data and/or an
339         unreachableURL).
340
341 2011-01-17  Pavel Feldman  <pfeldman@chromium.org>
342
343         Not reviewed: fixing typo in r75952.
344
345         * inspector/front-end/NetworkPanel.js:
346         (WebInspector.NetworkDataGridNode.prototype._refreshNameCell):
347
348 2011-01-17  Enrica Casucci  <enrica@apple.com>
349
350         Reviewed by Alexey Proskuryakov.
351
352         Drag and drop support: refactoring of image from link and image from selection
353         https://bugs.webkit.org/show_bug.cgi?id=52496
354
355         This work cleans up the Mac code and makes it more similar to the Windows implementation,
356         avoiding the use of an NSView when the FrameView can be used.
357         The refactoring is a necessary step towards the complete support of drag and drop
358         in WebKit2.
359         
360         * page/mac/FrameMac.mm:
361         (WebCore::Frame::imageFromRect): Modified to use FrameView instead of NSView
362         to generate the image for drag.
363
364 2011-01-17  Dan Bernstein  <mitz@apple.com>
365
366         Rubber-stamped by Mark Rowe.
367
368         Update xcodeproj svn:ignore to include xcuserdata.
369
370         * WebCore.xcodeproj: Modified property svn:ignore.
371         * manual-tests/NPN_Invoke/NPN_Invoke.xcodeproj: Modified property svn:ignore.
372
373 2011-01-17  Alexey Proskuryakov  <ap@apple.com>
374
375         Leopard build fix.
376
377         * page/PrintContext.cpp: GCC complained about shortening a double value to float.
378
379 2011-01-17  Alexey Proskuryakov  <ap@apple.com>
380
381         Reviewed by Dan Bernstein.
382
383         https://bugs.webkit.org/show_bug.cgi?id=52495
384
385         No change in behavior, so no tests.
386
387         * WebCore.exp.in: Export additional methods, as I'm going to use more code from PrintContext.
388
389         * page/PrintContext.cpp:
390         (WebCore::PrintContext::~PrintContext): No need to clear m_pageRects, the object is being
391         destroyed already.
392         (WebCore::PrintContext::pageCount): Changed page count from int to size_t.
393         (WebCore::PrintContext::pageRect): Ditto.
394         (WebCore::PrintContext::computePageRects): Pass allowHorizontalTiling as an argument.
395         PrintContext already has code to calculate scale factor, so it makes sense to make methods
396         that contain it universal (allowHorizontalTiling is always true for Safari).
397         Round page height to an integer, because Mac code does that, and because page height is
398         treated as integer almost everywhere else in code.
399         (WebCore::PrintContext::begin): Allow calling this function multiple times. There is no need
400         to return to screen mode if e.g. "print backgounds" option changes.
401         (WebCore::PrintContext::computeAutomaticScaleFactor): Expose scale factor computation, so
402         that clients don't have to copy it.
403         (WebCore::PrintContext::spoolRect): Add a way to spool a precomputed rect - handy if a request
404         comes from code that doesn't have page number.
405         (WebCore::PrintContext::pageNumberForElement): Page number int -> size_t.
406
407         * page/PrintContext.h: Added comments and FIXMEs. PrintContext needs cleanup, but that
408         depends on deciding how it really needs to work (e.g. whether computePageRects() should
409         cause relayout).
410
411 2011-01-17  Pavel Feldman  <pfeldman@chromium.org>
412
413         Reviewed by Yury Semikhatsky.
414
415         Web Inspector: unify image data source assignment, add image url
416         to the image view properties list.
417         https://bugs.webkit.org/show_bug.cgi?id=52584
418
419         * English.lproj/localizedStrings.js:
420         * inspector/front-end/ImageView.js:
421         (WebInspector.ImageView.prototype._createContentIfNeeded.onImageLoad):
422         (WebInspector.ImageView.prototype._createContentIfNeeded):
423         * inspector/front-end/NetworkPanel.js:
424         (WebInspector.NetworkDataGridNode.prototype._refreshNameCell):
425         * inspector/front-end/Resource.js:
426         (WebInspector.Resource.prototype.populateImageSource):
427         (WebInspector.Resource.prototype._contentURL):
428         * inspector/front-end/ResourcesPanel.js:
429         (WebInspector.FrameResourceTreeElement.prototype.onattach):
430
431 2011-01-17  Andrey Kosyakov  <caseq@chromium.org>
432
433         Reviewed by Pavel Feldman.
434
435         Web Inspector: [Extensions API] webInspector.resources.onFinished is not fired for redirected resources
436         Make resource start/finish hanlding more consistent.
437         https://bugs.webkit.org/show_bug.cgi?id=52452
438
439         * inspector/front-end/AuditLauncherView.js: Ignore WebSocket resources when displaying progress indicator
440         (WebInspector.AuditLauncherView.prototype._resetResourceCount):
441         (WebInspector.AuditLauncherView.prototype.resourceStarted):
442         (WebInspector.AuditLauncherView.prototype.resourceFinished):
443         * inspector/front-end/NetworkManager.js:
444         (WebInspector.NetworkManager): Factor out resource start/finish logic to _startResource()/_finishResource()
445         (WebInspector.NetworkManager.prototype.identifierForInitialRequest):
446         (WebInspector.NetworkManager.prototype.willSendRequest):
447         (WebInspector.NetworkManager.prototype.markResourceAsCached):
448         (WebInspector.NetworkManager.prototype.didReceiveResponse):
449         (WebInspector.NetworkManager.prototype.didReceiveContentLength):
450         (WebInspector.NetworkManager.prototype.didFinishLoading):
451         (WebInspector.NetworkManager.prototype.didFailLoading):
452         (WebInspector.NetworkManager.prototype.didLoadResourceFromMemoryCache):
453         (WebInspector.NetworkManager.prototype.didCreateWebSocket):
454         (WebInspector.NetworkManager.prototype.willSendWebSocketHandshakeRequest):
455         (WebInspector.NetworkManager.prototype.didReceiveWebSocketHandshakeResponse):
456         (WebInspector.NetworkManager.prototype.didCloseWebSocket):
457         (WebInspector.NetworkManager.prototype._appendRedirect):
458         (WebInspector.NetworkManager.prototype._startResource):
459         (WebInspector.NetworkManager.prototype._finishResource):
460
461 2011-01-17  Pavel Feldman  <pfeldman@chromium.org>
462
463         Reviewed by Yury Semikhatsky.
464
465         Web Inspector: restore dom and network state upon frontend reuse.
466         https://bugs.webkit.org/show_bug.cgi?id=52574
467
468         * inspector/Inspector.idl:
469         * inspector/InspectorController.cpp:
470         (WebCore::InspectorController::restoreInspectorStateFromCookie):
471         (WebCore::InspectorController::populateScriptObjects):
472         (WebCore::InspectorController::pushDataCollectedOffline):
473         (WebCore::InspectorController::didCommitLoad):
474         * inspector/InspectorController.h:
475         * inspector/front-end/NetworkManager.js:
476         (WebInspector.NetworkManager.prototype.reset):
477         * inspector/front-end/NetworkPanel.js:
478         (WebInspector.NetworkPanel.prototype.clear):
479         (WebInspector.NetworkPanel.prototype.mainResourceChanged):
480         * inspector/front-end/ResourceTreeModel.js:
481         (WebInspector.ResourceTreeModel):
482         (WebInspector.ResourceTreeModel.prototype.reloadCachedResources):
483         * inspector/front-end/ResourcesPanel.js:
484         (WebInspector.ResourcesPanel.prototype.clear):
485         * inspector/front-end/inspector.js:
486         (WebInspector.frontendReused):
487
488 2011-01-17  Csaba Osztrogonác  <ossy@webkit.org>
489
490         Unreviewed buildfix after r75944.
491
492         * WebCore.pro:
493
494 2011-01-17  Yi Shen  <yi.4.shen@nokia.com>
495
496         Reviewed by Andreas Kling.
497
498         [Qt] Extend the Platform Plugin to support full screen video handler
499         https://bugs.webkit.org/show_bug.cgi?id=51249
500
501         Make MediaPlayerPrivateQt support a fullscreen player.
502
503         No new tests because LayoutTests/media/media-fullscreen-inline.html already exists.
504         However, this test failed for Qt (QtMediaPlayer) due to durationchange event getting fired twice.
505         So, still skip it for Qt.
506
507         * WebCore.pro:
508         * features.pri:
509         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
510         (WebCore::MediaPlayerPrivateQt::MediaPlayerPrivateQt):
511         (WebCore::MediaPlayerPrivateQt::removeVideoItem):
512         (WebCore::MediaPlayerPrivateQt::restoreVideoItem):
513         * platform/graphics/qt/MediaPlayerPrivateQt.h:
514         (WebCore::MediaPlayerPrivateQt::supportsFullscreen):
515         (WebCore::MediaPlayerPrivateQt::mediaPlayer):
516
517 2011-01-17  Anthony Ricaud  <rik@webkit.org>
518
519         Reviewed by Kent Tamura.
520
521         [HTML5] Revert display:none on datalist
522         https://bugs.webkit.org/show_bug.cgi?id=52214
523
524         * css/html.css:
525
526 2011-01-17  Pavel Feldman  <pfeldman@chromium.org>
527
528         Reviewed by Yury Semikhatsky.
529
530         Web Inspector: simplify debugger enabling routine.
531         https://bugs.webkit.org/show_bug.cgi?id=52472
532
533         * inspector/Inspector.idl:
534         * inspector/InspectorController.cpp:
535         (WebCore::InspectorController::restoreDebugger):
536         (WebCore::InspectorController::showAndEnableDebugger):
537         (WebCore::InspectorController::enableDebugger):
538         * inspector/InspectorController.h:
539         * inspector/front-end/DebuggerModel.js:
540         * inspector/front-end/ScriptsPanel.js:
541         (WebInspector.ScriptsPanel.prototype.show):
542         (WebInspector.ScriptsPanel.prototype._toggleDebugging):
543
544 2011-01-17  Pavel Podivilov  <podivilov@chromium.org>
545
546         Reviewed by Pavel Feldman.
547
548         Web Inspector: refactoring: encapsulate lazy initialization of SourceFrame.
549         https://bugs.webkit.org/show_bug.cgi?id=51738
550
551         Extract content loading logic from SourceView and ScriptView to ContentProvider implementations.
552         Pass ContentProvider in SourceFrame constructor to allow SourceFrame manage it's lazy initialization.
553
554         * inspector/front-end/ScriptView.js:
555         (WebInspector.ScriptView):
556         (WebInspector.SourceFrameContentProviderForScript):
557         (WebInspector.SourceFrameContentProviderForScript.prototype.requestContent.didRequestSource):
558         (WebInspector.SourceFrameContentProviderForScript.prototype.requestContent):
559         (WebInspector.SourceFrameContentProviderForScript.prototype.scripts):
560         * inspector/front-end/ScriptsPanel.js:
561         (WebInspector.ScriptsPanel.prototype._addScript):
562         (WebInspector.ScriptsPanel.prototype.sourceFrameForScript):
563         (WebInspector.ScriptsPanel.prototype._sourceFrameForResource):
564         * inspector/front-end/SourceFrame.js:
565         (WebInspector.SourceFrame):
566         (WebInspector.SourceFrame.prototype.set visible):
567         (WebInspector.SourceFrame.prototype._createTextViewer):
568         (WebInspector.SourceFrame.prototype._breakpointAdded):
569         (WebInspector.SourceFrame.prototype._breakpoints):
570         (WebInspector.SourceFrame.prototype._sourceIDForLine):
571         (WebInspector.SourceFrame.prototype._sourceIDSet):
572         (WebInspector.SourceFrameContentProvider):
573         (WebInspector.SourceFrameContentProvider.prototype.requestContent):
574         (WebInspector.SourceFrameContentProvider.prototype.scripts):
575         * inspector/front-end/SourceView.js:
576         (WebInspector.SourceView):
577         (WebInspector.SourceView.prototype.show):
578         (WebInspector.SourceView.prototype.resize):
579         (WebInspector.SourceView.prototype.performSearch.didFindSearchMatches):
580         (WebInspector.SourceView.prototype.performSearch):
581         (WebInspector.SourceView.prototype.revealLine):
582         (WebInspector.SourceView.prototype.highlightLine):
583         (WebInspector.SourceView.prototype._jumpToSearchResult):
584         (WebInspector.SourceFrameContentProviderForResource):
585         (WebInspector.SourceFrameContentProviderForResource.prototype.requestContent):
586         (WebInspector.SourceFrameContentProviderForResource.prototype.scripts):
587
588 2011-01-17  John Knottenbelt  <jknotten@chromium.org>
589
590         Reviewed by Jeremy Orlow.
591
592         GeolocationController should call stopUpdating on destruction
593         https://bugs.webkit.org/show_bug.cgi?id=52216
594
595         Test: fast/dom/Geolocation/window-close-crash.html
596
597         * page/GeolocationController.cpp:
598         (WebCore::GeolocationController::~GeolocationController):
599
600 2011-01-17  Pavel Feldman  <pfeldman@chromium.org>
601
602         Not reviewed: Qt build fix.
603
604         * inspector/InspectorInstrumentation.h:
605
606 2011-01-16  Pavel Feldman  <pfeldman@chromium.org>
607
608         Reviewed by Yury Semikhatsky.
609
610         Web Inspector: make WebCore use InspectorInstrumentation
611         for instrumentation calls.
612         https://bugs.webkit.org/show_bug.cgi?id=52532
613
614         This change makes WebCore classes issue instrumentation signals
615         by means of InspectorInstrumentation interface. It covered migration
616         for Document, FrameLoader, Database, DOMStorage, etc. It fixed
617         instrumentation handling for Console as well. This all is a part
618         of story described in the bug 52510.
619
620         * dom/Document.cpp:
621         (WebCore::Document::finishedParsing):
622         * dom/Document.h:
623         * dom/ScriptExecutionContext.h:
624         * inspector/InspectorBrowserDebuggerAgent.cpp:
625         (WebCore::InspectorBrowserDebuggerAgent::InspectorBrowserDebuggerAgent):
626         (WebCore::InspectorBrowserDebuggerAgent::setDOMBreakpoint):
627         (WebCore::InspectorBrowserDebuggerAgent::removeDOMBreakpoint):
628         (WebCore::InspectorBrowserDebuggerAgent::willInsertDOMNode):
629         (WebCore::InspectorBrowserDebuggerAgent::willRemoveDOMNode):
630         (WebCore::InspectorBrowserDebuggerAgent::willModifyDOMAttr):
631         (WebCore::InspectorBrowserDebuggerAgent::descriptionForDOMEvent):
632         (WebCore::InspectorBrowserDebuggerAgent::pauseOnNativeEventIfNeeded):
633         (WebCore::InspectorBrowserDebuggerAgent::willSendXMLHttpRequest):
634         * inspector/InspectorBrowserDebuggerAgent.h:
635         (WebCore::InspectorBrowserDebuggerAgent::create):
636         * inspector/InspectorConsoleAgent.cpp:
637         (WebCore::InspectorConsoleAgent::stopTiming):
638         (WebCore::InspectorConsoleAgent::count):
639         * inspector/InspectorConsoleAgent.h:
640         * inspector/InspectorController.cpp:
641         (WebCore::InspectorController::InspectorController):
642         (WebCore::InspectorController::~InspectorController):
643         (WebCore::InspectorController::handleMousePress):
644         (WebCore::InspectorController::didClearWindowObjectInWorld):
645         (WebCore::PostWorkerNotificationToFrontendTask::performTask):
646         * inspector/InspectorController.h:
647         * inspector/InspectorDOMAgent.h:
648         * inspector/InspectorDOMStorageAgent.h:
649         * inspector/InspectorDatabaseAgent.cpp:
650         * inspector/InspectorDatabaseAgent.h:
651         * inspector/InspectorFrontendHost.cpp:
652         * inspector/InspectorFrontendHost.h:
653         * inspector/InspectorInstrumentation.cpp:
654         (WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
655         (WebCore::InspectorInstrumentation::inspectedPageDestroyedImpl):
656         (WebCore::InspectorInstrumentation::mouseDidMoveOverElementImpl):
657         (WebCore::InspectorInstrumentation::handleMousePressImpl):
658         (WebCore::InspectorInstrumentation::mainResourceFiredLoadEventImpl):
659         (WebCore::InspectorInstrumentation::mainResourceFiredDOMContentEventImpl):
660         (WebCore::InspectorInstrumentation::frameDetachedFromParentImpl):
661         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
662         (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
663         (WebCore::InspectorInstrumentation::consoleCountImpl):
664         (WebCore::InspectorInstrumentation::startConsoleTimingImpl):
665         (WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
666         (WebCore::InspectorInstrumentation::consoleMarkTimelineImpl):
667         (WebCore::InspectorInstrumentation::addStartProfilingMessageToConsoleImpl):
668         (WebCore::InspectorInstrumentation::didOpenDatabaseImpl):
669         (WebCore::InspectorInstrumentation::didUseDOMStorageImpl):
670         (WebCore::InspectorInstrumentation::didCreateWorkerImpl):
671         (WebCore::InspectorInstrumentation::didDestroyWorkerImpl):
672         (WebCore::InspectorInstrumentation::didCreateWebSocketImpl):
673         (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequestImpl):
674         (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponseImpl):
675         (WebCore::InspectorInstrumentation::didCloseWebSocketImpl):
676         (WebCore::InspectorInstrumentation::networkStateChangedImpl):
677         (WebCore::InspectorInstrumentation::updateApplicationCacheStatusImpl):
678         * inspector/InspectorInstrumentation.h:
679         (WebCore::InspectorInstrumentation::inspectorControllerCreated):
680         (WebCore::InspectorInstrumentation::inspectorControllerDeleted):
681         (WebCore::InspectorInstrumentation::didClearWindowObjectInWorld):
682         (WebCore::InspectorInstrumentation::inspectedPageDestroyed):
683         (WebCore::InspectorInstrumentation::willInsertDOMNode):
684         (WebCore::InspectorInstrumentation::didInsertDOMNode):
685         (WebCore::InspectorInstrumentation::willRemoveDOMNode):
686         (WebCore::InspectorInstrumentation::willModifyDOMAttr):
687         (WebCore::InspectorInstrumentation::didModifyDOMAttr):
688         (WebCore::InspectorInstrumentation::mouseDidMoveOverElement):
689         (WebCore::InspectorInstrumentation::handleMousePress):
690         (WebCore::InspectorInstrumentation::characterDataModified):
691         (WebCore::InspectorInstrumentation::willSendXMLHttpRequest):
692         (WebCore::InspectorInstrumentation::didScheduleResourceRequest):
693         (WebCore::InspectorInstrumentation::didInstallTimer):
694         (WebCore::InspectorInstrumentation::didRemoveTimer):
695         (WebCore::InspectorInstrumentation::willCallFunction):
696         (WebCore::InspectorInstrumentation::willChangeXHRReadyState):
697         (WebCore::InspectorInstrumentation::willDispatchEvent):
698         (WebCore::InspectorInstrumentation::willDispatchEventOnWindow):
699         (WebCore::InspectorInstrumentation::willEvaluateScript):
700         (WebCore::InspectorInstrumentation::willFireTimer):
701         (WebCore::InspectorInstrumentation::willLayout):
702         (WebCore::InspectorInstrumentation::willLoadXHR):
703         (WebCore::InspectorInstrumentation::willPaint):
704         (WebCore::InspectorInstrumentation::willRecalculateStyle):
705         (WebCore::InspectorInstrumentation::identifierForInitialRequest):
706         (WebCore::InspectorInstrumentation::willSendRequest):
707         (WebCore::InspectorInstrumentation::markResourceAsCached):
708         (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCache):
709         (WebCore::InspectorInstrumentation::willReceiveResourceData):
710         (WebCore::InspectorInstrumentation::willReceiveResourceResponse):
711         (WebCore::InspectorInstrumentation::didReceiveContentLength):
712         (WebCore::InspectorInstrumentation::didFinishLoading):
713         (WebCore::InspectorInstrumentation::didFailLoading):
714         (WebCore::InspectorInstrumentation::resourceRetrievedByXMLHttpRequest):
715         (WebCore::InspectorInstrumentation::scriptImported):
716         (WebCore::InspectorInstrumentation::mainResourceFiredLoadEvent):
717         (WebCore::InspectorInstrumentation::mainResourceFiredDOMContentEvent):
718         (WebCore::InspectorInstrumentation::frameDetachedFromParent):
719         (WebCore::InspectorInstrumentation::didCommitLoad):
720         (WebCore::InspectorInstrumentation::willWriteHTML):
721         (WebCore::InspectorInstrumentation::didOpenDatabase):
722         (WebCore::InspectorInstrumentation::didUseDOMStorage):
723         (WebCore::InspectorInstrumentation::didCreateWorker):
724         (WebCore::InspectorInstrumentation::didDestroyWorker):
725         (WebCore::InspectorInstrumentation::didCreateWebSocket):
726         (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
727         (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
728         (WebCore::InspectorInstrumentation::didCloseWebSocket):
729         (WebCore::InspectorInstrumentation::networkStateChanged):
730         (WebCore::InspectorInstrumentation::updateApplicationCacheStatus):
731         (WebCore::InspectorInstrumentation::addMessageToConsole):
732         (WebCore::InspectorInstrumentation::consoleCount):
733         (WebCore::InspectorInstrumentation::startConsoleTiming):
734         (WebCore::InspectorInstrumentation::stopConsoleTiming):
735         (WebCore::InspectorInstrumentation::consoleMarkTimeline):
736         (WebCore::InspectorInstrumentation::addStartProfilingMessageToConsole):
737         (WebCore::InspectorInstrumentation::inspectorControllerForContext):
738         (WebCore::InspectorInstrumentation::inspectorControllerForFrame):
739         (WebCore::InspectorInstrumentation::inspectorControllerForPage):
740         (WebCore::InspectorInstrumentation::inspectorControllerWithFrontendForContext):
741         (WebCore::InspectorInstrumentation::inspectorControllerWithFrontendForDocument):
742         (WebCore::InspectorInstrumentation::inspectorControllerWithFrontendForFrame):
743         (WebCore::InspectorInstrumentation::inspectorControllerWithFrontendForPage):
744         * inspector/InspectorState.cpp:
745         * loader/FrameLoader.cpp:
746         (WebCore::FrameLoader::detachFromParent):
747         (WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
748         (WebCore::FrameLoader::dispatchDidCommitLoad):
749         * page/Chrome.cpp:
750         (WebCore::Chrome::mouseDidMoveOverElement):
751         * page/Console.cpp:
752         (WebCore::Console::addMessage):
753         (WebCore::Console::count):
754         (WebCore::Console::markTimeline):
755         (WebCore::Console::profile):
756         (WebCore::Console::time):
757         (WebCore::Console::timeEnd):
758         (WebCore::Console::group):
759         (WebCore::Console::groupCollapsed):
760         (WebCore::Console::groupEnd):
761         * page/DOMWindow.cpp:
762         (WebCore::DOMWindow::sessionStorage):
763         (WebCore::DOMWindow::localStorage):
764         (WebCore::DOMWindow::dispatchLoadEvent):
765         * page/EventHandler.cpp:
766         (WebCore::EventHandler::handleMousePressEvent):
767         * page/Page.cpp:
768         (WebCore::Page::~Page):
769         * storage/Database.cpp:
770         (WebCore::Database::openDatabase):
771         * workers/AbstractWorker.cpp:
772         (WebCore::AbstractWorker::onDestroyWorker):
773         * workers/SharedWorker.cpp:
774         (WebCore::SharedWorker::create):
775         * workers/Worker.cpp:
776         (WebCore::Worker::create):
777         * workers/WorkerMessagingProxy.cpp:
778
779 2011-01-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
780
781         Unreviewed, rolling out r75923.
782
783         GTK guy rolls out the r75914.
784
785         * platform/efl/ScrollViewEfl.cpp:
786         (WebCore::ScrollView::platformInit):
787
788 2011-01-17  Helder Correia  <helder@sencha.com>
789
790         Reviewed by Kenneth Rohde Christiansen.
791
792         [Qt] fast/canvas/canvas-fillPath-gradient-shadow.html does not pass
793         https://bugs.webkit.org/show_bug.cgi?id=52556
794
795         The shadow color opacity needs to be set on the shadow painter.
796         Additionally, the gradient brush should be transformed.
797
798         * platform/graphics/qt/GraphicsContextQt.cpp:
799         (WebCore::GraphicsContext::fillPath):
800
801 2011-01-17  No'am Rosenthal  <noam.rosenthal@nokia.com>
802
803         Reviewed by Kenneth Rohde Christiansen.
804
805         [Qt] Background image rendering is slow
806         https://bugs.webkit.org/show_bug.cgi?id=50527
807
808         When tiling a scaled pixmap in Image::drawPattern, scale the tile
809         first and only then draw it to the target. Do so only when drawing
810         more than one tile.
811
812         Tests in fast/backgrounds/size cover this.
813
814         * platform/graphics/qt/ImageQt.cpp:
815         (WebCore::Image::drawPattern):
816
817 2011-01-17  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
818
819         Reviewed by Simon Hausmann.
820
821         [Qt] [Symbian] Fix building NPAPI support
822         https://bugs.webkit.org/show_bug.cgi?id=51981
823
824         Make sure that npapi.h is always included outside of the extern "C"
825         linkage declaration block.
826
827         No new tests as there is no new functionality.
828
829         * bridge/npruntime.h:
830
831 2011-01-17  Philippe Normand  <pnormand@igalia.com>
832
833         Unreviewed, rolling out r75914.
834         http://trac.webkit.org/changeset/75914
835         https://bugs.webkit.org/show_bug.cgi?id=49177
836
837         multiple crashes on GTK
838
839         * platform/ScrollView.cpp:
840         (WebCore::ScrollView::removeChild):
841         (WebCore::ScrollView::wheelEvent):
842         * platform/gtk/MainFrameScrollbarGtk.cpp:
843         (MainFrameScrollbarGtk::attachAdjustment):
844         (MainFrameScrollbarGtk::gtkValueChanged):
845         * platform/gtk/ScrollViewGtk.cpp:
846         (WebCore::ScrollView::platformInit):
847         (WebCore::ScrollView::platformAddChild):
848         (WebCore::ScrollView::platformRemoveChild):
849
850 2011-01-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
851
852         Unreviewed build fix.
853
854         Bug 49177's patch enabled platformInit() in super class(ScrollView).
855         But, it didn't removed the function in ScrollViewEfl.cpp.
856
857         * platform/efl/ScrollViewEfl.cpp:
858
859 2011-01-16  Dan Bernstein  <mitz@apple.com>
860
861         Reviewed by Sam Weinig.
862
863         <rdar://problem/8871903> REGRESSION (r75897): Crash with 0-by-0 iframe in scaled WebView
864
865         Avoid use of FloatRect::enclosingBoundingBox(), which can stretch an empty
866         quad to a non-empty rect.
867
868         * rendering/RenderWidget.cpp:
869         (WebCore::RenderWidget::setWidget):
870         (WebCore::RenderWidget::updateWidgetPosition):
871
872 2011-01-16  Martin Robinson  <mrobinson@igalia.com>
873
874         Reviewed by Xan Lopez.
875
876         [GTK] fast/events/scroll-after-click-on-tab-index has been failing on the bots
877         https://bugs.webkit.org/show_bug.cgi?id=49177
878
879         * platform/ScrollView.cpp: Move the platform guards around a little. GTK+
880         now shares the implementation of platformAddChild and platformRemoveChild,
881         but has its own implementation of removeChild, which knows how to inform
882         main frame scrollbars that they no longer control the WebCore scrollbar.
883         * platform/gtk/MainFrameScrollbarGtk.cpp:
884         (MainFrameScrollbarGtk::attachAdjustment): If we are attaching the same adjustment
885         that we already have, bail out early. Apply the value changed signal handler
886         after configuring the adjustment. We don't want our reset of the adjustment to
887         stomp on WebCore values.
888         (MainFrameScrollbarGtk::gtkValueChanged): Do not adjust the value if the WebCore
889         state already matches ours. This prevents some unnecessary recursion
890         * platform/gtk/ScrollViewGtk.cpp:
891         (WebCore::ScrollView::removeChild): Added, special cases main frame scrollbars
892         which need their adjustments detached.
893
894 2011-01-13  Yuzo Fujishima  <yuzo@google.com>
895
896         Reviewed by Antti Koivisto.
897
898         Fix for Bug 52427 - Inconsistent use of m_cache in CachedResourceLoader
899         https://bugs.webkit.org/show_bug.cgi?id=52427
900
901         In constructor/destructor of CachedResourceLoader, m_cache has been
902         used to call MemoryCache::addCachedResourceLoader/removeCachedResourceLoader
903         while cache() is used everywhere else.
904
905         Actually addCachedResourceLoader/removeCachedResourceLoader need not be called at all.
906         Remove the call sites and make MemoryCache non-friend of CachedResourceLoader.
907
908         No new tests because the behavior remains the same.
909
910         * loader/cache/CachedResourceLoader.cpp:
911         (WebCore::CachedResourceLoader::CachedResourceLoader):
912         (WebCore::CachedResourceLoader::~CachedResourceLoader):
913         * loader/cache/CachedResourceLoader.h:
914         * loader/cache/MemoryCache.cpp:
915         * loader/cache/MemoryCache.h:
916
917 2011-01-16  Adam Barth  <abarth@webkit.org>
918
919         Rubber-stamped by Eric Seidel.
920
921         Move WebKit into Source
922         https://bugs.webkit.org/show_bug.cgi?id=52530
923
924         * WebCore.gyp/WebCore.gyp:
925         * WebCore.pri:
926         * WebCore.pro:
927
928 2011-01-16  Simon Fraser  <simon.fraser@apple.com>
929
930         Reviewed by Dan Bernstein.
931
932         frame-removed-during-resize.html test crashes (shows up as image-map-2.html crash)
933         https://bugs.webkit.org/show_bug.cgi?id=52549
934
935         Fix regression from r75900; m_widget->setFrameRect() can run script that
936         clears m_widget, so null-check it before calling setBoundsSize().
937         
938         Tested by fast/replaced/frame-removed-during-resize.html
939
940         * rendering/RenderWidget.cpp:
941         (WebCore::RenderWidget::setWidgetGeometry):
942
943 2011-01-16  Simon Fraser  <simon.fraser@apple.com>
944
945         Keep Leopard build happy.
946
947         * platform/mac/WidgetMac.mm:
948         (WebCore::Widget::setBoundsSize):
949
950 2011-01-16  Robert Hogan  <robert@webkit.org>
951
952         Reviewed by Andreas Kling.
953
954         [Qt] plugins/keyboard-events.html fails after r72717
955         https://bugs.webkit.org/show_bug.cgi?id=50050
956
957         * plugins/qt/PluginViewQt.cpp:
958         (WebCore::setXKeyEventSpecificFields): map event text to keycode
959
960 2011-01-16  Simon Fraser  <simon.fraser@apple.com>
961
962         Reviewed by Dan Bernstein.
963
964         Issues with iframes and plugins when the WebView is scaled.
965         <rdar://problem/6213380>
966         
967         When _scaleWebView has been called on a WebView, iframes
968         in WebKit1 render and hit-test incorrectly, and plug-ins don't scale up.
969         This is caused by AppKit NSViews not playing nicely with the scale
970         applied through style.
971         
972         Work around most of these issues by adjusting the bounds size
973         of widgets to allow iframe contents to paint with the correct scale,
974         and fix various places in the code where we relied on coordinate
975         transforms via NSViews (which ignore CSS transforms).
976
977         * WebCore.exp.in:
978         * platform/Widget.cpp:
979         (WebCore::Widget::setBoundsSize):
980         * platform/Widget.h:
981         * platform/mac/WidgetMac.mm:
982         (WebCore::Widget::setBoundsSize):
983         (WebCore::Widget::paint):
984         * rendering/RenderLayerCompositor.cpp:
985         (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingIFrame):
986         * rendering/RenderWidget.cpp:
987         (WebCore::RenderWidget::setWidgetGeometry):
988         (WebCore::RenderWidget::setWidget):
989         (WebCore::RenderWidget::updateWidgetPosition):
990         * rendering/RenderWidget.h:
991
992 2011-01-16  Simon Fraser  <simon.fraser@apple.com>
993
994         Reviewed by Dan Bernstein.
995
996         RenderView needs to take transforms on its layer into account
997         https://bugs.webkit.org/show_bug.cgi?id=52536
998         
999         The RenderView's coordinate mapping methods failed to
1000         take into account a transform on the RenderView's layer.
1001
1002         No tests because it's not possible to get a transform
1003         on the RenderView's layer through content.
1004
1005         * rendering/RenderView.cpp:
1006         (WebCore::RenderView::mapLocalToContainer):
1007         (WebCore::RenderView::mapAbsoluteToLocalPoint):
1008
1009 2011-01-15  Sheriff Bot  <webkit.review.bot@gmail.com>
1010
1011         Unreviewed, rolling out r75708.
1012         http://trac.webkit.org/changeset/75708
1013         https://bugs.webkit.org/show_bug.cgi?id=52521
1014
1015         Breaks Qt build if mobility is not installed. (Requested by
1016         benjaminp on #webkit).
1017
1018         * WebCore.pro:
1019         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
1020         (WebCore::MediaPlayerPrivateQt::MediaPlayerPrivateQt):
1021         * platform/graphics/qt/MediaPlayerPrivateQt.h:
1022         (WebCore::MediaPlayerPrivateQt::supportsFullscreen):
1023
1024 2011-01-15  David Kilzer  <ddkilzer@apple.com>
1025
1026         <http://webkit.org/b/52512> REGRESSION(r73818): range.cloneContents() ignores end offset
1027
1028         Reviewed by Adele Peterson.
1029
1030         The fix for Bug 50710 in r73799 introduced an off-by-one error
1031         when copying nodes to a local NodeVector for processing.  A fix
1032         was attempted for Bug 50854 in r73818, but instead of stopping
1033         at the end offset, it iterates through all the sibling nodes
1034         because the loop variable (i) is never incremented.  To clean
1035         this up, revert back to the code in r73799 and fix the
1036         off-by-one error.
1037
1038         Test: fast/dom/Range/range-clone-contents.html
1039
1040         * dom/Range.cpp:
1041         (WebCore::Range::processContents): Fix the loop that copies
1042         nodes to a local NodeVector by restoring the code from r73799
1043         and fixing the off-by-one error.
1044
1045 2011-01-15  Adam Barth  <abarth@webkit.org>
1046
1047         Rubber-stamped by Eric Seidel.
1048
1049         Move WebKit2 into Source
1050         https://bugs.webkit.org/show_bug.cgi?id=52438
1051
1052         * WebCore.pro:
1053
1054 2011-01-15  Joone Hur  <joone.hur@collabora.co.uk>
1055
1056         Reviewed by Martin Robinson.
1057
1058         [GTK] Linux build with FileSystem API enabled fails
1059         https://bugs.webkit.org/show_bug.cgi?id=43878
1060
1061         This patch allows WebKitGtk+ to build with FileSystem API option.
1062
1063         No new tests because no new functionality.
1064
1065         * GNUmakefile.am: Included AsyncFileSystem.h,cpp and Excluded duplicated JSFileException.h,cpp.
1066         * bindings/js/JSDirectoryEntryCustom.cpp: Included ExceptionCode.h.
1067
1068 2011-01-14  Sam Magnuson  <smagnuso@gmail.com>
1069
1070         Reviewed by Kenneth Rohde Christiansen.
1071
1072         [Qt] Compile with QT_NO_GRAPHICSVIEW
1073         https://bugs.webkit.org/show_bug.cgi?id=49750
1074
1075         * platform/graphics/qt/GraphicsLayerQt.cpp:
1076         * platform/graphics/qt/GraphicsLayerQt.h:
1077         * platform/qt/PlatformMouseEventQt.cpp:
1078
1079 2011-01-14  Tony Chang  <tony@chromium.org>
1080
1081         Reviewed by Alexey Proskuryakov.
1082
1083         Strip NUL character when copying text on Windows
1084         https://bugs.webkit.org/show_bug.cgi?id=52236
1085
1086         Test: editing/pasteboard/copy-null-characters.html
1087
1088         * editing/Editor.cpp:
1089         (WebCore::Editor::selectedText):
1090         * platform/mac/PasteboardMac.mm:
1091         (WebCore::Pasteboard::writeSelection): Use editor()->selectedText() which matches the other platforms.
1092
1093 2011-01-14  Yuzo Fujishima  <yuzo@google.com>
1094
1095         Reviewed by Antti Koivisto.
1096
1097         Rename cache() to memoryCache()
1098         https://bugs.webkit.org/show_bug.cgi?id=52433
1099
1100         No new tests because the behavior remains the same.
1101
1102         * WebCore.exp.in:
1103         * WebCore.order:
1104         * history/PageCache.cpp:
1105         (WebCore::PageCache::releaseAutoreleasedPagesNow):
1106         * inspector/InspectorResourceAgent.cpp:
1107         (WebCore::InspectorResourceAgent::cachedResource):
1108         * loader/FrameLoader.cpp:
1109         (WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads):
1110         * loader/archive/cf/LegacyWebArchive.cpp:
1111         (WebCore::LegacyWebArchive::create):
1112         * loader/cache/CachedImage.cpp:
1113         (WebCore::CachedImage::allClientsRemoved):
1114         (WebCore::CachedImage::data):
1115         * loader/cache/CachedResource.cpp:
1116         (WebCore::CachedResource::~CachedResource):
1117         (WebCore::CachedResource::addClientToSet):
1118         (WebCore::CachedResource::removeClient):
1119         (WebCore::CachedResource::setDecodedSize):
1120         (WebCore::CachedResource::setEncodedSize):
1121         (WebCore::CachedResource::didAccessDecodedData):
1122         * loader/cache/CachedResourceLoader.cpp:
1123         (WebCore::CachedResourceLoader::CachedResourceLoader):
1124         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
1125         (WebCore::CachedResourceLoader::requestResource):
1126         (WebCore::CachedResourceLoader::revalidateResource):
1127         (WebCore::CachedResourceLoader::loadResource):
1128         (WebCore::CachedResourceLoader::clearPreloads):
1129         (WebCore::CachedResourceLoader::printPreloadStats):
1130         * loader/cache/CachedResourceRequest.cpp:
1131         (WebCore::CachedResourceRequest::load):
1132         (WebCore::CachedResourceRequest::didFail):
1133         (WebCore::CachedResourceRequest::didReceiveResponse):
1134         * loader/cache/MemoryCache.cpp:
1135         (WebCore::memoryCache):
1136         * loader/cache/MemoryCache.h:
1137
1138 2011-01-14  Dan Bernstein  <mitz@apple.com>
1139
1140         Reviewed by Simon Fraser.
1141
1142         WebCore part of <rdar://problem/8441312> Crash in -[NSView _invalidateGStatesForTree]
1143
1144         * WebCore.exp.in: Export RenderWidget::suspendWidgetHierarchyUpdates() and
1145         RenderWidget::resumeWidgetHierarchyUpdates().
1146         * manual-tests/plug-in-mutates-NSView-hierarchy-during-resize.html: Added.
1147         * rendering/RenderWidget.cpp:
1148         (WebCore::RenderWidget::setWidgetGeometry): Removed the assertion that widget hierarchy updates
1149         are disabled. When this assertion was added, this condition was a subset of the “calling out to
1150         plug-in code is forbidden” condition, hence the assertion was valid. The WebKit part of this
1151         change now suspends widget hierarchy updates even at times where plug-in code is expected to be
1152         called, which invalidates the assertion.
1153
1154 2011-01-14  Tony Gentilcore  <tonyg@chromium.org>
1155
1156         Unreviewed build fix.
1157
1158         Fix Qt build after r75837
1159         https://bugs.webkit.org/show_bug.cgi?id=52494
1160
1161         * rendering/style/StyleRareInheritedData.cpp:
1162         * rendering/style/StyleRareNonInheritedData.cpp:
1163
1164 2011-01-14  Tony Gentilcore  <tonyg@chromium.org>
1165
1166         Unreviewed build fix.
1167
1168         Fix Qt build after r75837
1169         https://bugs.webkit.org/show_bug.cgi?id=52494
1170
1171         * rendering/style/RenderStyle.cpp:
1172
1173 2011-01-14  Tony Gentilcore  <tonyg@chromium.org>
1174
1175         Unreviewed build fix.
1176
1177         Fix Qt build after r75837
1178         https://bugs.webkit.org/show_bug.cgi?id=52494
1179
1180         * editing/EditorCommand.cpp:
1181
1182 2011-01-14  Tony Gentilcore  <tonyg@chromium.org>
1183
1184         Unreviewed build fix.
1185
1186         Fix Qt build after r75837
1187         https://bugs.webkit.org/show_bug.cgi?id=52494
1188
1189         * editing/ApplyStyleCommand.cpp:
1190
1191 2011-01-14  Tony Gentilcore  <tonyg@chromium.org>
1192
1193         Unreviewed build fix.
1194
1195         Fix Qt build after r75837
1196         https://bugs.webkit.org/show_bug.cgi?id=52494
1197
1198         * css/CSSStyleSelector.cpp:
1199
1200 2011-01-14  Tony Gentilcore  <tonyg@chromium.org>
1201
1202         Unreviewed build fix.
1203
1204         Fix Qt build after r75837
1205         https://bugs.webkit.org/show_bug.cgi?id=52494
1206
1207         * rendering/InlineFlowBox.h:
1208         * rendering/RenderBoxModelObject.h:
1209
1210 2011-01-14  Tony Gentilcore  <tonyg@chromium.org>
1211
1212         Reviewed by David Levin.
1213
1214         Do some forward declaration in RenderStyle.h
1215         https://bugs.webkit.org/show_bug.cgi?id=52453
1216
1217         No new tests because no new functionality.
1218
1219         * css/CSSComputedStyleDeclaration.cpp:
1220         * css/CSSStyleSelector.cpp:
1221         * editing/Editor.cpp:
1222         * page/EventHandler.cpp:
1223         * rendering/EllipsisBox.cpp:
1224         * rendering/InlineBox.cpp:
1225         * rendering/InlineTextBox.cpp:
1226         * rendering/RenderBlock.cpp:
1227         * rendering/RenderBlock.h:
1228         * rendering/RenderBox.cpp:
1229         * rendering/RenderBox.h:
1230         * rendering/RenderEmbeddedObject.cpp:
1231         * rendering/RenderFieldset.cpp:
1232         * rendering/RenderFileUploadControl.cpp:
1233         * rendering/RenderFrameSet.cpp:
1234         * rendering/RenderHTMLCanvas.cpp:
1235         * rendering/RenderImageResource.cpp:
1236         * rendering/RenderInputSpeech.cpp:
1237         * rendering/RenderLayer.h:
1238         * rendering/RenderLineBoxList.cpp:
1239         * rendering/RenderListBox.cpp:
1240         * rendering/RenderMediaControlsChromium.cpp:
1241         * rendering/RenderObject.cpp:
1242         * rendering/RenderObject.h:
1243         * rendering/RenderObjectChildList.cpp:
1244         * rendering/RenderProgress.cpp:
1245         * rendering/RenderScrollbarPart.cpp:
1246         * rendering/RenderTable.cpp:
1247         * rendering/RenderTable.h:
1248         * rendering/RenderTableCell.cpp:
1249         * rendering/RenderTableRow.cpp:
1250         * rendering/RenderTableSection.cpp:
1251         * rendering/RenderTheme.cpp:
1252         * rendering/RenderThemeChromiumSkia.cpp:
1253         * rendering/RenderThemeChromiumWin.cpp:
1254         * rendering/RootInlineBox.cpp:
1255         * rendering/style/RenderStyle.cpp:
1256         * rendering/style/RenderStyle.h:
1257         * rendering/style/StyleRareInheritedData.cpp:
1258
1259 2011-01-14  Ryosuke Niwa  <rniwa@webkit.org>
1260
1261         Reviewed by Eric Seidel.
1262
1263         Stop instantiating legacy editing positions in AccessibilityRenderObject.cpp, Element.cpp,
1264         BreakBlockquoteCommand.cpp, CompositeEditCommand.cpp, and DeleteButtonController.cpp
1265         https://bugs.webkit.org/show_bug.cgi?id=52481
1266
1267         Removed instantiation of legacy editing positions.
1268         Calls to Position::Position are replaced by calls to Position's convenience functions.
1269         
1270         Also fixed firstPositionInOrBeforeNode and lastPositionInOrAfterNode so that
1271         they instantiate right positions for text nodes.
1272
1273         * accessibility/AccessibilityRenderObject.cpp:
1274         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
1275         * dom/Element.cpp:
1276         (WebCore::Element::updateFocusAppearance):
1277         * editing/BreakBlockquoteCommand.cpp:
1278         (WebCore::BreakBlockquoteCommand::doApply):
1279         * editing/CompositeEditCommand.cpp:
1280         (WebCore::CompositeEditCommand::inputText):
1281         (WebCore::CompositeEditCommand::rebalanceWhitespaceAt):
1282         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
1283         (WebCore::CompositeEditCommand::moveParagraphs):
1284         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
1285         (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph):
1286         (WebCore::CompositeEditCommand::splitTreeToNode):
1287         * editing/DeleteButtonController.cpp:
1288         (WebCore::enclosingDeletableElement):
1289         * editing/htmlediting.h:
1290         (WebCore::firstPositionInOrBeforeNode): Instantiates firstPositionInNode instead of
1291         positionBeforeNode for a text node.
1292         (WebCore::lastPositionInOrAfterNode): Ditto.
1293
1294 2011-01-14  Helder Correia  <helder@sencha.com>
1295
1296         Reviewed by Simon Fraser.
1297
1298         Shadow is not drawn when filling a path with a gradient
1299         https://bugs.webkit.org/show_bug.cgi?id=51982
1300
1301         This happens in CG and is related to bug 51869, this time to be fixed
1302         in GraphicsContext::fillPath(const Path& path). We need to draw the
1303         gradient clipped to the path on a CGLayer first, and then draw the
1304         layer on the GraphicsContext.
1305
1306         Test: fast/canvas/canvas-fillPath-gradient-shadow.html
1307
1308         * platform/graphics/cg/GraphicsContextCG.cpp:
1309         (WebCore::GraphicsContext::fillPath):
1310
1311 2011-01-14  Simon Fraser  <simon.fraser@apple.com>
1312
1313         Reviewed by Adam Roben.
1314
1315         Layer syncing should go through the compositor
1316         https://bugs.webkit.org/show_bug.cgi?id=52486
1317
1318         Rather than have FrameView go directly to GraphicsLayer to
1319         sync pending changes, route the call through RenderLayerCompositor.
1320         
1321         Add a FIXME about an existing issue with flushing and subframes.
1322         
1323         No behavior change, so no tests.
1324
1325         * page/FrameView.cpp:
1326         (WebCore::FrameView::syncCompositingStateForThisFrame):
1327         * rendering/RenderLayerBacking.cpp:
1328         (WebCore::RenderLayerBacking::notifySyncRequired):
1329         * rendering/RenderLayerCompositor.cpp:
1330         (WebCore::RenderLayerCompositor::scheduleLayerFlush):
1331         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
1332         * rendering/RenderLayerCompositor.h:
1333         (WebCore::RenderLayerCompositor::notifySyncRequired):
1334
1335 2011-01-14  Abhishek Arya  <inferno@chromium.org>
1336
1337         Reviewed by David Hyatt.
1338
1339         Fix parent block calculation when trying to find top most node
1340         containing "this" float.
1341         https://bugs.webkit.org/show_bug.cgi?id=51711
1342
1343         Replace use of containingBlock and traverse the parents directly
1344         to check for float existence. containingBlock can skip parents and
1345         jump to the RenderView directly which will cause floats to not get
1346         cleared from intermediate parents.
1347
1348         Test: fast/block/float/floats-not-cleared-crash.html
1349
1350         * rendering/RenderBox.cpp:
1351         (WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists):
1352
1353 2011-01-14  Adam Klein  <adamk@chromium.org>
1354
1355         Reviewed by Darin Fisher.
1356
1357         [Chromium] Replace BackForwardListClient with BackForwardControllerClient/BackForwardList
1358         https://bugs.webkit.org/show_bug.cgi?id=42237
1359
1360         Remove Chromium-specific implementation from WebCore.
1361
1362         No tests added; this refactor should be covered by existing history-exercising tests.
1363
1364         * WebCore.gyp/WebCore.gyp:
1365         * WebCore.gypi:
1366         * history/BackForwardListChromium.cpp: Removed.
1367         * history/BackForwardListImpl.h:
1368
1369 2011-01-12  Satish Sampath  <satish@chromium.org>
1370
1371         Reviewed by Dimitri Glazkov.
1372
1373         Fix a crash when accessing speech input from script.
1374         https://bugs.webkit.org/show_bug.cgi?id=52325
1375
1376         Test: fast/speech/speech-input-scripting.html
1377
1378         * html/HTMLInputElement.cpp:
1379         (WebCore::HTMLInputElement::parseMappedAttribute): Recreate renderer when speech input is enabled/disabled.
1380         * rendering/RenderTextControlSingleLine.cpp: Remove unused code.
1381         * rendering/RenderTextControlSingleLine.h:
1382         * rendering/TextControlInnerElements.cpp: Take self references before firing events and check for renderer validity after.
1383         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
1384         (WebCore::InputFieldSpeechButtonElement::setRecognitionResult):
1385         (WebCore::InputFieldSpeechButtonElement::detach):
1386
1387 2011-01-14  Abhishek Arya  <inferno@chromium.org>
1388
1389         Reviewed by David Hyatt.
1390
1391         Prevent merging of anonymous blocks if one of them is already getting
1392         destroyed.
1393         https://bugs.webkit.org/show_bug.cgi?id=52402
1394
1395         Test: fast/block/merge-anonymous-block-remove-child-crash2.html
1396
1397         * rendering/RenderBlock.cpp:
1398         (WebCore::RenderBlock::RenderBlock): initialize m_beingDestroyed to false.
1399         (WebCore::RenderBlock::destroy): set m_beingDestroyed to true.
1400         (WebCore::canMergeContiguousAnonymousBlocks): do not merge if any or prev or next is being destroyed.
1401         (WebCore::RenderBlock::removeChild): remove the hack previously done for preventing oldChild merging with nextBlock's next sibling.
1402         * rendering/RenderBlock.h:
1403         (WebCore::RenderBlock::beingDestroyed): public function for m_beingDestroyed.
1404
1405 2011-01-14  Pavel Feldman  <pfeldman@chromium.org>
1406
1407         Not reviewed. Follow up to r75791: fix missing dispatch.
1408         https://bugs.webkit.org/show_bug.cgi?id=52442
1409
1410         * inspector/front-end/DebuggerModel.js:
1411         (WebInspector.DebuggerDispatcher.prototype.breakpointResolved):
1412
1413 2011-01-14  Simon Fraser  <simon.fraser@apple.com>
1414
1415         Reviewed by Adam Roben.
1416
1417         Issues with contentsScale in GraphicsLayerCA
1418         https://bugs.webkit.org/show_bug.cgi?id=52463
1419
1420         Fix various issues with the recent contentsScale changes:
1421
1422         * platform/graphics/ca/GraphicsLayerCA.cpp:
1423         (WebCore::GraphicsLayerCA::GraphicsLayerCA): Initialize m_contentsScale to 1.
1424         (WebCore::GraphicsLayerCA::updateContentsScale): Only do a setNeedsDisplay()
1425         if the layer draws content, otherwise we'll create backing store for empty layers.
1426         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Be sure to set contentsScale
1427         on the new (tiled or untiled) layer.
1428         (WebCore::GraphicsLayerCA::cloneLayer): Clones need contentsScale too.
1429
1430 2011-01-14  Simon Fraser  <simon.fraser@apple.com>
1431
1432         Let Xcode have it's way with the project file.
1433
1434         * WebCore.xcodeproj/project.pbxproj:
1435
1436 2011-01-14  Simon Fraser  <simon.fraser@apple.com>
1437
1438         Reviewed by Anders Carlsson.
1439
1440         Refactor some FrameView::syncCompositingState code
1441         https://bugs.webkit.org/show_bug.cgi?id=52459
1442
1443         Refactor some code in FrameView related to synchronizing
1444         compositing layer state.
1445         
1446         * page/FrameView.cpp:
1447         (WebCore::FrameView::syncCompositingStateForThisFrame):
1448         (WebCore::FrameView::syncCompositingStateRecursive):
1449         (WebCore::FrameView::paintContents):
1450         * page/FrameView.h:
1451
1452 2011-01-14  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
1453
1454         Reviewed by Eric Seidel.
1455
1456         [Qt] Fix build problem introduced by http://trac.webkit.org/changeset/75713
1457         https://bugs.webkit.org/show_bug.cgi?id=30179
1458
1459         * plugins/symbian/PluginViewSymbian.cpp:
1460
1461 2011-01-14  Carlos Garcia Campos  <cgarcia@igalia.com>
1462
1463         Reviewed by Martin Robinson.
1464
1465         [GTK] Add volume slider to media player
1466         https://bugs.webkit.org/show_bug.cgi?id=51532
1467
1468         * css/mediaControlsGtk.css:
1469         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
1470         (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
1471         (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
1472         * platform/gtk/RenderThemeGtk.cpp:
1473         (WebCore::RenderThemeGtk::adjustMediaSliderThumbSize):
1474         (WebCore::RenderThemeGtk::paintMediaVolumeSliderContainer):
1475         (WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack):
1476         (WebCore::RenderThemeGtk::paintMediaVolumeSliderThumb):
1477         * platform/gtk/RenderThemeGtk.h:
1478         * platform/gtk/RenderThemeGtk2.cpp:
1479         (WebCore::RenderThemeGtk::paintSliderTrack):
1480         (WebCore::RenderThemeGtk::paintSliderThumb):
1481         (WebCore::RenderThemeGtk::adjustSliderThumbSize):
1482         * platform/gtk/RenderThemeGtk3.cpp:
1483         (WebCore::RenderThemeGtk::paintSliderTrack):
1484         (WebCore::RenderThemeGtk::paintSliderThumb):
1485         (WebCore::RenderThemeGtk::adjustSliderThumbSize):
1486
1487 2011-01-14  Joone Hur  <joone.hur@collabora.co.uk>
1488
1489         Reviewed by David Levin.
1490
1491         [GTK] Convert use of raw pointers to GOwnPtr in FileSystemGtk.cpp
1492         https://bugs.webkit.org/show_bug.cgi?id=52434
1493
1494         No new tests. This code will be tested when an implementation 
1495         of beginDragWithFiles is complete. 
1496
1497         * platform/gtk/FileSystemGtk.cpp:
1498         (WebCore::filenameToString): Use GOwnPtr instead of gchar pointer.
1499         (WebCore::fileSystemRepresentation): Ditto.
1500         (WebCore::filenameForDisplay): Ditto.
1501         (WebCore::pathGetFileName): Ditto.
1502
1503 2011-01-14  Pavel Podivilov  <podivilov@chromium.org>
1504
1505         Reviewed by Yury Semikhatsky.
1506
1507         Web Inspector: breakpoint text snippet in breakpoints sidebar pane disappears after reload.
1508         https://bugs.webkit.org/show_bug.cgi?id=52215
1509
1510         * inspector/front-end/Breakpoint.js:
1511         (WebInspector.Breakpoint):
1512         (WebInspector.Breakpoint.prototype.populateLabelElement):
1513         * inspector/front-end/Script.js:
1514         (WebInspector.Script.prototype.get linesCount):
1515         (WebInspector.Script.prototype.sourceLine):
1516         (WebInspector.Script.prototype.sourceLine.didRequestSource):
1517         (WebInspector.Script.prototype.set source):
1518         (WebInspector.Script.prototype.requestSource.didGetScriptSource):
1519         (WebInspector.Script.prototype.requestSource):
1520         * inspector/front-end/ScriptView.js:
1521         (WebInspector.ScriptView.prototype.setupSourceFrameIfNeeded.didRequestSource):
1522         (WebInspector.ScriptView.prototype.setupSourceFrameIfNeeded):
1523         * inspector/front-end/SourceFrame.js:
1524         (WebInspector.SourceFrame.prototype._addBreakpoint):
1525         * inspector/front-end/utilities.js:
1526         (String.prototype.findAll):
1527
1528 2011-01-14  Pavel Podivilov  <podivilov@chromium.org>
1529
1530         Reviewed by Yury Semikhatsky.
1531
1532         Web Inspector: provide script column offset to frontend.
1533         https://bugs.webkit.org/show_bug.cgi?id=52377
1534
1535         * bindings/js/ScriptDebugServer.cpp:
1536         (WebCore::ScriptDebugServer::dispatchDidParseSource):
1537         * bindings/js/ScriptSourceCode.h:
1538         (WebCore::ScriptSourceCode::ScriptSourceCode):
1539         * bindings/v8/DebuggerScript.js:
1540         ():
1541         * bindings/v8/ScriptDebugServer.cpp:
1542         (WebCore::ScriptDebugServer::dispatchDidParseSource):
1543         * inspector/Inspector.idl:
1544         * inspector/InspectorDebuggerAgent.cpp:
1545         (WebCore::InspectorDebuggerAgent::didParseSource):
1546         * inspector/InspectorDebuggerAgent.h:
1547         * inspector/ScriptDebugListener.h:
1548         * inspector/front-end/DebuggerModel.js:
1549         (WebInspector.DebuggerModel.prototype.parsedScriptSource):
1550         * inspector/front-end/Script.js:
1551         (WebInspector.Script):
1552
1553 2011-01-14  Ilya Tikhonovsky  <loislo@chromium.org>
1554
1555         Unreviewed one line fix for console-xhr-logging test.
1556
1557         The problem was introduced at r75788.
1558
1559         * inspector/InspectorBrowserDebuggerAgent.cpp:
1560         (WebCore::InspectorBrowserDebuggerAgent::willSendXMLHttpRequest):
1561
1562 2011-01-13  Yury Semikhatsky  <yurys@chromium.org>
1563
1564         Reviewed by Pavel Feldman.
1565
1566         Web Inspector: extract console related functionality into InspectorConsoleAgent
1567         https://bugs.webkit.org/show_bug.cgi?id=52282
1568
1569         * CMakeLists.txt:
1570         * GNUmakefile.am:
1571         * WebCore.gypi:
1572         * WebCore.pro:
1573         * inspector/CodeGeneratorInspector.pm:
1574         * inspector/ConsoleMessage.cpp:
1575         (WebCore::ConsoleMessage::~ConsoleMessage):
1576         * inspector/ConsoleMessage.h:
1577         * inspector/Inspector.idl:
1578         * inspector/InspectorConsoleAgent.cpp: Added.
1579         (WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
1580         (WebCore::InspectorConsoleAgent::~InspectorConsoleAgent):
1581         (WebCore::InspectorConsoleAgent::setConsoleMessagesEnabled):
1582         (WebCore::InspectorConsoleAgent::clearConsoleMessages):
1583         (WebCore::InspectorConsoleAgent::reset):
1584         (WebCore::InspectorConsoleAgent::setFrontend):
1585         (WebCore::InspectorConsoleAgent::addMessageToConsole):
1586         (WebCore::InspectorConsoleAgent::startTiming):
1587         (WebCore::InspectorConsoleAgent::stopTiming):
1588         (WebCore::InspectorConsoleAgent::count):
1589         (WebCore::InspectorConsoleAgent::resourceRetrievedByXMLHttpRequest):
1590         (WebCore::InspectorConsoleAgent::didReceiveResponse):
1591         (WebCore::InspectorConsoleAgent::didFailLoading):
1592         (WebCore::InspectorConsoleAgent::addConsoleMessage):
1593         * inspector/InspectorConsoleAgent.h: Added.
1594         * inspector/InspectorController.cpp:
1595         (WebCore::InspectorController::InspectorController):
1596         (WebCore::InspectorController::clearConsoleMessages):
1597         (WebCore::InspectorController::connectFrontend):
1598         (WebCore::InspectorController::disconnectFrontend):
1599         (WebCore::InspectorController::didCommitLoad):
1600         * inspector/InspectorController.h:
1601         (WebCore::InspectorController::consoleAgent):
1602         * inspector/InspectorInstrumentation.cpp:
1603         (WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
1604         (WebCore::InspectorInstrumentation::didFailLoadingImpl):
1605         (WebCore::InspectorInstrumentation::resourceRetrievedByXMLHttpRequestImpl):
1606         (WebCore::InspectorInstrumentation::addMessageToConsole):
1607         (WebCore::InspectorInstrumentation::count):
1608         (WebCore::InspectorInstrumentation::startTiming):
1609         (WebCore::InspectorInstrumentation::stopTiming):
1610         (WebCore::InspectorInstrumentation::addStartProfilingMessageToConsole):
1611         * inspector/InspectorInstrumentation.h:
1612         * inspector/InspectorProfilerAgent.cpp:
1613         (WebCore::InspectorProfilerAgent::addProfileFinishedMessageToConsole):
1614         (WebCore::InspectorProfilerAgent::addStartProfilingMessageToConsole):
1615         * inspector/front-end/ConsoleView.js:
1616         (WebInspector.ConsoleView):
1617         (WebInspector.ConsoleView.prototype.addConsoleMessage):
1618         (WebInspector.ConsoleView.prototype.updateConsoleMessageExpiredCount):
1619         (WebInspector.ConsoleView.prototype.consoleMessagesCleared):
1620         * inspector/front-end/inspector.js:
1621         * page/Console.cpp:
1622         (WebCore::Console::addMessage):
1623         (WebCore::Console::count):
1624         (WebCore::Console::profile):
1625         (WebCore::Console::time):
1626         (WebCore::Console::timeEnd):
1627         (WebCore::Console::group):
1628         (WebCore::Console::groupCollapsed):
1629         (WebCore::Console::groupEnd):
1630         * page/Console.h:
1631         * page/Console.idl:
1632
1633 2011-01-14  Pavel Feldman  <pfeldman@chromium.org>
1634
1635         Reviewed by Yury Semikhatsky.
1636
1637         Web Inspector: do not use this as protocol message
1638         dispatcher in models / agents.
1639         https://bugs.webkit.org/show_bug.cgi?id=52442
1640
1641         Models should never for InspectorBackend.registerDomainDispatcher("foo", this).
1642         There should be a clear way to tell whether method is being called
1643         from within front-end or by the backend.
1644
1645         * inspector/front-end/DOMAgent.js:
1646         (WebInspector.DOMAgent):
1647         (WebInspector.DOMAgent.prototype.nodeForId):
1648         (WebInspector.DOMAgent.prototype._bindNodes):
1649         (WebInspector.DOMAgent.prototype._removeBreakpoints):
1650         (WebInspector.DOMDispatcher):
1651         (WebInspector.DOMDispatcher.prototype.setDocument):
1652         (WebInspector.DOMDispatcher.prototype.attributesUpdated):
1653         (WebInspector.DOMDispatcher.prototype.characterDataModified):
1654         (WebInspector.DOMDispatcher.prototype.setChildNodes):
1655         (WebInspector.DOMDispatcher.prototype.setDetachedRoot):
1656         (WebInspector.DOMDispatcher.prototype.childNodeCountUpdated):
1657         (WebInspector.DOMDispatcher.prototype.childNodeInserted):
1658         (WebInspector.DOMDispatcher.prototype.childNodeRemoved):
1659         (WebInspector.DOMDispatcher.prototype.didCommitLoad):
1660         (WebInspector.ApplicationCacheDispatcher):
1661         (WebInspector.ApplicationCacheDispatcher.prototype.getApplicationCachesAsync):
1662         (WebInspector.ApplicationCacheDispatcher.prototype.updateApplicationCacheStatus):
1663         (WebInspector.ApplicationCacheDispatcher.prototype.updateNetworkState):
1664         * inspector/front-end/DOMStorage.js:
1665         (WebInspector.DOMStorageDispatcher):
1666         (WebInspector.DOMStorageDispatcher.prototype.addDOMStorage):
1667         (WebInspector.DOMStorageDispatcher.prototype.selectDOMStorage):
1668         (WebInspector.DOMStorageDispatcher.prototype.updateDOMStorage):
1669         * inspector/front-end/Database.js:
1670         (WebInspector.Database.prototype.executeSql):
1671         (WebInspector.DatabaseDispatcher):
1672         (WebInspector.DatabaseDispatcher.prototype.addDatabase):
1673         (WebInspector.DatabaseDispatcher.prototype.selectDatabase):
1674         (WebInspector.DatabaseDispatcher.prototype.sqlTransactionSucceeded):
1675         (WebInspector.DatabaseDispatcher.prototype.sqlTransactionFailed):
1676         * inspector/front-end/DebuggerModel.js:
1677         (WebInspector.DebuggerModel):
1678         (WebInspector.DebuggerModel.prototype._pausedScript):
1679         (WebInspector.DebuggerModel.prototype._resumedScript):
1680         (WebInspector.DebuggerModel.prototype._parsedScriptSource):
1681         (WebInspector.DebuggerModel.prototype._failedToParseScriptSource):
1682         (WebInspector.DebuggerDispatcher):
1683         (WebInspector.DebuggerDispatcher.prototype.pausedScript):
1684         (WebInspector.DebuggerDispatcher.prototype.resumedScript):
1685         (WebInspector.DebuggerDispatcher.prototype.parsedScriptSource):
1686         (WebInspector.DebuggerDispatcher.prototype.failedToParseScriptSource):
1687         * inspector/front-end/FileSystemView.js:
1688         (WebInspector.FileSystemDispatcher):
1689         (WebInspector.FileSystemDispatcher.prototype.getFileSystemPathsAsync):
1690         (WebInspector.FileSystemDispatcher.prototype.didGetFileSystemPath):
1691         (WebInspector.FileSystemDispatcher.prototype.didGetFileSystemError):
1692         (WebInspector.FileSystemDispatcher.prototype.didGetFileSystemDisabled):
1693         * inspector/front-end/ProfilesPanel.js:
1694         (WebInspector.ProfilesPanel):
1695         (WebInspector.ProfilesPanel.prototype._addProfileHeader):
1696         (WebInspector.ProfilesPanel.prototype._removeProfileHeader):
1697         (WebInspector.ProfilesPanel.prototype._addHeapSnapshotChunk):
1698         (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot):
1699         (WebInspector.ProfilesPanel.prototype._setRecordingProfile):
1700         (WebInspector.ProfilerDispatcher):
1701         (WebInspector.ProfilerDispatcher.prototype.profilerWasEnabled):
1702         (WebInspector.ProfilerDispatcher.prototype.profilerWasDisabled):
1703         (WebInspector.ProfilerDispatcher.prototype.resetProfiles):
1704         (WebInspector.ProfilerDispatcher.prototype.addProfileHeader):
1705         (WebInspector.ProfilerDispatcher.prototype.addHeapSnapshotChunk):
1706         (WebInspector.ProfilerDispatcher.prototype.finishHeapSnapshot):
1707         (WebInspector.ProfilerDispatcher.prototype.setRecordingProfile):
1708         (WebInspector.ProfileSidebarTreeElement.prototype.ondelete):
1709         * inspector/front-end/ResourceTreeModel.js:
1710         (WebInspector.ResourceTreeModel):
1711         * inspector/front-end/TimelinePanel.js:
1712         (WebInspector.TimelinePanel):
1713         (WebInspector.TimelinePanel.prototype._timelineProfilerWasStarted):
1714         (WebInspector.TimelinePanel.prototype._timelineProfilerWasStopped):
1715         (WebInspector.TimelinePanel.prototype._addRecordToTimeline):
1716         (WebInspector.TimelineDispatcher):
1717         (WebInspector.TimelineDispatcher.prototype.timelineProfilerWasStarted):
1718         (WebInspector.TimelineDispatcher.prototype.timelineProfilerWasStopped):
1719         (WebInspector.TimelineDispatcher.prototype.addRecordToTimeline):
1720
1721 2011-01-14  Csaba Osztrogonác  <ossy@webkit.org>
1722
1723         [Qt][V8] Unreviewed buildfix after r75788.
1724
1725         * inspector/InspectorBrowserDebuggerAgent.cpp:
1726
1727 2011-01-12  Ilya Tikhonovsky  <loislo@chromium.org>
1728
1729         Reviewed by Yury Semikhatsky.
1730
1731         Web Inspector: Extract BrowserDebuggerAgent from InspectorController, InspectorDOMAgent and InspectorDebugger agent.
1732         We have some methods of Debugger which are related to DOM.
1733         Lets extract these methods to BrowserDebugger agent.
1734
1735         http://bugs.webkit.org/show_bug.cgi?id=52294
1736
1737         * CMakeLists.txt:
1738         * WebCore.gypi:
1739         * WebCore.pro:
1740         * WebCore.vcproj/WebCore.vcproj:
1741         * WebCore.xcodeproj/project.pbxproj:
1742         * inspector/CodeGeneratorInspector.pm:
1743         * inspector/Inspector.idl:
1744         * inspector/InspectorBrowserDebuggerAgent.cpp: Added.
1745         (WebCore::InspectorBrowserDebuggerAgent::InspectorBrowserDebuggerAgent):
1746         (WebCore::InspectorBrowserDebuggerAgent::~InspectorBrowserDebuggerAgent):
1747         (WebCore::InspectorBrowserDebuggerAgent::discardBindings):
1748         (WebCore::InspectorBrowserDebuggerAgent::setEventListenerBreakpoint):
1749         (WebCore::InspectorBrowserDebuggerAgent::removeEventListenerBreakpoint):
1750         (WebCore::InspectorBrowserDebuggerAgent::didInsertDOMNode):
1751         (WebCore::InspectorBrowserDebuggerAgent::didRemoveDOMNode):
1752         (WebCore::InspectorBrowserDebuggerAgent::setDOMBreakpoint):
1753         (WebCore::InspectorBrowserDebuggerAgent::removeDOMBreakpoint):
1754         (WebCore::InspectorBrowserDebuggerAgent::willInsertDOMNode):
1755         (WebCore::InspectorBrowserDebuggerAgent::willRemoveDOMNode):
1756         (WebCore::InspectorBrowserDebuggerAgent::willModifyDOMAttr):
1757         (WebCore::InspectorBrowserDebuggerAgent::descriptionForDOMEvent):
1758         (WebCore::InspectorBrowserDebuggerAgent::hasBreakpoint):
1759         (WebCore::InspectorBrowserDebuggerAgent::updateSubtreeBreakpoints):
1760         (WebCore::InspectorBrowserDebuggerAgent::pauseOnNativeEventIfNeeded):
1761         (WebCore::InspectorBrowserDebuggerAgent::setXHRBreakpoint):
1762         (WebCore::InspectorBrowserDebuggerAgent::removeXHRBreakpoint):
1763         (WebCore::InspectorBrowserDebuggerAgent::willSendXMLHttpRequest):
1764         (WebCore::InspectorBrowserDebuggerAgent::clearForPageNavigation):
1765         * inspector/InspectorBrowserDebuggerAgent.h: Added.
1766         (WebCore::InspectorBrowserDebuggerAgent::create):
1767         * inspector/InspectorController.cpp:
1768         (WebCore::InspectorController::InspectorController):
1769         (WebCore::InspectorController::inspectedPageDestroyed):
1770         (WebCore::InspectorController::didCommitLoad):
1771         (WebCore::InspectorController::enableDebuggerFromFrontend):
1772         (WebCore::InspectorController::disableDebugger):
1773         (WebCore::InspectorController::restoreStickyBreakpoints):
1774         (WebCore::InspectorController::restoreStickyBreakpoint):
1775         * inspector/InspectorController.h:
1776         * inspector/InspectorDOMAgent.cpp:
1777         (WebCore::InspectorDOMAgent::discardBindings):
1778         (WebCore::InspectorDOMAgent::didInsertDOMNode):
1779         (WebCore::InspectorDOMAgent::didRemoveDOMNode):
1780         * inspector/InspectorDOMAgent.h:
1781         * inspector/InspectorInstrumentation.cpp:
1782         (WebCore::InspectorInstrumentation::willInsertDOMNodeImpl):
1783         (WebCore::InspectorInstrumentation::didInsertDOMNodeImpl):
1784         (WebCore::InspectorInstrumentation::willRemoveDOMNodeImpl):
1785         (WebCore::InspectorInstrumentation::didRemoveDOMNodeImpl):
1786         (WebCore::InspectorInstrumentation::willModifyDOMAttrImpl):
1787         (WebCore::InspectorInstrumentation::willSendXMLHttpRequestImpl):
1788         (WebCore::InspectorInstrumentation::pauseOnNativeEventIfNeeded):
1789
1790 2011-01-14  Andrey Kosyakov  <caseq@chromium.org>
1791
1792         Reviewed by Pavel Feldman.
1793
1794         Web Inspector: redirected resources not handled properly in Network panel
1795         https://bugs.webkit.org/show_bug.cgi?id=52292
1796
1797         * inspector/Inspector.idl: Do not pass isMainResource to identifierForInitialRequest() (it's useless, as we may hit provisional load)
1798         * inspector/InspectorInstrumentation.cpp: Ditto.
1799         (WebCore::InspectorInstrumentation::identifierForInitialRequestImpl):
1800         * inspector/InspectorResourceAgent.cpp: Ditto.
1801         (WebCore::InspectorResourceAgent::identifierForInitialRequest):
1802         * inspector/InspectorResourceAgent.h: Ditto.
1803         * inspector/InspectorInstrumentation.cpp: Ditto.
1804         (WebCore::InspectorInstrumentation::identifierForInitialRequestImpl): Fix main resource detection.
1805         * inspector/front-end/AuditsPanel.js: WebInspector.networkResources now returns array, not map.
1806         * inspector/front-end/ConsoleView.js: User WebInspector.resourceById() to get resource
1807         (WebInspector.ConsoleMessage.prototype._formatMessage):
1808         * inspector/front-end/ExtensionServer.js: Ditto.
1809         (WebInspector.ExtensionServer.prototype._onRevealAndSelectResource):
1810         (WebInspector.ExtensionServer.prototype._onGetResourceContent):
1811         * inspector/front-end/HAREntry.js: WebInspector.networkResources now returns array, not map
1812         (WebInspector.HARLog.prototype.build):
1813         (WebInspector.HARLog.prototype._convertResource):
1814         * inspector/front-end/NetworkManager.js:
1815         (WebInspector.NetworkManager): Use appendResource, not refreshResource, when adding a new resource.
1816         (WebInspector.NetworkManager.prototype.identifierForInitialRequest):
1817         (WebInspector.NetworkManager.prototype.willSendRequest):
1818         (WebInspector.NetworkManager.prototype.didLoadResourceFromMemoryCache):
1819         (WebInspector.NetworkManager.prototype.setInitialContent):
1820         (WebInspector.NetworkManager.prototype.didCommitLoadForFrame):
1821         (WebInspector.NetworkManager.prototype.didCreateWebSocket):
1822         (WebInspector.NetworkManager.prototype._createResource): always register resource URL with ResourceTreeModel
1823         (WebInspector.NetworkManager.prototype._appendRedirect):
1824         * inspector/front-end/NetworkPanel.js:
1825         (WebInspector.NetworkPanel):
1826         (WebInspector.NetworkPanel.prototype.get resources):
1827         (WebInspector.NetworkPanel.prototype.resourceById):
1828         (WebInspector.NetworkPanel.prototype.appendResource): Add resource as new iff appendResource was added.
1829         (WebInspector.NetworkPanel.prototype.refreshResource): ditto.
1830         (WebInspector.NetworkPanel.prototype.mainResourceChanged): Clear console upon arrival of new main resource.
1831         * inspector/front-end/ResourceTreeModel.js: Expose unbindResourceURL, bind resources automatically upon creation.
1832         (WebInspector.ResourceTreeModel.prototype._clearResources):
1833         (WebInspector.ResourceTreeModel.prototype.unbindResourceURL):
1834         (WebInspector.ResourceTreeModel.prototype._addFramesRecursively):
1835         (WebInspector.ResourceTreeModel.prototype.createResource):
1836         * inspector/front-end/inspector.js:
1837         (WebInspector.resourceById):
1838
1839 2011-01-14  Sheriff Bot  <webkit.review.bot@gmail.com>
1840
1841         Unreviewed, rolling out r75783.
1842         http://trac.webkit.org/changeset/75783
1843         https://bugs.webkit.org/show_bug.cgi?id=52439
1844
1845         a bit strange but the same patch have broken mac builds at
1846         linking stage. (Requested by loislo2 on #webkit).
1847
1848         * CMakeLists.txt:
1849         * GNUmakefile.am:
1850         * WebCore.gypi:
1851         * WebCore.pro:
1852         * WebCore.vcproj/WebCore.vcproj:
1853         * WebCore.xcodeproj/project.pbxproj:
1854         * inspector/CodeGeneratorInspector.pm:
1855         * inspector/Inspector.idl:
1856         * inspector/InspectorBrowserDebuggerAgent.cpp: Removed.
1857         * inspector/InspectorBrowserDebuggerAgent.h: Removed.
1858         * inspector/InspectorController.cpp:
1859         (WebCore::InspectorController::InspectorController):
1860         (WebCore::InspectorController::inspectedPageDestroyed):
1861         (WebCore::InspectorController::didCommitLoad):
1862         (WebCore::InspectorController::enableDebuggerFromFrontend):
1863         (WebCore::InspectorController::disableDebugger):
1864         (WebCore::InspectorController::restoreStickyBreakpoints):
1865         (WebCore::InspectorController::restoreStickyBreakpoint):
1866         (WebCore::InspectorController::setEventListenerBreakpoint):
1867         (WebCore::InspectorController::removeEventListenerBreakpoint):
1868         (WebCore::InspectorController::hasEventListenerBreakpoint):
1869         (WebCore::InspectorController::setXHRBreakpoint):
1870         (WebCore::InspectorController::removeXHRBreakpoint):
1871         (WebCore::InspectorController::hasXHRBreakpoint):
1872         * inspector/InspectorController.h:
1873         * inspector/InspectorDOMAgent.cpp:
1874         (WebCore::InspectorDOMAgent::discardBindings):
1875         (WebCore::InspectorDOMAgent::setDOMBreakpoint):
1876         (WebCore::InspectorDOMAgent::removeDOMBreakpoint):
1877         (WebCore::InspectorDOMAgent::shouldBreakOnNodeInsertion):
1878         (WebCore::InspectorDOMAgent::shouldBreakOnNodeRemoval):
1879         (WebCore::InspectorDOMAgent::shouldBreakOnAttributeModification):
1880         (WebCore::InspectorDOMAgent::descriptionForDOMEvent):
1881         (WebCore::InspectorDOMAgent::didInsertDOMNode):
1882         (WebCore::InspectorDOMAgent::didRemoveDOMNode):
1883         (WebCore::InspectorDOMAgent::hasBreakpoint):
1884         (WebCore::InspectorDOMAgent::updateSubtreeBreakpoints):
1885         * inspector/InspectorDOMAgent.h:
1886         * inspector/InspectorInstrumentation.cpp:
1887         (WebCore::InspectorInstrumentation::willInsertDOMNodeImpl):
1888         (WebCore::InspectorInstrumentation::didInsertDOMNodeImpl):
1889         (WebCore::InspectorInstrumentation::willRemoveDOMNodeImpl):
1890         (WebCore::InspectorInstrumentation::didRemoveDOMNodeImpl):
1891         (WebCore::InspectorInstrumentation::willModifyDOMAttrImpl):
1892         (WebCore::InspectorInstrumentation::willSendXMLHttpRequestImpl):
1893         (WebCore::InspectorInstrumentation::pauseOnNativeEventIfNeeded):
1894
1895 2011-01-12  Ilya Tikhonovsky  <loislo@chromium.org>
1896
1897         Reviewed by Yury Semikhatsky.
1898
1899         Web Inspector: Extract BrowserDebuggerAgent from InspectorController, InspectorDOMAgent and InspectorDebugger agent.
1900         We have some methods of Debugger which are related to DOM.
1901         Lets extract these methods to BrowserDebugger agent.
1902
1903         http://bugs.webkit.org/show_bug.cgi?id=52294
1904
1905         * CMakeLists.txt:
1906         * WebCore.gypi:
1907         * WebCore.pro:
1908         * WebCore.vcproj/WebCore.vcproj:
1909         * WebCore.xcodeproj/project.pbxproj:
1910         * inspector/CodeGeneratorInspector.pm:
1911         * inspector/Inspector.idl:
1912         * inspector/InspectorBrowserDebuggerAgent.cpp: Added.
1913         (WebCore::InspectorBrowserDebuggerAgent::InspectorBrowserDebuggerAgent):
1914         (WebCore::InspectorBrowserDebuggerAgent::~InspectorBrowserDebuggerAgent):
1915         (WebCore::InspectorBrowserDebuggerAgent::discardBindings):
1916         (WebCore::InspectorBrowserDebuggerAgent::setEventListenerBreakpoint):
1917         (WebCore::InspectorBrowserDebuggerAgent::removeEventListenerBreakpoint):
1918         (WebCore::InspectorBrowserDebuggerAgent::didInsertDOMNode):
1919         (WebCore::InspectorBrowserDebuggerAgent::didRemoveDOMNode):
1920         (WebCore::InspectorBrowserDebuggerAgent::setDOMBreakpoint):
1921         (WebCore::InspectorBrowserDebuggerAgent::removeDOMBreakpoint):
1922         (WebCore::InspectorBrowserDebuggerAgent::willInsertDOMNode):
1923         (WebCore::InspectorBrowserDebuggerAgent::willRemoveDOMNode):
1924         (WebCore::InspectorBrowserDebuggerAgent::willModifyDOMAttr):
1925         (WebCore::InspectorBrowserDebuggerAgent::descriptionForDOMEvent):
1926         (WebCore::InspectorBrowserDebuggerAgent::hasBreakpoint):
1927         (WebCore::InspectorBrowserDebuggerAgent::updateSubtreeBreakpoints):
1928         (WebCore::InspectorBrowserDebuggerAgent::pauseOnNativeEventIfNeeded):
1929         (WebCore::InspectorBrowserDebuggerAgent::setXHRBreakpoint):
1930         (WebCore::InspectorBrowserDebuggerAgent::removeXHRBreakpoint):
1931         (WebCore::InspectorBrowserDebuggerAgent::willSendXMLHttpRequest):
1932         (WebCore::InspectorBrowserDebuggerAgent::clearForPageNavigation):
1933         * inspector/InspectorBrowserDebuggerAgent.h: Added.
1934         (WebCore::InspectorBrowserDebuggerAgent::create):
1935         * inspector/InspectorController.cpp:
1936         (WebCore::InspectorController::InspectorController):
1937         (WebCore::InspectorController::inspectedPageDestroyed):
1938         (WebCore::InspectorController::didCommitLoad):
1939         (WebCore::InspectorController::enableDebuggerFromFrontend):
1940         (WebCore::InspectorController::disableDebugger):
1941         (WebCore::InspectorController::restoreStickyBreakpoints):
1942         (WebCore::InspectorController::restoreStickyBreakpoint):
1943         * inspector/InspectorController.h:
1944         * inspector/InspectorDOMAgent.cpp:
1945         (WebCore::InspectorDOMAgent::discardBindings):
1946         (WebCore::InspectorDOMAgent::didInsertDOMNode):
1947         (WebCore::InspectorDOMAgent::didRemoveDOMNode):
1948         * inspector/InspectorDOMAgent.h:
1949         * inspector/InspectorInstrumentation.cpp:
1950         (WebCore::InspectorInstrumentation::willInsertDOMNodeImpl):
1951         (WebCore::InspectorInstrumentation::didInsertDOMNodeImpl):
1952         (WebCore::InspectorInstrumentation::willRemoveDOMNodeImpl):
1953         (WebCore::InspectorInstrumentation::didRemoveDOMNodeImpl):
1954         (WebCore::InspectorInstrumentation::willModifyDOMAttrImpl):
1955         (WebCore::InspectorInstrumentation::willSendXMLHttpRequestImpl):
1956         (WebCore::InspectorInstrumentation::pauseOnNativeEventIfNeeded):
1957
1958 2011-01-14  Pavel Feldman  <pfeldman@chromium.org>
1959
1960         Not reviewed: build fix.
1961
1962         * WebCore.vcproj/WebCore.vcproj:
1963
1964 2011-01-14  Pavel Feldman  <pfeldman@chromium.org>
1965
1966         Reviewed by Yury Semikhatsky.
1967
1968         Web Inspector: extract InspectorSettings from InspectorState,
1969         simplify it.
1970         https://bugs.webkit.org/show_bug.cgi?id=52429
1971
1972         * CMakeLists.txt:
1973         * GNUmakefile.am:
1974         * WebCore.gypi:
1975         * WebCore.pro:
1976         * WebCore.xcodeproj/project.pbxproj:
1977         * inspector/InspectorClient.h:
1978         * inspector/InspectorController.cpp:
1979         (WebCore::InspectorController::InspectorController):
1980         (WebCore::InspectorController::inspectorStartsAttached):
1981         (WebCore::InspectorController::setInspectorStartsAttached):
1982         (WebCore::InspectorController::setInspectorAttachedHeight):
1983         (WebCore::InspectorController::inspectorAttachedHeight):
1984         (WebCore::InspectorController::setMonitoringXHREnabled):
1985         (WebCore::InspectorController::restoreDebugger):
1986         (WebCore::InspectorController::restoreProfiler):
1987         (WebCore::InspectorController::ensureSettingsLoaded):
1988         (WebCore::InspectorController::enableProfiler):
1989         (WebCore::InspectorController::disableProfiler):
1990         (WebCore::InspectorController::enableDebuggerFromFrontend):
1991         (WebCore::InspectorController::disableDebugger):
1992         * inspector/InspectorController.h:
1993         * inspector/InspectorSettings.cpp: Added.
1994         (WebCore::InspectorSettings::InspectorSettings):
1995         (WebCore::InspectorSettings::getBoolean):
1996         (WebCore::InspectorSettings::setBoolean):
1997         (WebCore::InspectorSettings::getLong):
1998         (WebCore::InspectorSettings::setLong):
1999         (WebCore::InspectorSettings::registerBoolean):
2000         (WebCore::InspectorSettings::registerLong):
2001         * inspector/InspectorSettings.h: Added.
2002         * inspector/InspectorState.cpp:
2003         (WebCore::InspectorState::InspectorState):
2004         (WebCore::InspectorState::setValue):
2005         (WebCore::InspectorState::setObject):
2006         (WebCore::InspectorState::registerBoolean):
2007         (WebCore::InspectorState::registerString):
2008         (WebCore::InspectorState::registerLong):
2009         (WebCore::InspectorState::registerObject):
2010         (WebCore::InspectorState::Property::create):
2011         * inspector/InspectorState.h:
2012         (WebCore::InspectorState::setBoolean):
2013         (WebCore::InspectorState::setString):
2014         (WebCore::InspectorState::setLong):
2015
2016 2011-01-14  Sheriff Bot  <webkit.review.bot@gmail.com>
2017
2018         Unreviewed, rolling out r75774.
2019         http://trac.webkit.org/changeset/75774
2020         https://bugs.webkit.org/show_bug.cgi?id=52431
2021
2022         gtk builds were broken (Requested by loislo2 on #webkit).
2023
2024         * CMakeLists.txt:
2025         * WebCore.gypi:
2026         * WebCore.pro:
2027         * WebCore.vcproj/WebCore.vcproj:
2028         * WebCore.xcodeproj/project.pbxproj:
2029         * inspector/CodeGeneratorInspector.pm:
2030         * inspector/Inspector.idl:
2031         * inspector/InspectorBrowserDebuggerAgent.cpp: Removed.
2032         * inspector/InspectorBrowserDebuggerAgent.h: Removed.
2033         * inspector/InspectorController.cpp:
2034         (WebCore::InspectorController::InspectorController):
2035         (WebCore::InspectorController::inspectedPageDestroyed):
2036         (WebCore::InspectorController::didCommitLoad):
2037         (WebCore::InspectorController::enableDebuggerFromFrontend):
2038         (WebCore::InspectorController::disableDebugger):
2039         (WebCore::InspectorController::restoreStickyBreakpoints):
2040         (WebCore::InspectorController::restoreStickyBreakpoint):
2041         (WebCore::InspectorController::setEventListenerBreakpoint):
2042         (WebCore::InspectorController::removeEventListenerBreakpoint):
2043         (WebCore::InspectorController::hasEventListenerBreakpoint):
2044         (WebCore::InspectorController::setXHRBreakpoint):
2045         (WebCore::InspectorController::removeXHRBreakpoint):
2046         (WebCore::InspectorController::hasXHRBreakpoint):
2047         * inspector/InspectorController.h:
2048         * inspector/InspectorDOMAgent.cpp:
2049         (WebCore::InspectorDOMAgent::discardBindings):
2050         (WebCore::InspectorDOMAgent::setDOMBreakpoint):
2051         (WebCore::InspectorDOMAgent::removeDOMBreakpoint):
2052         (WebCore::InspectorDOMAgent::shouldBreakOnNodeInsertion):
2053         (WebCore::InspectorDOMAgent::shouldBreakOnNodeRemoval):
2054         (WebCore::InspectorDOMAgent::shouldBreakOnAttributeModification):
2055         (WebCore::InspectorDOMAgent::descriptionForDOMEvent):
2056         (WebCore::InspectorDOMAgent::didInsertDOMNode):
2057         (WebCore::InspectorDOMAgent::didRemoveDOMNode):
2058         (WebCore::InspectorDOMAgent::hasBreakpoint):
2059         (WebCore::InspectorDOMAgent::updateSubtreeBreakpoints):
2060         * inspector/InspectorDOMAgent.h:
2061         * inspector/InspectorInstrumentation.cpp:
2062         (WebCore::InspectorInstrumentation::willInsertDOMNodeImpl):
2063         (WebCore::InspectorInstrumentation::didInsertDOMNodeImpl):
2064         (WebCore::InspectorInstrumentation::willRemoveDOMNodeImpl):
2065         (WebCore::InspectorInstrumentation::didRemoveDOMNodeImpl):
2066         (WebCore::InspectorInstrumentation::willModifyDOMAttrImpl):
2067         (WebCore::InspectorInstrumentation::willSendXMLHttpRequestImpl):
2068         (WebCore::InspectorInstrumentation::pauseOnNativeEventIfNeeded):
2069
2070 2011-01-12  Ilya Tikhonovsky  <loislo@chromium.org>
2071
2072         Reviewed by Yury Semikhatsky.
2073
2074         Web Inspector: Extract BrowserDebuggerAgent from InspectorController, InspectorDOMAgent and InspectorDebugger agent.
2075         We have some methods of Debugger which are related to DOM.
2076         Lets extract these methods to BrowserDebugger agent.
2077
2078         http://bugs.webkit.org/show_bug.cgi?id=52294
2079
2080         * CMakeLists.txt:
2081         * WebCore.gypi:
2082         * WebCore.pro:
2083         * WebCore.vcproj/WebCore.vcproj:
2084         * WebCore.xcodeproj/project.pbxproj:
2085         * inspector/CodeGeneratorInspector.pm:
2086         * inspector/Inspector.idl:
2087         * inspector/InspectorBrowserDebuggerAgent.cpp: Added.
2088         (WebCore::InspectorBrowserDebuggerAgent::InspectorBrowserDebuggerAgent):
2089         (WebCore::InspectorBrowserDebuggerAgent::~InspectorBrowserDebuggerAgent):
2090         (WebCore::InspectorBrowserDebuggerAgent::discardBindings):
2091         (WebCore::InspectorBrowserDebuggerAgent::setEventListenerBreakpoint):
2092         (WebCore::InspectorBrowserDebuggerAgent::removeEventListenerBreakpoint):
2093         (WebCore::InspectorBrowserDebuggerAgent::didInsertDOMNode):
2094         (WebCore::InspectorBrowserDebuggerAgent::didRemoveDOMNode):
2095         (WebCore::InspectorBrowserDebuggerAgent::setDOMBreakpoint):
2096         (WebCore::InspectorBrowserDebuggerAgent::removeDOMBreakpoint):
2097         (WebCore::InspectorBrowserDebuggerAgent::willInsertDOMNode):
2098         (WebCore::InspectorBrowserDebuggerAgent::willRemoveDOMNode):
2099         (WebCore::InspectorBrowserDebuggerAgent::willModifyDOMAttr):
2100         (WebCore::InspectorBrowserDebuggerAgent::descriptionForDOMEvent):
2101         (WebCore::InspectorBrowserDebuggerAgent::hasBreakpoint):
2102         (WebCore::InspectorBrowserDebuggerAgent::updateSubtreeBreakpoints):
2103         (WebCore::InspectorBrowserDebuggerAgent::pauseOnNativeEventIfNeeded):
2104         (WebCore::InspectorBrowserDebuggerAgent::setXHRBreakpoint):
2105         (WebCore::InspectorBrowserDebuggerAgent::removeXHRBreakpoint):
2106         (WebCore::InspectorBrowserDebuggerAgent::willSendXMLHttpRequest):
2107         (WebCore::InspectorBrowserDebuggerAgent::clearForPageNavigation):
2108         * inspector/InspectorBrowserDebuggerAgent.h: Added.
2109         (WebCore::InspectorBrowserDebuggerAgent::create):
2110         * inspector/InspectorController.cpp:
2111         (WebCore::InspectorController::InspectorController):
2112         (WebCore::InspectorController::inspectedPageDestroyed):
2113         (WebCore::InspectorController::didCommitLoad):
2114         (WebCore::InspectorController::enableDebuggerFromFrontend):
2115         (WebCore::InspectorController::disableDebugger):
2116         (WebCore::InspectorController::restoreStickyBreakpoints):
2117         (WebCore::InspectorController::restoreStickyBreakpoint):
2118         * inspector/InspectorController.h:
2119         * inspector/InspectorDOMAgent.cpp:
2120         (WebCore::InspectorDOMAgent::discardBindings):
2121         (WebCore::InspectorDOMAgent::didInsertDOMNode):
2122         (WebCore::InspectorDOMAgent::didRemoveDOMNode):
2123         * inspector/InspectorDOMAgent.h:
2124         * inspector/InspectorInstrumentation.cpp:
2125         (WebCore::InspectorInstrumentation::willInsertDOMNodeImpl):
2126         (WebCore::InspectorInstrumentation::didInsertDOMNodeImpl):
2127         (WebCore::InspectorInstrumentation::willRemoveDOMNodeImpl):
2128         (WebCore::InspectorInstrumentation::didRemoveDOMNodeImpl):
2129         (WebCore::InspectorInstrumentation::willModifyDOMAttrImpl):
2130         (WebCore::InspectorInstrumentation::willSendXMLHttpRequestImpl):
2131         (WebCore::InspectorInstrumentation::pauseOnNativeEventIfNeeded):
2132
2133 2011-01-13  Kent Tamura  <tkent@chromium.org>
2134
2135         Reviewed by Dimitri Glazkov.
2136
2137         Implement form validation message UI
2138         https://bugs.webkit.org/show_bug.cgi?id=48980
2139
2140         * Add four internal pseudo selectors:
2141           - -webkit-validation-bubble
2142           - -webkit-validation-bubble-message
2143           - -webkit-validation-bubble-top-outer-arrow
2144           - -webkit-validation-bubble-top-inner-arrow
2145
2146         * Implement ValidationMessage functions
2147           Show the message for <the number of characters> / 20.0 seconds.
2148
2149         No new tests because the feature is disabled by default for now and the
2150         new behavior is strongly timing-dependent.
2151
2152         * css/CSSStyleSelector.cpp:
2153         (WebCore::CSSStyleSelector::canShareStyleWithElement):
2154           Do not share a style with elements with different shadowPseudoId().
2155         * css/html.css: Define appearance for the internal selectors.
2156         (::-webkit-validation-bubble):
2157         (::-webkit-validation-bubble-message):
2158         (::-webkit-validation-bubble-top-outer-arrow):
2159         (::-webkit-validation-bubble-top-inner-arrow):
2160         * dom/Node.cpp:
2161         (WebCore::Node::createRendererIfNeeded):
2162           Allow to add shadow renderers even if canHaveChildren() returns false.
2163         * html/HTMLFormControlElement.cpp:
2164         (WebCore::HTMLFormControlElement::detach):
2165           Remove m_validationMessage immediately because we can't use
2166           hideVisibleValidationMessage(), which calls a ValidationMessage function later.
2167         (WebCore::HTMLFormControlElement::updateVisibleValidationMessage):
2168           - Don't create ValidationMessage if the message is empty.
2169           - Remove the check for message equality.
2170         (WebCore::HTMLFormControlElement::hideVisibleValidationMessage):
2171           Don't remove m_validationMessage immediately. We shouldn't make the
2172           element needsLayout() state in this context.
2173         * html/ValidationMessage.cpp:
2174         (WebCore::ValidationMessage::~ValidationMessage):
2175           hideMessage() -> deleteBubbleTree() renaming.
2176         (WebCore::ValidationMessage::setMessage): Implemented.
2177         (WebCore::ValidationMessage::setMessageDOMAndStartTimer):
2178           Added. This updates the validation message and starts the timer to hide it.
2179         (WebCore::ElementWithPseudoId):
2180           Added to help implementations of styled shadow nodes.
2181         (WebCore::ValidationMessage::buildBubbleTree): Added.
2182         (WebCore::ValidationMessage::requestToHideMessage): Added.
2183         (WebCore::ValidationMessage::deleteBubbleTree):
2184           Renamed from hideMessage(), and implemented.
2185         * html/ValidationMessage.h: Add declarations.
2186
2187 2011-01-13  Dan Bernstein  <mitz@apple.com>
2188
2189         Reviewed by Alexey Proskuryakov.
2190
2191         <rdar://problem/8827065> REGRESSION (r71884): Cross-origin XHR fails if willSendRequest changes the URL
2192         https://bugs.webkit.org/show_bug.cgi?id=52419
2193
2194         Test: http/tests/loading/cross-origin-XHR-willLoadRequest.html
2195
2196         * loader/ResourceLoader.cpp:
2197         (WebCore::ResourceLoader::init): Complete r74453 by ensuring that m_request is only set after
2198         willSendRequest(). Otherwise, willSendRequest() ends up calling into
2199         ThreadableDocumentRequest::willSendRequest(), which cancels the request.
2200
2201 2011-01-13  Dan Bernstein  <mitz@apple.com>
2202
2203         Reviewed by Mark Rowe.
2204
2205         Don’t try to compile InjectedScriptSource.js into WebCore.
2206
2207         * WebCore.xcodeproj/project.pbxproj:
2208
2209 2011-01-13  Mike Thole  <mthole@apple.com>
2210
2211         Reviewed by Darin Adler and Brady Eidson.
2212
2213         The pageScaleFactor() should be saved/restored along with the scroll position
2214         https://bugs.webkit.org/show_bug.cgi?id=52406
2215         <rdar://problem/8714412>
2216
2217         * history/HistoryItem.cpp:
2218         (WebCore::HistoryItem::HistoryItem): Initialize m_pageScaleFactor.
2219         (WebCore::HistoryItem::pageScaleFactor): Added getter.
2220         (WebCore::HistoryItem::setPageScaleFactor): Added setter.
2221         (WebCore::HistoryItem::encodeBackForwardTreeNode): Encode m_pageScaleFactor.
2222         (WebCore::HistoryItem::decodeBackForwardTree): Decode m_pageScaleFactor.
2223         * history/HistoryItem.h:
2224         * loader/HistoryController.cpp:
2225         (WebCore::HistoryController::saveScrollPositionAndViewStateToItem): Save the page scale factor...
2226         (WebCore::HistoryController::restoreScrollPositionAndViewState): ...and restore it here.
2227
2228 2011-01-13  Evan Martin  <evan@chromium.org>
2229
2230         Reviewed by Tony Chang.
2231
2232         [chromium] drop backwards iteration in Linux complex text code
2233         https://bugs.webkit.org/show_bug.cgi?id=52403
2234
2235         ComplexTextController previously supported iterating through the text in
2236         both directions, but this resulted in duplicate code for each path.
2237         Instead, by being more careful about flipping signs where appropriate,
2238         we can refactor the code into one code path.
2239
2240         No tests, just a refactoring; should be covered by existing tests.
2241
2242         * platform/graphics/chromium/ComplexTextControllerLinux.cpp:
2243         (WebCore::ComplexTextController::ComplexTextController):
2244         (WebCore::ComplexTextController::reset):
2245         (WebCore::ComplexTextController::nextScriptRun):
2246         * platform/graphics/chromium/ComplexTextControllerLinux.h:
2247         * platform/graphics/chromium/FontLinux.cpp:
2248         (WebCore::glyphIndexForXPositionInScriptRun):
2249         (WebCore::Font::selectionRectForComplexText):
2250
2251 2011-01-13  Dimitri Glazkov  <dglazkov@chromium.org>
2252
2253         Reviewed by Darin Adler.
2254
2255         Flip input[type=range] to use the new shadow DOM model.
2256         https://bugs.webkit.org/show_bug.cgi?id=52317
2257
2258         This is a straight-up flip, minimal change to the logic, which will be
2259         refactored in a follow-up patch.
2260
2261         Covered by existing tests.
2262
2263         * css/CSSStyleSelector.cpp:
2264         (WebCore::CSSStyleSelector::initForStyleResolve): Changed to use either
2265             host or parent node to find parent.
2266         * html/HTMLInputElement.cpp:
2267         (WebCore::HTMLInputElement::updateType): Added logic for destroying/creating
2268             shadow DOM subtree.
2269         * html/InputType.cpp:
2270         (WebCore::InputType::createShadowSubtree): Added empty decl.
2271         (WebCore::InputType::destroyShadowSubtree): Added a method to destroy
2272             shadow subtree.
2273         * html/InputType.h: Added defs.
2274         * html/RangeInputType.cpp:
2275         (WebCore::RangeInputType::createShadowSubtree): Added a virtual method to create
2276             slider thumb.
2277         * html/RangeInputType.h: Adde def.
2278         * html/shadow/SliderThumbElement.cpp: Added temporary RenderSliderThumb class
2279             to handle cascading appearance.
2280         (WebCore::RenderSliderThumb::RenderSliderThumb): Added.
2281         (WebCore::RenderSliderThumb::layout): Moved here the logic from
2282             RenderSlider::createThumbStyle.
2283         (WebCore::SliderThumbElement::createRenderer): Added virtual method to
2284             create RenderSliderThumb instance.
2285         (WebCore::SliderThumbElement::defaultEventHandler): Changed to use HTMLDivElement
2286             as base class.
2287         (WebCore::SliderThumbElement::detach): Ditto.
2288         * html/shadow/SliderThumbElement.h:
2289         (WebCore::SliderThumbElement::SliderThumbElement): Ditto.
2290         (WebCore::SliderThumbElement::create): Ditto.
2291         (WebCore::toSliderThumbElement): Added a casting helper.
2292         * rendering/MediaControlElements.cpp:
2293         (WebCore::MediaControlInputElement::attach): Added handling of shadow DOM,
2294             since the whole method is hand-rolled.
2295         (WebCore::MediaControlInputElement::updateStyle): Ditto.
2296         * rendering/RenderSlider.cpp:
2297         (WebCore::RenderSlider::~RenderSlider): Removed unneeded code.
2298         (WebCore::RenderSlider::thumbRect): Changed to use sliderThumbElement helper.
2299         (WebCore::RenderSlider::layout): Ditto.
2300         (WebCore::RenderSlider::sliderThumbElement): Added a temporary helper to access
2301             SliderThumbElement.
2302         (WebCore::RenderSlider::mouseEventIsInThumb): Changed to use sliderThumbElement helper.
2303         (WebCore::RenderSlider::mouseEventOffsetToThumb): Ditto.
2304         (WebCore::RenderSlider::setValueForPosition): Ditto.
2305         (WebCore::RenderSlider::positionForOffset): Ditto.
2306         (WebCore::RenderSlider::currentPosition): Ditto.
2307         (WebCore::RenderSlider::trackSize): Ditto.
2308         (WebCore::RenderSlider::forwardEvent): Ditto.
2309         (WebCore::RenderSlider::inDragMode): Ditto.
2310         * rendering/RenderSlider.h: Added def.
2311
2312 2011-01-13  Adam Barth  <abarth@webkit.org>
2313
2314         Reviewed by Eric Seidel.
2315
2316         Rename RGBA32Buffer to ImageFrame
2317         https://bugs.webkit.org/show_bug.cgi?id=52363
2318
2319         RGBA32Buffer is a terrible misnomer.  ImageFrame is vastly
2320         more accurate.  More cleanup to come.
2321
2322         * WebCore.pro:
2323         * platform/graphics/ImageSource.cpp:
2324         (WebCore::ImageSource::createFrameAtIndex):
2325         (WebCore::ImageSource::frameDurationAtIndex):
2326         (WebCore::ImageSource::frameIsCompleteAtIndex):
2327         * platform/graphics/qt/ImageDecoderQt.cpp:
2328         (WebCore::ImageDecoderQt::frameBufferAtIndex):
2329         (WebCore::ImageDecoderQt::internalReadImage):
2330         (WebCore::ImageDecoderQt::internalHandleCurrentImage):
2331         * platform/graphics/qt/ImageDecoderQt.h:
2332         * platform/graphics/wince/ImageWinCE.cpp:
2333         (WebCore::ImageFrame::asNewNativeImage):
2334         * platform/image-decoders/ImageDecoder.cpp:
2335         (WebCore::ImageFrame::ImageFrame):
2336         (WebCore::ImageFrame::operator=):
2337         (WebCore::ImageFrame::clear):
2338         (WebCore::ImageFrame::zeroFill):
2339         (WebCore::ImageFrame::copyReferenceToBitmapData):
2340         (WebCore::ImageFrame::copyBitmapData):
2341         (WebCore::ImageFrame::setSize):
2342         (WebCore::ImageFrame::hasAlpha):
2343         (WebCore::ImageFrame::setHasAlpha):
2344         (WebCore::ImageFrame::setColorProfile):
2345         (WebCore::ImageFrame::setStatus):
2346         (WebCore::ImageFrame::width):
2347         (WebCore::ImageFrame::height):
2348         * platform/image-decoders/ImageDecoder.h:
2349         (WebCore::ImageFrame::ImageFrame):
2350         * platform/image-decoders/bmp/BMPImageDecoder.cpp:
2351         (WebCore::BMPImageDecoder::frameBufferAtIndex):
2352         (WebCore::BMPImageDecoder::decode):
2353         * platform/image-decoders/bmp/BMPImageDecoder.h:
2354         * platform/image-decoders/bmp/BMPImageReader.cpp:
2355         (WebCore::BMPImageReader::decodeBMP):
2356         * platform/image-decoders/bmp/BMPImageReader.h:
2357         (WebCore::BMPImageReader::setBuffer):
2358         * platform/image-decoders/cairo/ImageDecoderCairo.cpp:
2359         (WebCore::ImageFrame::asNewNativeImage):
2360         * platform/image-decoders/cg/ImageDecoderCG.cpp:
2361         (WebCore::getPtrAsPixelData):
2362         (WebCore::ImageFrame::copyReferenceToBitmapData):
2363         (WebCore::ImageFrame::copyBitmapData):
2364         (WebCore::ImageFrame::setSize):
2365         (WebCore::ImageFrame::asNewNativeImage):
2366         * platform/image-decoders/gif/GIFImageDecoder.cpp:
2367         (WebCore::GIFImageDecoder::frameBufferAtIndex):
2368         (WebCore::GIFImageDecoder::clearFrameBufferCache):
2369         (WebCore::GIFImageDecoder::haveDecodedRow):
2370         (WebCore::GIFImageDecoder::frameComplete):
2371         (WebCore::GIFImageDecoder::initFrameBuffer):
2372         * platform/image-decoders/gif/GIFImageDecoder.h:
2373         * platform/image-decoders/gif/GIFImageReader.cpp:
2374         (GIFImageReader::read):
2375         * platform/image-decoders/gif/GIFImageReader.h:
2376         (GIFFrameReader::GIFFrameReader):
2377         * platform/image-decoders/haiku/ImageDecoderHaiku.cpp:
2378         (WebCore::ImageFrame::asNewNativeImage):
2379         * platform/image-decoders/ico/ICOImageDecoder.cpp:
2380         (WebCore::ICOImageDecoder::frameBufferAtIndex):
2381         (WebCore::ICOImageDecoder::decode):
2382         * platform/image-decoders/ico/ICOImageDecoder.h:
2383         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
2384         (WebCore::JPEGImageDecoder::frameBufferAtIndex):
2385         (WebCore::JPEGImageDecoder::outputScanlines):
2386         (WebCore::JPEGImageDecoder::jpegComplete):
2387         (WebCore::JPEGImageDecoder::decode):
2388         * platform/image-decoders/jpeg/JPEGImageDecoder.h:
2389         * platform/image-decoders/openvg/ImageDecoderOpenVG.cpp:
2390         (WebCore::ImageFrame::asNewNativeImage):
2391         * platform/image-decoders/png/PNGImageDecoder.cpp:
2392         (WebCore::PNGImageDecoder::frameBufferAtIndex):
2393         (WebCore::PNGImageDecoder::rowAvailable):
2394         (WebCore::PNGImageDecoder::pngComplete):
2395         * platform/image-decoders/png/PNGImageDecoder.h:
2396         (WebCore::PNGImageDecoder::isComplete):
2397         * platform/image-decoders/qt/ImageFrameQt.cpp: Copied from Source/WebCore/platform/image-decoders/qt/RGBA32BufferQt.cpp.
2398         (WebCore::ImageFrame::ImageFrame):
2399         (WebCore::ImageFrame::operator=):
2400         (WebCore::ImageFrame::clear):
2401         (WebCore::ImageFrame::zeroFill):
2402         (WebCore::ImageFrame::copyBitmapData):
2403         (WebCore::ImageFrame::setSize):
2404         (WebCore::ImageFrame::asNewNativeImage):
2405         (WebCore::ImageFrame::hasAlpha):
2406         (WebCore::ImageFrame::setHasAlpha):
2407         (WebCore::ImageFrame::setColorProfile):
2408         (WebCore::ImageFrame::setStatus):
2409         (WebCore::ImageFrame::setPixmap):
2410         (WebCore::ImageFrame::width):
2411         (WebCore::ImageFrame::height):
2412         * platform/image-decoders/qt/RGBA32BufferQt.cpp: Removed.
2413         * platform/image-decoders/skia/ImageDecoderSkia.cpp:
2414         (WebCore::ImageFrame::ImageFrame):
2415         (WebCore::ImageFrame::operator=):
2416         (WebCore::ImageFrame::clear):
2417         (WebCore::ImageFrame::zeroFill):
2418         (WebCore::ImageFrame::copyBitmapData):
2419         (WebCore::ImageFrame::setSize):
2420         (WebCore::ImageFrame::asNewNativeImage):
2421         (WebCore::ImageFrame::hasAlpha):
2422         (WebCore::ImageFrame::setHasAlpha):
2423         (WebCore::ImageFrame::setColorProfile):
2424         (WebCore::ImageFrame::setStatus):
2425         (WebCore::ImageFrame::width):
2426         (WebCore::ImageFrame::height):
2427         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
2428         (WebCore::WEBPImageDecoder::frameBufferAtIndex):
2429         (WebCore::WEBPImageDecoder::decode):
2430         * platform/image-decoders/webp/WEBPImageDecoder.h:
2431         * platform/image-decoders/wx/ImageDecoderWx.cpp:
2432         (WebCore::ImageFrame::asNewNativeImage):
2433
2434 2011-01-13  Dimitri Glazkov  <dglazkov@chromium.org>
2435
2436         Reviewed by Darin Adler.
2437
2438         Transferring nodes between documents should be aware of the shadow DOM.
2439         https://bugs.webkit.org/show_bug.cgi?id=52399
2440
2441         No visible change in behavior at the moment.
2442
2443         Once https://bugs.webkit.org/show_bug.cgi?id=52317 lands, the following
2444         tests should no longer crash:
2445         * fast/css/pseudo-in-range-invalid-value.html
2446         * fast/css/pseudo-in-range.html
2447         * fast/forms/form-collection-elements.html
2448         * fast/forms/range-keyoperation.html
2449
2450         * dom/Document.cpp:
2451         (WebCore::Document::adoptNode): Changed to use Node::setDocumentRecursively.
2452         * dom/Node.cpp:
2453         (WebCore::Node::setDocumentRecursively): Added new method, taking existing
2454             logic and adding shadow DOM traversal.
2455         (WebCore::Node::traverseNextNode): Style fix.
2456         (WebCore::Node::traverseNextSibling): Ditto.
2457         (WebCore::Node::traversePreviousNode): Ditto.
2458         (WebCore::Node::traversePreviousNodePostOrder): Ditto.
2459         (WebCore::Node::checkReplaceChild): Changed to use setDocumentRecursively.
2460         (WebCore::Node::checkAddChild): Ditto.
2461         * dom/Node.h: Added def.
2462
2463 2011-01-12  Enrica Casucci  <enrica@apple.com>
2464
2465         Reviewed by Darin Adler.
2466
2467         WebKit2: Add support for drag and drop
2468         https://bugs.webkit.org/show_bug.cgi?id=52343
2469         <rdar://problem/7660558>
2470                
2471         This patch contains the changes required to support dropping content
2472         in WebKit on the Mac. The DragData class has been extended to provide
2473         additional context from the application (keyboard state, modal windows, etc.)
2474         as well as information of the drag pasteboard being used.
2475         The support for WebKit as drag source will be added with a separate patch.
2476
2477         * WebCore.exp.in:
2478         * page/DragController.cpp:
2479         (WebCore::DragController::dragIsMove): Added DragData parameter.
2480         (WebCore::DragController::tryDocumentDrag): Modified call to dragIsMove.
2481         (WebCore::DragController::concludeEditDrag): Same as above.
2482         * page/DragController.h: Added parameter to isCopyKeyDown.
2483         * page/mac/DragControllerMac.mm:
2484         The following methods have been modified to use the information stored
2485         in the DragData class.
2486         (WebCore::DragController::isCopyKeyDown):
2487         (WebCore::DragController::dragOperation):
2488         * platform/DragData.h:
2489         (WebCore::DragData::flags):
2490         * platform/DragData.cpp: Added default flags parameter to the constructor.
2491         * platform/mac/DragDataMac.mm:
2492         (WebCore::DragData::DragData): Added constructor that receives the name of the pasteboard to use.
2493         (WebCore::DragData::canSmartReplace):
2494         (WebCore::DragData::containsColor):
2495         (WebCore::DragData::containsFiles):
2496         (WebCore::DragData::asFilenames):
2497         (WebCore::DragData::containsPlainText):
2498         (WebCore::DragData::asPlainText):
2499         (WebCore::DragData::containsCompatibleContent):
2500         (WebCore::DragData::asURL):
2501         (WebCore::DragData::asFragment):
2502         All the following files have been modified to add the DragData
2503         parameter to isCopyKeyDown. I plan to improve this in the future
2504         and make isCopyKeyDown not platform specific.
2505         * page/android/DragControllerAndroid.cpp:
2506         (WebCore::DragController::isCopyKeyDown):
2507         * page/brew/DragControllerBrew.cpp:
2508         (WebCore::DragController::isCopyKeyDown):
2509         * page/chromium/DragControllerChromium.cpp:
2510         (WebCore::DragController::isCopyKeyDown):
2511         * page/efl/DragControllerEfl.cpp:
2512         (WebCore::DragController::isCopyKeyDown):
2513         * page/gtk/DragControllerGtk.cpp:
2514         (WebCore::DragController::isCopyKeyDown):
2515         * page/haiku/DragControllerHaiku.cpp:
2516         (WebCore::DragController::isCopyKeyDown):
2517         * page/mac/DragControllerMac.mm:
2518         (WebCore::DragController::isCopyKeyDown):
2519         (WebCore::DragController::dragOperation):
2520         * page/qt/DragControllerQt.cpp:
2521         (WebCore::DragController::isCopyKeyDown):
2522         * page/win/DragControllerWin.cpp:
2523         (WebCore::DragController::isCopyKeyDown):
2524         * page/wx/DragControllerWx.cpp:
2525         (WebCore::DragController::isCopyKeyDown):
2526
2527 2011-01-13  David Kilzer  <ddkilzer@apple.com>
2528
2529         Add missing MathMLElementFactory.h and MathMLNames.h to Xcode project
2530
2531         Not reviewed.
2532
2533         * WebCore.xcodeproj/project.pbxproj: Add missing headers.  Note
2534         that the corresponding source files were originally added to the
2535         project in r48559.
2536
2537 2011-01-12  Zhenyao Mo  <zmo@google.com>
2538
2539         Reviewed by Kenneth Russell.
2540
2541         Use GC3D types in WebGLRenderingContext and related WebGL classes
2542         https://bugs.webkit.org/show_bug.cgi?id=51908
2543
2544         * html/canvas/WebGLActiveInfo.h:
2545         (WebCore::WebGLActiveInfo::create):
2546         (WebCore::WebGLActiveInfo::type):
2547         (WebCore::WebGLActiveInfo::size):
2548         (WebCore::WebGLActiveInfo::WebGLActiveInfo):
2549         * html/canvas/WebGLBuffer.cpp:
2550         (WebCore::WebGLBuffer::associateBufferDataImpl):
2551         (WebCore::WebGLBuffer::associateBufferData):
2552         (WebCore::WebGLBuffer::associateBufferSubDataImpl):
2553         (WebCore::WebGLBuffer::associateBufferSubData):
2554         (WebCore::WebGLBuffer::byteLength):
2555         (WebCore::WebGLBuffer::getCachedMaxIndex):
2556         (WebCore::WebGLBuffer::setCachedMaxIndex):
2557         (WebCore::WebGLBuffer::setTarget):
2558         * html/canvas/WebGLBuffer.h:
2559         (WebCore::WebGLBuffer::getTarget):
2560         * html/canvas/WebGLFramebuffer.cpp:
2561         (WebCore::WebGLFramebuffer::setAttachment):
2562         (WebCore::WebGLFramebuffer::getAttachment):
2563         (WebCore::WebGLFramebuffer::getWidth):
2564         (WebCore::WebGLFramebuffer::getHeight):
2565         (WebCore::WebGLFramebuffer::getColorBufferFormat):
2566         (WebCore::WebGLFramebuffer::initializeRenderbuffers):
2567         * html/canvas/WebGLFramebuffer.h:
2568         * html/canvas/WebGLProgram.cpp:
2569         (WebCore::WebGLProgram::cacheActiveAttribLocations):
2570         (WebCore::WebGLProgram::numActiveAttribLocations):
2571         (WebCore::WebGLProgram::getActiveAttribLocation):
2572         (WebCore::WebGLProgram::isUsingVertexAttrib0):
2573         * html/canvas/WebGLProgram.h:
2574         (WebCore::WebGLProgram::getLinkCount):
2575         * html/canvas/WebGLRenderbuffer.h:
2576         (WebCore::WebGLRenderbuffer::setInternalFormat):
2577         (WebCore::WebGLRenderbuffer::getInternalFormat):
2578         (WebCore::WebGLRenderbuffer::setSize):
2579         (WebCore::WebGLRenderbuffer::getWidth):
2580         (WebCore::WebGLRenderbuffer::getHeight):
2581         * html/canvas/WebGLRenderingContext.cpp:
2582         (WebCore::WebGLRenderingContext::initializeNewContext):
2583         (WebCore::WebGLRenderingContext::sizeInBytes):
2584         (WebCore::WebGLRenderingContext::activeTexture):
2585         (WebCore::WebGLRenderingContext::bindAttribLocation):
2586         (WebCore::WebGLRenderingContext::bindBuffer):
2587         (WebCore::WebGLRenderingContext::bindFramebuffer):
2588         (WebCore::WebGLRenderingContext::bindRenderbuffer):
2589         (WebCore::WebGLRenderingContext::bindTexture):
2590         (WebCore::WebGLRenderingContext::blendColor):
2591         (WebCore::WebGLRenderingContext::blendEquation):
2592         (WebCore::WebGLRenderingContext::blendEquationSeparate):
2593         (WebCore::WebGLRenderingContext::blendFunc):
2594         (WebCore::WebGLRenderingContext::blendFuncSeparate):
2595         (WebCore::WebGLRenderingContext::bufferData):
2596         (WebCore::WebGLRenderingContext::bufferSubData):
2597         (WebCore::WebGLRenderingContext::checkFramebufferStatus):
2598         (WebCore::WebGLRenderingContext::clear):
2599         (WebCore::WebGLRenderingContext::clearColor):
2600         (WebCore::WebGLRenderingContext::clearDepth):
2601         (WebCore::WebGLRenderingContext::clearStencil):
2602         (WebCore::WebGLRenderingContext::colorMask):
2603         (WebCore::WebGLRenderingContext::copyTexImage2D):
2604         (WebCore::WebGLRenderingContext::copyTexSubImage2D):
2605         (WebCore::WebGLRenderingContext::createShader):
2606         (WebCore::WebGLRenderingContext::cullFace):
2607         (WebCore::WebGLRenderingContext::deleteBuffer):
2608         (WebCore::WebGLRenderingContext::depthFunc):
2609         (WebCore::WebGLRenderingContext::depthMask):
2610         (WebCore::WebGLRenderingContext::depthRange):
2611         (WebCore::WebGLRenderingContext::disable):
2612         (WebCore::WebGLRenderingContext::disableVertexAttribArray):
2613         (WebCore::WebGLRenderingContext::validateElementArraySize):
2614         (WebCore::WebGLRenderingContext::validateIndexArrayConservative):
2615         (WebCore::WebGLRenderingContext::validateIndexArrayPrecise):
2616         (WebCore::WebGLRenderingContext::validateRenderingState):
2617         (WebCore::WebGLRenderingContext::drawArrays):
2618         (WebCore::WebGLRenderingContext::drawElements):
2619         (WebCore::WebGLRenderingContext::enable):
2620         (WebCore::WebGLRenderingContext::enableVertexAttribArray):
2621         (WebCore::WebGLRenderingContext::framebufferRenderbuffer):
2622         (WebCore::WebGLRenderingContext::framebufferTexture2D):
2623         (WebCore::WebGLRenderingContext::frontFace):
2624         (WebCore::WebGLRenderingContext::generateMipmap):
2625         (WebCore::WebGLRenderingContext::getActiveAttrib):
2626         (WebCore::WebGLRenderingContext::getActiveUniform):
2627         (WebCore::WebGLRenderingContext::getAttachedShaders):
2628         (WebCore::WebGLRenderingContext::getAttribLocation):
2629         (WebCore::WebGLRenderingContext::getBufferParameter):
2630         (WebCore::WebGLRenderingContext::getError):
2631         (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter):
2632         (WebCore::WebGLRenderingContext::getParameter):
2633         (WebCore::WebGLRenderingContext::getProgramParameter):
2634         (WebCore::WebGLRenderingContext::getRenderbufferParameter):
2635         (WebCore::WebGLRenderingContext::getShaderParameter):
2636         (WebCore::WebGLRenderingContext::getTexParameter):
2637         (WebCore::WebGLRenderingContext::getUniform):
2638         (WebCore::WebGLRenderingContext::getUniformLocation):
2639         (WebCore::WebGLRenderingContext::getVertexAttrib):
2640         (WebCore::WebGLRenderingContext::getVertexAttribOffset):
2641         (WebCore::WebGLRenderingContext::hint):
2642         (WebCore::WebGLRenderingContext::isBuffer):
2643         (WebCore::WebGLRenderingContext::isEnabled):
2644         (WebCore::WebGLRenderingContext::isFramebuffer):
2645         (WebCore::WebGLRenderingContext::isProgram):
2646         (WebCore::WebGLRenderingContext::isRenderbuffer):
2647         (WebCore::WebGLRenderingContext::isShader):
2648         (WebCore::WebGLRenderingContext::isTexture):
2649         (WebCore::WebGLRenderingContext::lineWidth):
2650         (WebCore::WebGLRenderingContext::linkProgram):
2651         (WebCore::WebGLRenderingContext::pixelStorei):
2652         (WebCore::WebGLRenderingContext::polygonOffset):
2653         (WebCore::WebGLRenderingContext::readPixels):
2654         (WebCore::WebGLRenderingContext::renderbufferStorage):
2655         (WebCore::WebGLRenderingContext::sampleCoverage):
2656         (WebCore::WebGLRenderingContext::scissor):
2657         (WebCore::WebGLRenderingContext::stencilFunc):
2658         (WebCore::WebGLRenderingContext::stencilFuncSeparate):
2659         (WebCore::WebGLRenderingContext::stencilMask):
2660         (WebCore::WebGLRenderingContext::stencilMaskSeparate):
2661         (WebCore::WebGLRenderingContext::stencilOp):
2662         (WebCore::WebGLRenderingContext::stencilOpSeparate):
2663         (WebCore::WebGLRenderingContext::texImage2DBase):
2664         (WebCore::WebGLRenderingContext::texImage2DImpl):
2665         (WebCore::WebGLRenderingContext::texImage2D):
2666         (WebCore::WebGLRenderingContext::texParameter):
2667         (WebCore::WebGLRenderingContext::texParameterf):
2668         (WebCore::WebGLRenderingContext::texParameteri):
2669         (WebCore::WebGLRenderingContext::texSubImage2DBase):
2670         (WebCore::WebGLRenderingContext::texSubImage2DImpl):
2671         (WebCore::WebGLRenderingContext::texSubImage2D):
2672         (WebCore::WebGLRenderingContext::uniform1f):
2673         (WebCore::WebGLRenderingContext::uniform1fv):
2674         (WebCore::WebGLRenderingContext::uniform1i):
2675         (WebCore::WebGLRenderingContext::uniform1iv):
2676         (WebCore::WebGLRenderingContext::uniform2f):
2677         (WebCore::WebGLRenderingContext::uniform2fv):
2678         (WebCore::WebGLRenderingContext::uniform2i):
2679         (WebCore::WebGLRenderingContext::uniform2iv):
2680         (WebCore::WebGLRenderingContext::uniform3f):
2681         (WebCore::WebGLRenderingContext::uniform3fv):
2682         (WebCore::WebGLRenderingContext::uniform3i):
2683         (WebCore::WebGLRenderingContext::uniform3iv):
2684         (WebCore::WebGLRenderingContext::uniform4f):
2685         (WebCore::WebGLRenderingContext::uniform4fv):
2686         (WebCore::WebGLRenderingContext::uniform4i):
2687         (WebCore::WebGLRenderingContext::uniform4iv):
2688         (WebCore::WebGLRenderingContext::uniformMatrix2fv):
2689         (WebCore::WebGLRenderingContext::uniformMatrix3fv):
2690         (WebCore::WebGLRenderingContext::uniformMatrix4fv):
2691         (WebCore::WebGLRenderingContext::vertexAttrib1f):
2692         (WebCore::WebGLRenderingContext::vertexAttrib1fv):
2693         (WebCore::WebGLRenderingContext::vertexAttrib2f):
2694         (WebCore::WebGLRenderingContext::vertexAttrib2fv):
2695         (WebCore::WebGLRenderingContext::vertexAttrib3f):
2696         (WebCore::WebGLRenderingContext::vertexAttrib3fv):
2697         (WebCore::WebGLRenderingContext::vertexAttrib4f):
2698         (WebCore::WebGLRenderingContext::vertexAttrib4fv):
2699         (WebCore::WebGLRenderingContext::vertexAttribPointer):
2700         (WebCore::WebGLRenderingContext::viewport):
2701         (WebCore::WebGLRenderingContext::getBooleanParameter):
2702         (WebCore::WebGLRenderingContext::getBooleanArrayParameter):
2703         (WebCore::WebGLRenderingContext::getFloatParameter):
2704         (WebCore::WebGLRenderingContext::getIntParameter):
2705         (WebCore::WebGLRenderingContext::getLongParameter):
2706         (WebCore::WebGLRenderingContext::getUnsignedLongParameter):
2707         (WebCore::WebGLRenderingContext::getWebGLFloatArrayParameter):
2708         (WebCore::WebGLRenderingContext::getWebGLIntArrayParameter):
2709         (WebCore::WebGLRenderingContext::isTexInternalFormatColorBufferCombinationValid):
2710         (WebCore::WebGLRenderingContext::getBoundFramebufferColorFormat):
2711         (WebCore::WebGLRenderingContext::validateTextureBinding):
2712         (WebCore::WebGLRenderingContext::validateSize):
2713         (WebCore::WebGLRenderingContext::validateTexFuncFormatAndType):
2714         (WebCore::WebGLRenderingContext::validateTexFuncLevel):
2715         (WebCore::WebGLRenderingContext::validateTexFuncParameters):
2716         (WebCore::WebGLRenderingContext::validateTexFuncData):
2717         (WebCore::WebGLRenderingContext::validateDrawMode):
2718         (WebCore::WebGLRenderingContext::validateStencilFunc):
2719         (WebCore::WebGLRenderingContext::validateFramebufferFuncParameters):
2720         (WebCore::WebGLRenderingContext::validateBlendEquation):
2721         (WebCore::WebGLRenderingContext::validateBlendFuncFactors):
2722         (WebCore::WebGLRenderingContext::validateCapability):
2723         (WebCore::WebGLRenderingContext::validateUniformParameters):
2724         (WebCore::WebGLRenderingContext::validateUniformMatrixParameters):
2725         (WebCore::WebGLRenderingContext::validateBufferDataParameters):
2726         (WebCore::WebGLRenderingContext::vertexAttribfImpl):
2727         (WebCore::WebGLRenderingContext::vertexAttribfvImpl):
2728         (WebCore::WebGLRenderingContext::simulateVertexAttrib0):
2729         * html/canvas/WebGLRenderingContext.h:
2730         (WebCore::WebGLRenderingContext::VertexAttribState::VertexAttribState):
2731         * html/canvas/WebGLShader.cpp:
2732         (WebCore::WebGLShader::create):
2733         (WebCore::WebGLShader::WebGLShader):
2734         * html/canvas/WebGLShader.h:
2735         (WebCore::WebGLShader::getType):
2736         * html/canvas/WebGLTexture.cpp:
2737         (WebCore::WebGLTexture::setTarget):
2738         (WebCore::WebGLTexture::setParameteri):
2739         (WebCore::WebGLTexture::setParameterf):
2740         (WebCore::WebGLTexture::setLevelInfo):
2741         (WebCore::WebGLTexture::generateMipmapLevelInfo):
2742         (WebCore::WebGLTexture::getInternalFormat):
2743         (WebCore::WebGLTexture::getType):
2744         (WebCore::WebGLTexture::getWidth):
2745         (WebCore::WebGLTexture::getHeight):
2746         (WebCore::WebGLTexture::isNPOT):
2747         (WebCore::WebGLTexture::mapTargetToIndex):
2748         (WebCore::WebGLTexture::computeLevelCount):
2749         (WebCore::WebGLTexture::update):
2750         (WebCore::WebGLTexture::getLevelInfo):
2751         * html/canvas/WebGLTexture.h:
2752         (WebCore::WebGLTexture::LevelInfo::setInfo):
2753         * html/canvas/WebGLUniformLocation.cpp:
2754         (WebCore::WebGLUniformLocation::create):
2755         (WebCore::WebGLUniformLocation::WebGLUniformLocation):
2756         (WebCore::WebGLUniformLocation::location):
2757         * html/canvas/WebGLUniformLocation.h:
2758         * platform/graphics/GraphicsContext3D.h: Map GC3Dboolean to bool instead of unsigned char.
2759
2760 2011-01-13  Jian Li  <jianli@chromium.org>
2761
2762         Reviewed by Darin Fisher.
2763
2764         Change createObjectURL and revokeObjectURL to put under webkitURL.
2765         https://bugs.webkit.org/show_bug.cgi?id=52257
2766
2767         Note that we add "webkit" vendor prefix to URL that is introduced in
2768         the latest File API spec.
2769
2770         For the time being, we implement webkitURL as a readonly attribute
2771         instead of a constructor so that we will not expose prototype property,
2772         as required by the spec.
2773
2774         * Android.derived.jscbindings.mk:
2775         * Android.derived.v8bindings.mk:
2776         * Android.mk:
2777         * CMakeLists.txt:
2778         * DerivedSources.cpp:
2779         * DerivedSources.make:
2780         * GNUmakefile.am:
2781         * WebCore.gypi:
2782         * WebCore.pri:
2783         * WebCore.pro:
2784         * WebCore.vcproj/WebCore.vcproj:
2785         * WebCore.xcodeproj/project.pbxproj:
2786         * html/DOMURL.cpp: Added.
2787         * html/DOMURL.h: Added.
2788         * html/DOMURL.idl: Added.
2789         * inspector/front-end/NetworkPanel.js:
2790         * inspector/front-end/utilities.js:
2791         * page/DOMWindow.cpp:
2792         (WebCore::DOMWindow::webkitURL):
2793         * page/DOMWindow.h:
2794         * page/DOMWindow.idl:
2795         * workers/WorkerContext.cpp:
2796         (WebCore::WorkerContext::webkitURL):
2797         * workers/WorkerContext.h:
2798         * workers/WorkerContext.idl:
2799
2800 2011-01-13  Emil Eklund  <eae@chromium.org>
2801
2802         Reviewed by Dimitri Glazkov.
2803
2804         Setting outerText should convert CR/LF to <br>
2805         https://bugs.webkit.org/show_bug.cgi?id=52268
2806
2807         Make set outerText support line breaks (sharing the text to fragment code
2808         with setInnerText) and handle empty text nodes the same way IE does.
2809
2810         Test: fast/dom/set-outer-text.html
2811
2812         * html/HTMLElement.cpp:
2813         (WebCore::HTMLElement::textToFragment): Shared between setInnerText and setOuterText
2814         (WebCore::HTMLElement::setInnerText): Split out text parsing code.
2815         (WebCore::mergeWithNextTextNode): Split out text node merging code.
2816         (WebCore::HTMLElement::setOuterText): Added support for line breaks.
2817         * html/HTMLElement.h:
2818
2819 2011-01-13  Zhenyao Mo  <zmo@google.com>
2820
2821         Reviewed by Kenneth Russell.
2822
2823         Relax the ESSL valid charset a little bit to include " ' `
2824         https://bugs.webkit.org/show_bug.cgi?id=52396
2825
2826         * html/canvas/WebGLRenderingContext.cpp:
2827
2828 >>>>>>> .r75740
2829 2011-01-13  Adrienne Walker  <enne@google.com>
2830
2831         Reviewed by Kenneth Russell.
2832
2833         [chromium] Attempt to fix crash in tiled compositor memcpy
2834         https://bugs.webkit.org/show_bug.cgi?id=52379
2835
2836         * platform/graphics/chromium/LayerTilerChromium.cpp:
2837         (WebCore::LayerTilerChromium::update):
2838
2839 2011-01-13  Dimitri Glazkov  <dglazkov@chromium.org>
2840
2841         Unreviewed, rolling out r75725.
2842         http://trac.webkit.org/changeset/75725
2843         https://bugs.webkit.org/show_bug.cgi?id=52317
2844
2845         Caused crashes in layout tests.
2846
2847         * css/CSSStyleSelector.cpp:
2848         (WebCore::CSSStyleSelector::initForStyleResolve):
2849         * html/HTMLInputElement.cpp:
2850         (WebCore::HTMLInputElement::updateType):
2851         * html/InputType.cpp:
2852         * html/InputType.h:
2853         * html/RangeInputType.cpp:
2854         * html/RangeInputType.h:
2855         * html/shadow/SliderThumbElement.cpp:
2856         (WebCore::SliderThumbElement::defaultEventHandler):
2857         (WebCore::SliderThumbElement::detach):
2858         * html/shadow/SliderThumbElement.h:
2859         (WebCore::SliderThumbElement::SliderThumbElement):
2860         (WebCore::SliderThumbElement::create):
2861         * rendering/MediaControlElements.cpp:
2862         (WebCore::MediaControlInputElement::attach):
2863         (WebCore::MediaControlInputElement::updateStyle):
2864         * rendering/RenderSlider.cpp:
2865         (WebCore::RenderSlider::~RenderSlider):
2866         (WebCore::RenderSlider::styleDidChange):
2867         (WebCore::RenderSlider::createThumbStyle):
2868         (WebCore::RenderSlider::thumbRect):
2869         (WebCore::RenderSlider::layout):
2870         (WebCore::RenderSlider::updateFromElement):
2871         (WebCore::RenderSlider::mouseEventIsInThumb):
2872         (WebCore::RenderSlider::mouseEventOffsetToThumb):
2873         (WebCore::RenderSlider::setValueForPosition):
2874         (WebCore::RenderSlider::positionForOffset):
2875         (WebCore::RenderSlider::currentPosition):
2876         (WebCore::RenderSlider::trackSize):
2877         (WebCore::RenderSlider::forwardEvent):
2878         (WebCore::RenderSlider::inDragMode):
2879         * rendering/RenderSlider.h:
2880
2881 2011-01-12  Dimitri Glazkov  <dglazkov@chromium.org>
2882
2883         Reviewed by Darin Adler.
2884
2885         Flip input[type=range] to use the new shadow DOM model.
2886         https://bugs.webkit.org/show_bug.cgi?id=52317
2887
2888         This is a straight-up flip, minimal change to the logic, which will be
2889         refactored in a follow-up patch.
2890
2891         Covered by existing tests.
2892
2893         * css/CSSStyleSelector.cpp:
2894         (WebCore::CSSStyleSelector::initForStyleResolve): Changed to use either
2895             host or parent node to find parent.
2896         * html/HTMLInputElement.cpp:
2897         (WebCore::HTMLInputElement::updateType): Added logic for destroying/creating
2898             shadow DOM subtree.
2899         * html/InputType.cpp:
2900         (WebCore::InputType::createShadowSubtree): Added empty decl.
2901         (WebCore::InputType::destroyShadowSubtree): Added a method to destroy
2902             shadow subtree.
2903         * html/InputType.h: Added defs.
2904         * html/RangeInputType.cpp:
2905         (WebCore::RangeInputType::createShadowSubtree): Added a virtual method to create
2906             slider thumb.
2907         * html/RangeInputType.h: Adde def.
2908         * html/shadow/SliderThumbElement.cpp: Added temporary RenderSliderThumb class
2909             to handle cascading appearance.
2910         (WebCore::RenderSliderThumb::RenderSliderThumb): Added.
2911         (WebCore::RenderSliderThumb::layout): Moved here the logic from
2912             RenderSlider::createThumbStyle.
2913         (WebCore::SliderThumbElement::createRenderer): Added virtual method to
2914             create RenderSliderThumb instance.
2915         (WebCore::SliderThumbElement::defaultEventHandler): Changed to use HTMLDivElement
2916             as base class.
2917         (WebCore::SliderThumbElement::detach): Ditto.
2918         * html/shadow/SliderThumbElement.h:
2919         (WebCore::SliderThumbElement::SliderThumbElement): Ditto.
2920         (WebCore::SliderThumbElement::create): Ditto.
2921         (WebCore::toSliderThumbElement): Added a casting helper.
2922         * rendering/MediaControlElements.cpp:
2923         (WebCore::MediaControlInputElement::attach): Added handling of shadow DOM,
2924             since the whole method is hand-rolled.
2925         (WebCore::MediaControlInputElement::updateStyle): Ditto.
2926         * rendering/RenderSlider.cpp:
2927         (WebCore::RenderSlider::~RenderSlider): Removed unneeded code.
2928         (WebCore::RenderSlider::thumbRect): Changed to use sliderThumbElement helper.
2929         (WebCore::RenderSlider::layout): Ditto.
2930         (WebCore::RenderSlider::sliderThumbElement): Added a temporary helper to access
2931             SliderThumbElement.
2932         (WebCore::RenderSlider::mouseEventIsInThumb): Changed to use sliderThumbElement helper.
2933         (WebCore::RenderSlider::mouseEventOffsetToThumb): Ditto.
2934         (WebCore::RenderSlider::setValueForPosition): Ditto.
2935         (WebCore::RenderSlider::positionForOffset): Ditto.
2936         (WebCore::RenderSlider::currentPosition): Ditto.
2937         (WebCore::RenderSlider::trackSize): Ditto.
2938         (WebCore::RenderSlider::forwardEvent): Ditto.
2939         (WebCore::RenderSlider::inDragMode): Ditto.
2940         * rendering/RenderSlider.h: Added def.
2941
2942 2011-01-13  Dan Bernstein  <mitz@apple.com>
2943
2944         Reviewed by Simon Fraser.
2945
2946         <rdar://problem/8098442> Crash in Widget::setFrameRect()
2947         https://bugs.webkit.org/show_bug.cgi?id=52375
2948
2949         Test: plugins/destroy-on-setwindow.html
2950
2951         * platform/mac/WidgetMac.mm:
2952         (WebCore::Widget::setFrameRect): Protect the Widget from being deleted as a result of calling
2953         out to the view.
2954         (WebCore::Widget::getOuterView): Coding style fix.
2955         (WebCore::Widget::paint): Protect the Widget from being deleted as a result of calling out to
2956         the views. This is precautionary, since this function does not applear to access member variables
2957         after such calls.
2958         * platform/wx/WidgetWx.cpp:
2959         (WebCore::Widget::setFrameRect): Protect the Widget from being deleted as a result of calling
2960         out to the platform widget.
2961
2962 2011-01-13  Csaba Osztrogonác  <ossy@webkit.org>
2963
2964         Unreviewed buildfix after r75715.
2965
2966         * WebCore.pri:
2967         * WebCore.pro:
2968
2969 2011-01-13  Pavel Feldman  <pfeldman@chromium.org>
2970
2971         Not reviewed: Qt build fix.
2972
2973         * WebCore.pri:
2974
2975 2011-01-12  Pavel Feldman  <pfeldman@chromium.org>
2976
2977         Reviewed by Yury Semikhatsky.
2978
2979         Web Inspector: embed injected script into the backend.
2980         https://bugs.webkit.org/show_bug.cgi?id=52312
2981
2982         InjectedScript belongs to the backend of the system and
2983         should be exposed by means of protocol, not InjectedScriptAccess.
2984         This patch makes injected script a part of the backend.
2985         It introduces single manual generation step (xxd -i) that should be
2986         automated by the build scripts for all the platforms.
2987
2988         * CMakeLists.txt:
2989         * DerivedSources.make:
2990         * GNUmakefile.am:
2991         * WebCore.gyp/WebCore.gyp:
2992         * WebCore.gypi:
2993         * WebCore.pro:
2994         * WebCore.vcproj/WebCore.vcproj:
2995         * WebCore.xcodeproj/project.pbxproj:
2996         * bindings/js/JSInjectedScriptHostCustom.cpp:
2997         (WebCore::InjectedScriptHost::injectedScriptFor):
2998         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
2999         (WebCore::InjectedScriptHost::injectedScriptFor):
3000         * inspector/InjectedScriptHost.cpp:
3001         (WebCore::InjectedScriptHost::injectedScriptSource):
3002         * inspector/InjectedScriptHost.h:
3003         * inspector/Inspector.idl:
3004         * inspector/InspectorController.cpp:
3005         (WebCore::InspectorController::restoreInspectorStateFromCookie):
3006         * inspector/InspectorState.cpp:
3007         (WebCore::InspectorState::InspectorState):
3008         * inspector/InspectorState.h:
3009         * inspector/front-end/InjectedScript.js: Removed.
3010         * inspector/front-end/WebKit.qrc:
3011         * inspector/front-end/inspector.html:
3012         * inspector/front-end/inspector.js:
3013         (WebInspector.doLoadedDone.propertyNamesCallback):
3014         (WebInspector.doLoadedDone):
3015         * inspector/xxd.pl: Added.
3016
3017 2011-01-13  Mikhail Naganov  <mnaganov@chromium.org>
3018
3019         Reviewed by Timothy Hatcher.
3020
3021         Web Inspector: Cleanup after r75613 -- make all UI-facing strings
3022         to be passed directly to WebInspector.UIString
3023
3024         https://bugs.webkit.org/show_bug.cgi?id=52365
3025
3026         * English.lproj/localizedStrings.js:
3027         * inspector/front-end/ApplicationCacheItemsView.js:
3028         (WebInspector.ApplicationCacheItemsView.prototype._updateCallback):
3029         (WebInspector.ApplicationCacheItemsView.prototype._populateDataGrid):
3030         * inspector/front-end/AuditRules.js:
3031         (WebInspector.AuditRules.GzipRule.prototype.doRun):
3032         (WebInspector.AuditRules.CookieSizeRule.prototype.processCookies):
3033         (WebInspector.AuditRules.StaticCookielessRule.prototype.processCookies):
3034         * inspector/front-end/BreakpointsSidebarPane.js:
3035         (WebInspector.EventListenerBreakpointsSidebarPane):
3036         (WebInspector.EventListenerBreakpointsSidebarPane.prototype._createCategory):
3037         * inspector/front-end/CookieItemsView.js:
3038         (WebInspector.CookieItemsView.prototype._updateWithCookies):
3039         * inspector/front-end/ImageView.js:
3040         (WebInspector.ImageView.prototype._createContentIfNeeded.onImageLoad):
3041         (WebInspector.ImageView.prototype._createContentIfNeeded):
3042         * inspector/front-end/NetworkPanel.js:
3043         (WebInspector.NetworkTimeCalculator.prototype.formatValue):
3044         (WebInspector.NetworkTransferTimeCalculator.prototype.formatValue):
3045         (WebInspector.NetworkTransferDurationCalculator.prototype.formatValue):
3046         * inspector/front-end/ProfileDataGridTree.js:
3047         (WebInspector.ProfileDataGridNode.prototype.get data.formatMilliseconds):
3048         (WebInspector.ProfileDataGridNode.prototype.get data):
3049         * inspector/front-end/Resource.js:
3050         (WebInspector.Resource.Type.toUIString):
3051         (WebInspector.Resource.Type.toString):
3052         * inspector/front-end/TimelineOverviewPane.js:
3053         (WebInspector.TimelineOverviewCalculator.prototype.formatValue):
3054         * inspector/front-end/TimelinePanel.js:
3055         (WebInspector.TimelinePanel):
3056         (WebInspector.TimelineCalculator.prototype.formatValue):
3057         (WebInspector.TimelinePanel.FormattedRecord.prototype._generateAggregatedInfo):
3058         (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent):
3059         (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails):
3060         * inspector/front-end/utilities.js:
3061         ():
3062
3063 2011-01-13  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
3064
3065         Reviewed by Simon Hausmann.
3066
3067         [Qt] Need a way to inform the application when a Netscape plugin is created.
3068         https://bugs.webkit.org/show_bug.cgi?id=30179
3069
3070         Added "c" style static method for the application to hook up for
3071         receiving notifications when a plugin is created.
3072
3073         * plugins/symbian/PluginViewSymbian.cpp:
3074         (qtwebkit_setPluginCreatedCallback):
3075         (WebCore::PluginView::platformStart):
3076
3077 2011-01-13  Yi Shen  <yi.4.shen@nokia.com>
3078
3079         Reviewed by Eric Seidel.
3080
3081         [Qt] Use a black background color for the video element on Qt Mobile
3082         https://bugs.webkit.org/show_bug.cgi?id=52252
3083
3084         Use black as the background color for the video element on Qt Mobile.
3085
3086         * css/themeQtMobile.css:
3087         (video):
3088
3089 2011-01-13  Yi Shen  <yi.4.shen@nokia.com>
3090
3091         Reviewed by Eric Seidel.
3092
3093         [Qt] Use a big central media play control button for video element 
3094         https://bugs.webkit.org/show_bug.cgi?id=52315
3095
3096         When ChromeClient::requiresFullscreenForVideoPlayback() returns true,
3097         all other control buttons for the video element are hidden, except 
3098         a big centralized play button.
3099
3100         No new tests because no client implements requiresFullscreenForVideoPlayback yet.
3101
3102         * WebCore.pri:
3103         * css/mediaControlsQtFullscreen.css: Added.
3104         (audio):
3105         (audio::-webkit-media-controls-panel):
3106         (video::-webkit-media-controls-panel):
3107         (video:-webkit-full-page-media::-webkit-media-controls-panel):
3108         (audio::-webkit-media-controls-mute-button):
3109         (video::-webkit-media-controls-mute-button):
3110         (audio::-webkit-media-controls-play-button):
3111         (video::-webkit-media-controls-play-button):
3112         (audio::-webkit-media-controls-timeline-container):
3113         (video::-webkit-media-controls-timeline-container):
3114         (audio::-webkit-media-controls-current-time-display):
3115         (video::-webkit-media-controls-current-time-display):
3116         (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
3117         (audio::-webkit-media-controls-timeline):
3118         (video::-webkit-media-controls-timeline):
3119         (audio::-webkit-media-controls-volume-slider-container):
3120         (video::-webkit-media-controls-volume-slider-container):
3121         (audio::-webkit-media-controls-volume-slider):
3122         (video::-webkit-media-controls-volume-slider):
3123         (audio::-webkit-media-controls-seek-back-button, video::-webkit-media-controls-seek-back-button):
3124         (audio::-webkit-media-controls-seek-forward-button, video::-webkit-media-controls-seek-forward-button):
3125         (audio::-webkit-media-controls-fullscreen-button):
3126         (video::-webkit-media-controls-fullscreen-button):
3127         (audio::-webkit-media-controls-rewind-button, video::-webkit-media-controls-rewind-button):
3128         (audio::-webkit-media-controls-return-to-realtime-button, video::-webkit-media-controls-return-to-realtime-button):
3129         (audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):
3130         * platform/qt/RenderThemeQt.cpp:
3131         (WebCore::RenderThemeQt::extraMediaControlsStyleSheet):
3132
3133 2011-01-13  Carlos Garcia Campos  <cgarcia@igalia.com>
3134
3135         Reviewed by Xan Lopez.
3136
3137         [GTK] Paint toggle buttons inconsistent when the object state is indeterminate
3138         https://bugs.webkit.org/show_bug.cgi?id=52361
3139
3140         Check whether the object state is indeterminate to set the flag
3141         GTK_STATE_FLAG_INCONSISTENT before rendering check and radio
3142         buttons.
3143
3144         * platform/gtk/RenderThemeGtk3.cpp:
3145         (WebCore::paintToggle):
3146
3147 2011-01-13  Yi Shen  <yi.4.shen@nokia.com>
3148
3149         Reviewed by Simon Hausmann.
3150
3151         [Qt] Extend the Platform Plugin to support full screen video handler
3152         https://bugs.webkit.org/show_bug.cgi?id=51249
3153
3154         Make MediaPlayerPrivateQt support a fullscreen player.
3155
3156         No new tests because LayoutTests/media/media-fullscreen-inline.html already exists.
3157         However, this test failed for Qt (QtMediaPlayer) due to durationchange event getting fired twice.
3158         So, still skip it for Qt.
3159
3160         * WebCore.pro:
3161         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
3162         (WebCore::MediaPlayerPrivateQt::MediaPlayerPrivateQt):
3163         (WebCore::MediaPlayerPrivateQt::removeVideoItem):
3164         (WebCore::MediaPlayerPrivateQt::restoreVideoItem):
3165         * platform/graphics/qt/MediaPlayerPrivateQt.h:
3166         (WebCore::MediaPlayerPrivateQt::supportsFullscreen):
3167         (WebCore::MediaPlayerPrivateQt::mediaPlayer):
3168
3169 2011-01-13  Dan Bernstein  <mitz@apple.com>
3170
3171         Reviewed by Dave Hyatt.
3172
3173         <rdar://problem/8858548> Disable inheritance of text emphasis marks to ruby text
3174         https://bugs.webkit.org/show_bug.cgi?id=52359
3175
3176         Test: fast/ruby/text-emphasis.html
3177
3178         * css/html.css:
3179         (rt):
3180
3181 2011-01-13  Csaba Osztrogonác  <ossy@webkit.org>
3182
3183         Rubber-stamped by David Levin.
3184
3185         Trivial fix after r75682.
3186
3187         * loader/FrameLoader.cpp: Remove accidentally committed debug code.
3188         (WebCore::FrameLoader::shouldClose):
3189
3190 2011-01-12  Ryosuke Niwa  <rniwa@webkit.org>
3191
3192         Reviewed by Eric Seidel.
3193
3194         REGRESSION(r69831): focus() in onkeypress discards input (affects chaseonline.chase.com)
3195         https://bugs.webkit.org/show_bug.cgi?id=52241
3196
3197         The bug was caused by RenderTextControl::selection's creating a Range with m_insertText
3198         which is a shadow DOM div as both start and end containers. Fixed the bug by traversing
3199         through the descendents of m_innerText and using the right start and end containers to
3200         create a Range.
3201
3202         Test: fast/forms/focus-change-on-keypress.html
3203
3204         * rendering/RenderTextControl.cpp:
3205         (WebCore::setContainerAndOffsetForRange): Added; a helper function.
3206         (WebCore::RenderTextControl::selection): See above.
3207
3208 2011-01-12  Kenichi Ishibashi  <bashi@google.com>
3209
3210         Reviewed by Kent Tamura.
3211
3212         M_formElementsWithFormAttribute not cleared when FormAssociatedElement is inserted with a null m_form and then removed.
3213         https://bugs.webkit.org/show_bug.cgi?id=51905
3214
3215         Calls unregisterFormElementWithFormAttribute() when 'form' attribute
3216         is removed.
3217
3218         Tests: fast/forms/form-associated-element-crash.html
3219                fast/forms/form-associated-element-crash2.html
3220
3221         * html/FormAssociatedElement.cpp:
3222         (WebCore::FormAssociatedElement::formAttributeChanged):
3223
3224 2011-01-12  Kenichi Ishibashi  <bashi@google.com>
3225
3226         Reviewed by Kent Tamura.
3227
3228         M_formElementsWithFormAttribute not cleared when Node is moved to another document.
3229         https://bugs.webkit.org/show_bug.cgi?id=51418
3230
3231         Calls unregisterFormElementWithFormAttribute() when form associated elements
3232         are moved to another document.
3233
3234         Test: fast/forms/change-form-element-document-crash.html
3235
3236         * html/FormAssociatedElement.cpp:
3237         (WebCore::FormAssociatedElement::willMoveToNewOwnerDocument): Added.
3238         * html/FormAssociatedElement.h: Added willMoveToNewOwnerDocument().
3239         * html/HTMLFormControlElement.cpp:
3240         (WebCore::HTMLFormControlElement::willMoveToNewOwnerDocument): Added.
3241         * html/HTMLFormControlElement.h: Added willMoveToNewOwnerDocument().
3242         * html/HTMLObjectElement.cpp:
3243         (WebCore::HTMLObjectElement::willMoveToNewOwnerDocument): Added.
3244         * html/HTMLObjectElement.h: Added willMoveToNewOwnerDocument().
3245         * html/HTMLPlugInImageElement.h: Moves willMoveToNewOwnerDocument() to protected.
3246
3247 2011-01-12  Ryosuke Niwa  <rniwa@webkit.org>
3248
3249         Reviewed by Eric Seidel.
3250
3251         Stop instantiating legacy editing positions in ApplyBlockElementCommand and ApplyStyleCommand
3252         https://bugs.webkit.org/show_bug.cgi?id=52250
3253
3254         Removed instantiation of legacy editing positions.
3255         Calls to Position::Position are replaced by calls to Position's convenience functions.
3256
3257         Also added firstPositionInOrBeforeNode and lastPositionInOrAfterNode,
3258         which are functions that return firstPositionInNode and lastPositionInNode respectively
3259         when the specified node can have children for editing purpose and return positionBeforeNode
3260         and positionAfterNode respectively otherwise. They can be used to guarantee that we never
3261         create a bogus position like [img, 0] or [br, 0].
3262
3263         No tests are added since this is a cleanup.
3264
3265         * editing/ApplyBlockElementCommand.cpp:
3266         (WebCore::ApplyBlockElementCommand::formatSelection):
3267         * editing/ApplyStyleCommand.cpp:
3268         (WebCore::ApplyStyleCommand::applyBlockStyle):
3269         (WebCore::ApplyStyleCommand::fixRangeAndApplyInlineStyle):
3270         (WebCore::ApplyStyleCommand::highestAncestorWithConflictingInlineStyle):
3271         (WebCore::ApplyStyleCommand::removeInlineStyle):
3272         (WebCore::ApplyStyleCommand::nodeFullySelected):
3273         (WebCore::ApplyStyleCommand::nodeFullyUnselected):
3274         (WebCore::ApplyStyleCommand::splitTextAtStart):
3275         (WebCore::ApplyStyleCommand::splitTextAtEnd):
3276         (WebCore::ApplyStyleCommand::splitTextElementAtStart):
3277         (WebCore::ApplyStyleCommand::splitTextElementAtEnd):
3278         (WebCore::ApplyStyleCommand::isValidCaretPositionInTextNode):
3279         (WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
3280         (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
3281         (WebCore::ApplyStyleCommand::computedFontSize):
3282         (WebCore::ApplyStyleCommand::joinChildTextNodes):
3283         * editing/ApplyStyleCommand.h:
3284         * editing/htmlediting.h:
3285         (WebCore::firstPositionInOrBeforeNode): Added.
3286         (WebCore::lastPositionInOrAfterNode): Added.
3287
3288 2011-01-12  Sam Weinig  <sam@webkit.org>
3289
3290         Another build fix.
3291
3292         * platform/mac/WheelEventMac.mm:
3293         (WebCore::phaseForEvent):
3294
3295 2011-01-12  Sam Weinig  <sam@webkit.org>
3296
3297         Fix build.
3298
3299         * platform/mac/WheelEventMac.mm:
3300         (WebCore::phaseForEvent):
3301
3302 2011-01-12  Adam Barth  <abarth@webkit.org>
3303
3304         Reviewed by Darin Adler.
3305
3306         Remove premature optimization from SchemeRegistry
3307         https://bugs.webkit.org/show_bug.cgi?id=52283
3308
3309         As far as I can tell, this optimization isn't necessary.  I'm slightly
3310         unsure which benchmarks to run to demonstrate this numerically, but
3311         none of the benchmarks Chromium tracks were affected by adding a
3312         similar check for "display-isolated" schemes.
3313
3314         * platform/SchemeRegistry.cpp:
3315         (WebCore::SchemeRegistry::shouldTreatURLSchemeAsLocal):
3316
3317 2011-01-12  Beth Dakin  <bdakin@apple.com>
3318
3319         Reviewed by Anders Carlsson.
3320
3321         Add-on for https://bugs.webkit.org/show_bug.cgi?id=52309 
3322         Expose fixed layout through WebKit SPI
3323         -and corresponding-
3324         <rdar://problem/8844464>
3325
3326         And now with getters!
3327         * WebCore.exp.in:
3328
3329 2011-01-12  Sam Weinig  <sam@webkit.org>
3330
3331         Reviewed by Anders Carlsson.
3332
3333         https://bugs.webkit.org/show_bug.cgi?id=52337
3334         PlatformWheelEvent should know about the scroll phase on the Mac
3335
3336         Add a phase parameter on Mac PlatformWheelEvents.
3337
3338         * platform/PlatformWheelEvent.h:
3339         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
3340         (WebCore::PlatformWheelEvent::phase):
3341         * platform/mac/WheelEventMac.mm:
3342         (WebCore::phaseForEvent):
3343         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
3344
3345 2011-01-12  Chris Marrin  <cmarrin@apple.com>
3346
3347         Unreviewed.
3348
3349         A couple of lines of the patch for https://bugs.webkit.org/show_bug.cgi?id=52321
3350         were omitted. 
3351
3352         * platform/graphics/ca/GraphicsLayerCA.cpp:
3353         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
3354
3355 2011-01-12  Chris Marrin  <cmarrin@apple.com>
3356
3357         Unreviewed.
3358
3359         Getting rid of an assert that was causing build failures that turns out not to be needed.
3360
3361         * rendering/RenderLayer.cpp:
3362         (WebCore::RenderLayer::paintsWithTransform):
3363
3364 2011-01-12  Chris Marrin  <cmarrin@apple.com>
3365
3366         Unreviewed.
3367
3368         Another fix for Gtk
3369
3370         * rendering/RenderLayer.cpp:
3371         (WebCore::RenderLayer::paintsWithTransform):
3372
3373 2011-01-12  Chris Marrin  <cmarrin@apple.com>
3374
3375         Unreviewed.
3376
3377         Fix for Gtk and Windows builds
3378
3379         * page/Frame.cpp:
3380         (WebCore::Frame::scalePage):
3381         * page/Frame.h:
3382         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
3383         (PlatformCALayer::contentsScale):
3384         (PlatformCALayer::setContentsScale):
3385
3386 2011-01-12  Chris Marrin  <cmarrin@apple.com>
3387
3388         UNreviewed.
3389
3390         Fix for the Windows build
3391
3392         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
3393         (contentsScale):
3394         (setContentsScale):
3395
3396 2011-01-12  Chris Marrin  <cmarrin@apple.com>
3397
3398         Unreviewed.
3399
3400         Another build fix
3401
3402         * platform/graphics/ca/GraphicsLayerCA.cpp:
3403         (WebCore::GraphicsLayerCA::clampedContentsScaleForScale):
3404         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3405         (PlatformCALayer::setContentsScale):
3406
3407 2011-01-11  Matthew Delaney  <mdelaney@apple.com>
3408
3409         Reviewed by Simon Fraser.
3410
3411         Max area bound needed in creation of IOSurface in ImageBufferCG.cpp
3412         https://bugs.webkit.org/show_bug.cgi?id=52172
3413
3414         Tests: fast/canvas/canvas-large-dimensions.html
3415
3416         * platform/graphics/cg/ImageBufferCG.cpp:
3417         (WebCore::ImageBuffer::ImageBuffer):
3418
3419 2011-01-12  Daniel Bates  <dbates@rim.com>
3420             And Benjamin C Meyer  <bmeyer@rim.com>
3421
3422         Build fix when building with Inspector disabled
3423         https://bugs.webkit.org/show_bug.cgi?id=52313
3424
3425         After changeset 75604 <http://trac.webkit.org/changeset/75604> it's not
3426         possible to build when the Inspector is disabled.
3427
3428         * inspector/InspectorInstrumentation.h:
3429         (WebCore::InspectorInstrumentation::updateApplicationCacheStatus): Fix build breakage when building
3430         with Inspector disabled and Offline Web Applications enabled by moving macro guard condition
3431         ENABLE(INSPECTOR) && ENABLE(OFFLINE_WEB_APPLICATIONS) into function body. This makes us also
3432         consistent with the form we use for InspectorInstrumentation::networkStateChanged() and other
3433         InspectorInstrumentation functions.
3434         * loader/appcache/ApplicationCacheGroup.cpp:
3435         (WebCore::ApplicationCacheGroup::didReceiveData): Fix build breakage when building with Inspector
3436         disabled by adding ENABLE(INSPECTOR) guard around code that references the instance variable
3437         ApplicationCacheGroup::m_currentResourceIdentifier as this variable only exists when building
3438         with the Inspector.
3439         (WebCore::ApplicationCacheGroup::didFinishLoading): Ditto.
3440         (WebCore::ApplicationCacheGroup::didFail): Ditto.
3441
3442 2011-01-12  Chris Marrin  <cmarrin@apple.com>
3443
3444         Unreviewed.
3445
3446         Fix a build issue from http://trac.webkit.org/changeset/75639.
3447
3448         * platform/graphics/GraphicsLayer.h:
3449         (WebCore::GraphicsLayer::contentsScale):
3450         (WebCore::GraphicsLayer::setContentsScale):
3451
3452 2011-01-12  Chris Marrin  <cmarrin@apple.com>
3453
3454         Reviewed by Kevin Decker.
3455
3456         Pages with accelerated layers lose subpixel-AA and become blurry when a scale factor is applied
3457         rdar://problem/8824974
3458
3459         This prevents the rootLayer (with the WebKit rendered content) from going becoming
3460         a tiled layer when zoomed, and when there is other layered content on the page.
3461         This speeds up zooming a lot and avoids some buggy behavior in CA with a very large
3462         number of layers.
3463         
3464         * rendering/RenderLayer.cpp:
3465         (WebCore::RenderLayer::paintsWithTransform):
3466         * rendering/RenderLayer.h:
3467         * rendering/RenderLayerBacking.cpp:
3468         (WebCore::RenderLayerBacking::paintingGoesToWindow):
3469
3470 201