2011-01-27 Yury Semikhatsky <yurys@chromium.org>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-01-27  Yury Semikhatsky  <yurys@chromium.org>
2
3         Reviewed by Pavel Feldman.
4
5         [V8] Crash in WebCore::addMessageToConsole
6         https://bugs.webkit.org/show_bug.cgi?id=53227
7
8         * bindings/v8/V8Proxy.cpp: check that the Frame where the error
9         occured still has a page before getting a console object from it.
10         (WebCore::V8Proxy::reportUnsafeAccessTo):
11
12 2011-01-27  Hans Wennborg  <hans@chromium.org>
13
14         Reviewed by Jeremy Orlow.
15
16         IndexedDB: Remove IDBCallbacks::onSuccess() used for null values.
17         https://bugs.webkit.org/show_bug.cgi?id=53178
18
19         Remove the IDBCallbacks::onSuccess() function that was used for
20         null values, and replace such calls with calls to
21         IDBCallBacks::onSuccess(SerializedScriptValue::nullValue())
22         instead.
23
24         No new functionality, so no new tests.
25
26         * storage/IDBCallbacks.h:
27         * storage/IDBCursorBackendImpl.cpp:
28         (WebCore::IDBCursorBackendImpl::updateInternal):
29         (WebCore::IDBCursorBackendImpl::continueFunctionInternal):
30         * storage/IDBIndexBackendImpl.cpp:
31         (WebCore::IDBIndexBackendImpl::openCursorInternal):
32         * storage/IDBObjectStoreBackendImpl.cpp:
33         (WebCore::IDBObjectStoreBackendImpl::deleteInternal):
34         (WebCore::IDBObjectStoreBackendImpl::openCursorInternal):
35         * storage/IDBRequest.cpp:
36         * storage/IDBRequest.h:
37
38 2011-01-27  Sheriff Bot  <webkit.review.bot@gmail.com>
39
40         Unreviewed, rolling out r76773.
41         http://trac.webkit.org/changeset/76773
42         https://bugs.webkit.org/show_bug.cgi?id=53230
43
44         breaks multiple GTK media tests (Requested by philn-tp on
45         #webkit).
46
47         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
48         (WebCore::mimeTypeCache):
49
50 2011-01-27  Sheriff Bot  <webkit.review.bot@gmail.com>
51
52         Unreviewed, rolling out r76770.
53         http://trac.webkit.org/changeset/76770
54         https://bugs.webkit.org/show_bug.cgi?id=53229
55
56         Some inspector tests fail (Requested by yurys on #webkit).
57
58         * CMakeLists.txt:
59         * GNUmakefile.am:
60         * WebCore.exp.in:
61         * WebCore.gypi:
62         * WebCore.pro:
63         * WebCore.vcproj/WebCore.vcproj:
64         * WebCore.xcodeproj/project.pbxproj:
65         * bindings/js/ScriptDebugServer.cpp:
66         (WebCore::ScriptDebugServer::isDebuggerAlwaysEnabled):
67         * bindings/js/ScriptDebugServer.h:
68         * bindings/js/ScriptProfiler.cpp:
69         (WebCore::ScriptProfiler::isProfilerAlwaysEnabled):
70         * bindings/js/ScriptProfiler.h:
71         * bindings/v8/ScriptDebugServer.cpp:
72         (WebCore::ScriptDebugServer::isDebuggerAlwaysEnabled):
73         * bindings/v8/ScriptDebugServer.h:
74         * bindings/v8/ScriptProfiler.cpp:
75         (WebCore::ScriptProfiler::isProfilerAlwaysEnabled):
76         * bindings/v8/ScriptProfiler.h:
77         * inspector/Inspector.idl:
78         * inspector/InspectorAgent.cpp:
79         (WebCore::InspectorAgent::InspectorAgent):
80         (WebCore::InspectorAgent::disconnectFrontend):
81         (WebCore::InspectorAgent::restoreDebugger):
82         (WebCore::InspectorAgent::restoreProfiler):
83         (WebCore::InspectorAgent::ensureSettingsLoaded):
84         (WebCore::InspectorAgent::enableProfiler):
85         (WebCore::InspectorAgent::disableProfiler):
86         (WebCore::InspectorAgent::showAndEnableDebugger):
87         (WebCore::InspectorAgent::enableDebugger):
88         (WebCore::InspectorAgent::disableDebugger):
89         * inspector/InspectorAgent.h:
90         (WebCore::InspectorAgent::settings):
91         * inspector/InspectorConsoleAgent.cpp:
92         (WebCore::InspectorConsoleAgent::setMonitoringXHREnabled):
93         (WebCore::InspectorConsoleAgent::setConsoleMessagesEnabled):
94         * inspector/InspectorDebuggerAgent.cpp:
95         (WebCore::InspectorDebuggerAgent::isDebuggerAlwaysEnabled):
96         * inspector/InspectorDebuggerAgent.h:
97         * inspector/InspectorInstrumentation.cpp:
98         (WebCore::InspectorInstrumentation::identifierForInitialRequestImpl):
99         (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
100         * inspector/InspectorProfilerAgent.cpp:
101         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
102         (WebCore::InspectorProfilerAgent::startUserInitiatedProfiling):
103         * inspector/InspectorSettings.cpp: Added.
104         (WebCore::InspectorSettings::InspectorSettings):
105         (WebCore::InspectorSettings::getBoolean):
106         (WebCore::InspectorSettings::setBoolean):
107         (WebCore::InspectorSettings::getLong):
108         (WebCore::InspectorSettings::setLong):
109         (WebCore::InspectorSettings::registerBoolean):
110         (WebCore::InspectorSettings::registerLong):
111         * inspector/InspectorSettings.h: Copied from Source/WebCore/bindings/v8/ScriptProfiler.h.
112         * inspector/InspectorState.cpp:
113         (WebCore::InspectorState::InspectorState):
114         * inspector/InspectorState.h:
115         * inspector/front-end/ConsoleView.js:
116         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.monitoringXHRStateChanged):
117         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher):
118         (WebInspector.ConsoleView.prototype._handleContextMenuEvent):
119         * inspector/front-end/ProfilesPanel.js:
120         (WebInspector.ProfilesPanel.prototype._toggleProfiling):
121         * inspector/front-end/ScriptsPanel.js:
122         (WebInspector.ScriptsPanel.prototype._toggleDebugging):
123         * inspector/front-end/Settings.js:
124         (WebInspector.Settings):
125         * inspector/front-end/inspector.js:
126
127 2011-01-26  Philippe Normand  <pnormand@igalia.com>
128
129         Reviewed by Martin Robinson.
130
131         [GTK] LayoutTests/media/audio-mpeg4-supported.html fails
132         https://bugs.webkit.org/show_bug.cgi?id=53125
133
134         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
135         (WebCore::mimeTypeCache): Add audio/x-m4a mimetype in the cache.
136
137 2011-01-26  Yury Semikhatsky  <yurys@chromium.org>
138
139         Reviewed by Pavel Feldman.
140
141         Web Inspector: store all settings related to the agents on the frontend side
142         https://bugs.webkit.org/show_bug.cgi?id=53174
143
144         * CMakeLists.txt:
145         * GNUmakefile.am:
146         * WebCore.exp.in:
147         * WebCore.gypi:
148         * WebCore.pro:
149         * WebCore.vcproj/WebCore.vcproj:
150         * WebCore.xcodeproj/project.pbxproj:
151         * inspector/Inspector.idl:
152         * inspector/InspectorAgent.cpp: profiler and debugger enablement state is now stored
153         on the front-end side and will be pushed to the backend when the frontend is loaded.
154         (WebCore::InspectorAgent::InspectorAgent):
155         (WebCore::InspectorAgent::disconnectFrontend):
156         (WebCore::InspectorAgent::restoreDebugger):
157         (WebCore::InspectorAgent::restoreProfiler):
158         (WebCore::InspectorAgent::enableProfiler):
159         (WebCore::InspectorAgent::disableProfiler):
160         (WebCore::InspectorAgent::showAndEnableDebugger):
161         (WebCore::InspectorAgent::enableDebugger):
162         (WebCore::InspectorAgent::disableDebugger):
163         * inspector/InspectorAgent.h:
164         * inspector/InspectorConsoleAgent.cpp: XHR failures will be logged to the console only
165         if the front-end was opened during current browser session and XHR logging is turned on
166         there.
167         (WebCore::InspectorConsoleAgent::setMonitoringXHREnabled):
168         (WebCore::InspectorConsoleAgent::setConsoleMessagesEnabled):
169         * inspector/InspectorInstrumentation.cpp:
170         (WebCore::InspectorInstrumentation::identifierForInitialRequestImpl):
171         (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
172         * inspector/InspectorProfilerAgent.cpp:
173         (WebCore::InspectorProfilerAgent::enable):
174         (WebCore::InspectorProfilerAgent::startUserInitiatedProfiling):
175         * inspector/InspectorProfilerAgent.h:
176         * inspector/InspectorSettings.cpp: Removed.
177         * inspector/InspectorSettings.h: Removed.
178         * inspector/InspectorState.cpp:
179         (WebCore::InspectorState::InspectorState):
180         * inspector/InspectorState.h:
181         * inspector/front-end/ConsoleView.js:
182         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.consoleMessagesCleared):
183         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher):
184         (WebInspector.ConsoleView.prototype._handleContextMenuEvent.itemAction):
185         (WebInspector.ConsoleView.prototype._handleContextMenuEvent):
186         * inspector/front-end/ProfilesPanel.js:
187         (WebInspector.ProfilesPanel.prototype._toggleProfiling):
188         * inspector/front-end/ScriptsPanel.js:
189         (WebInspector.ScriptsPanel.prototype._toggleDebugging):
190         * inspector/front-end/Settings.js:
191         (WebInspector.Settings):
192         * inspector/front-end/inspector.js:
193
194 2011-01-27  Dan Bernstein  <mitz@apple.com>
195
196         Reviewed by Sam Weinig.
197
198         REGRESSION (r76743): Uneven spacing in right-to-left justified text
199         https://bugs.webkit.org/show_bug.cgi?id=53225
200
201         Fixes failure in fast/text/atsui-spacing-features.html
202
203         There was an inconsistency between rendering code and font code in the interpretation of
204         'after expansion' and 'trailing expansion'. Changed all code to interpret these in terms of
205         visual order rather than logical.
206
207         * platform/graphics/Font.cpp:
208         (WebCore::Font::expansionOpportunityCount): Added a text direction parameter and changed to
209         iterate in visual order accordingly.
210         * platform/graphics/Font.h:
211         * platform/graphics/WidthIterator.cpp:
212         (WebCore::WidthIterator::WidthIterator): Pass the run direction to expansionOpportunityCount().
213         (WebCore::WidthIterator::advance): For right-to-left runs, evaluate the trailing expansion
214         condition with respect to the first character, which is the trailing character in visual order.
215         * platform/graphics/mac/ComplexTextController.cpp:
216         (WebCore::ComplexTextController::ComplexTextController): Pass the run direction to
217         expansionOpportunityCount().
218         * rendering/RenderBlockLineLayout.cpp:
219         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Ditto.
220
221 2011-01-26  Adam Roben  <aroben@apple.com>
222
223         Don't create the Direct3D device before it's first needed
224
225         We only need the device once we decide to render. There's no point in creating it before
226         then.
227
228         Reviewed by Sam Weinig.
229
230         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
231         (WebCore::CACFLayerTreeHost::setWindow): Removed the call to createRenderer() from here.
232         We already have code to create it when we first try to draw.
233         (WebCore::CACFLayerTreeHost::createRenderer): Flush the context after we set our layer's
234         bounds so that the bounds will take effect the next time we render (which could be just
235         after this function returns).
236
237 2011-01-26  Adam Roben  <aroben@apple.com>
238
239         Add assertions that CACFLayerTreeHost gains and loses an HWND only once
240
241         CACFLayerTreeHost doesn't support any other use pattern.
242
243         Reviewed by Sam Weinig.
244
245         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
246         (WebCore::CACFLayerTreeHost::CACFLayerTreeHost): Initialize new member.
247         (WebCore::CACFLayerTreeHost::setWindow): Assert that we transition from not having a window,
248         to having a window, to not having a window just once over the lifetime of this object.
249
250         * platform/graphics/ca/win/CACFLayerTreeHost.h: Added m_state.
251
252 2011-01-26  Adam Roben  <aroben@apple.com>
253
254         Notify layers that their animations have started when we flush the context, not when we
255         render
256
257         r76372 separated context flushing from rendering, but this bit of code got left behind.
258
259         Reviewed by Sam Weinig.
260
261         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
262         (WebCore::CACFLayerTreeHost::render): Moved code to notify the layers from here to
263         notifyAnimationsStarted.
264         (WebCore::CACFLayerTreeHost::flushPendingLayerChangesNow): Added a call to
265         notifyAnimationsStarted after we flush the context.
266         (WebCore::CACFLayerTreeHost::notifyAnimationsStarted): Added. Code came from render. Changed
267         to call PlatformCALayer::animationStarted rather than calling through to the client
268         directly.
269
270         * platform/graphics/ca/win/CACFLayerTreeHost.h: Added notifyAniamtionsStarted.
271
272 2011-01-26  Adam Roben  <aroben@apple.com>
273
274         Small cleanup in MediaPlayerPrivateFullscreenWindow
275
276         Reviewed by Sam Weinig.
277
278         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
279         (WebCore::MediaPlayerPrivateFullscreenWindow::~MediaPlayerPrivateFullscreenWindow): Moved
280         code here from close(), since this was the only place that called it after the following
281         change to createWindow.
282         (WebCore::MediaPlayerPrivateFullscreenWindow::createWindow): Replaced code that handled the
283         case where we had already created the window with an assertion that we have not already done
284         so. Our single caller (FullscreenVideoController) did not require this behavior.
285
286         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h: Removed layerView.
287
288 2011-01-26  Sam Weinig  <sam@webkit.org>
289
290         Reviewed by Adam Roben.
291
292         Move ScrollView scroll wheel code to ScrollAnimator.
293
294         * platform/ScrollAnimator.cpp:
295         (WebCore::ScrollAnimator::handleWheelEvent):
296         * platform/ScrollAnimator.h:
297         Moved implementation of handleWheelEvent from ScrollView::wheelEvent.
298
299         * platform/ScrollView.cpp:
300         (WebCore::ScrollView::wheelEvent):
301         Call down to the ScrollableArea.
302
303         * platform/ScrollableArea.cpp:
304         (WebCore::ScrollableArea::handleWheelEvent):
305         Call down to the ScrollAnimator.
306
307         * platform/ScrollableArea.h:
308         (WebCore::ScrollableArea::scrollPosition):
309         (WebCore::ScrollableArea::minimumScrollPosition):
310         (WebCore::ScrollableArea::maximumScrollPosition):
311         (WebCore::ScrollableArea::visibleContentRect):
312         (WebCore::ScrollableArea::visibleHeight):
313         (WebCore::ScrollableArea::visibleWidth):
314         Add functions needed to implement wheel event in the animator.
315
316 2011-01-26  David Kilzer  <ddkilzer@apple.com>
317
318         <http://webkit.org/b/53192> Add experimental support for HTTP pipelining in CFNetwork
319         <rdar://problem/8821760>
320
321         Reviewed by Antti Koivisto.
322
323         This adds support for HTTP pipelining in CFNetwork, but does not
324         enable it.  To enable it post-SnowLeopard, use this command:
325
326             defaults write BUNDLE.ID WebKitEnableHTTPPipelining -bool YES
327
328         Once enabled, it is possible to force the same load priority
329         (high) to be sent to CFNetwork to allow WebCore to handle the
330         scheduling:
331
332             defaults write BUNDLE.ID WebKitForceHTTPPipeliningPriorityHigh -bool YES
333
334         * WebCore.exp.in: Export _wkGetHTTPPipeliningPriority and
335         _wkSetHTTPPipeliningPriority.
336
337         * loader/DocumentThreadableLoader.cpp:
338         (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequestWithPreflight):
339         Copy the priority to preflightRequest.
340
341         * loader/ResourceLoadScheduler.cpp:
342         (WebCore::ResourceLoadScheduler::scheduleLoad): Refactored code
343         at the end of the method to use an early return.
344
345         * loader/cache/CachedResourceRequest.cpp:
346         (WebCore::CachedResourceRequest::load): Set the priority on the
347         ResourceRequest object based on the priority of the
348         CachedResourceRequest before calling
349         ResourceLoadScheduler::scheduleSubresourceLoad().
350
351         * loader/icon/IconLoader.cpp:
352         (WebCore::IconLoader::startLoading): Create a ResourceRequest
353         object and set its priority to ResourceLoadPriorityLow before
354         passing it to ResourceLoadScheduler::scheduleSubresourceLoad().
355
356         * platform/mac/WebCoreSystemInterface.h:
357         (wkGetHTTPPipeliningPriority): Added.
358         (wkSetHTTPPipeliningPriority): Added.
359         * platform/mac/WebCoreSystemInterface.mm:
360         (wkGetHTTPPipeliningPriority): Added.
361         (wkSetHTTPPipeliningPriority): Added.
362
363         * platform/network/ResourceRequestBase.cpp:
364         (WebCore::ResourceRequestBase::adopt): Set m_priority when
365         adopting a CrossThreadResourceRequestData.
366         (WebCore::ResourceRequestBase::copyData): Set m_priority when
367         creating a CrossThreadResourceRequestData.
368         (WebCore::ResourceRequestBase::priority): Added.
369         (WebCore::ResourceRequestBase::setPriority): Added.
370         (WebCore::equalIgnoringHeaderFields): Priorities must match when
371         comparing two ResourceRequest objects.
372
373         * platform/network/ResourceRequestBase.h:
374         (WebCore::ResourceRequestBase::ResourceRequestBase): Set default
375         priority of new objects to ResourceLoadPriorityLow.
376         (WebCore::ResourceRequestBase::priority): Added declaration.
377         (WebCore::ResourceRequestBase::setPriority): Added declaration.
378         (WebCore::isHTTPPipeliningEnabled): Added.
379         (WebCore::shouldUseHTTPPipeliningPriority): Added.
380
381         * platform/network/cf/ResourceRequestCFNet.cpp: Updated so that
382         Mac OS X and Windows share code.
383         (WebCore::initializeMaximumHTTPConnectionCountPerHost): Always
384         set the HTTP connection count per host, but return an
385         'unlimited' value when using HTTP pipelining.  This method used
386         to be defined in ResourceRequestMac.mm for Mac OS X.
387         (WebCore::readBooleanPreference): Added.  Helper method for
388         reading boolean user defaults.
389         (WebCore::isHTTPPipeliningEnabled): Returns value of user
390         default key WebKitEnableHTTPPipelining, or false if not set.
391         (WebCore::shouldUseHTTPPipeliningPriority): Returns value of
392         user default key WebKitForceHTTPPipeliningPriorityHigh, or false
393         if not set.
394         * platform/network/cf/ResourceRequestCFNet.h: Updated so that
395         Mac OS X and Windows share code.  Fixed indentation.
396         (WebCore::mapHTTPPipeliningPriorityToResourceLoadPriority): Added.
397         (WebCore::mapResourceLoadPriorityToHTTPPipeliningPriority): Added.
398
399         * platform/network/mac/ResourceRequestMac.mm:
400         (WebCore::ResourceRequest::doUpdatePlatformRequest): Update
401         HTTP pipelining priority on NSMutableFURLRequest object.
402         (WebCore::ResourceRequest::doUpdateResourceRequest): Update
403         m_priority from the NSURLRequest object.
404         (WebCore::initializeMaximumHTTPConnectionCountPerHost): Removed.
405         Code is now shared with Windows in ResourceRequestCFNet.cpp.
406
407 2011-01-26  Beth Dakin  <bdakin@apple.com>
408
409         Reviewed by Darin Adler.
410
411         Fix for <rdar://problem/8895140> Adopt WKScrollbar metrics 
412         when using WKScrollbars.
413
414         New WebKitSystemInterface Functionality.
415         * WebCore.exp.in:
416         * platform/mac/WebCoreSystemInterface.h:
417         * platform/mac/WebCoreSystemInterface.mm:
418
419         Some of the terrible static arrays are now only needed in the 
420         old non-WK code, so they are if-def'd now.
421         * platform/mac/ScrollbarThemeMac.mm:
422         
423         Just patching this function in a better way than I did
424         before.
425         (WebCore::updateArrowPlacement):
426         
427         Call into WK for the right values.
428         (WebCore::ScrollbarThemeMac::scrollbarThickness):
429         (WebCore::ScrollbarThemeMac::hasThumb):
430         (WebCore::ScrollbarThemeMac::minimumThumbLength):
431         
432         Return false if there are no buttons.
433         (WebCore::ScrollbarThemeMac::hasButtons):
434
435         Return an empty IntRect if there are not buttons.
436         (WebCore::buttonRepaintRect):
437
438 2011-01-26  Sam Weinig  <sam@webkit.org>
439
440         Reviewed by Maciej Stachowiak.
441
442         Add events to represent the start/end of a gesture scroll
443         https://bugs.webkit.org/show_bug.cgi?id=53215
444
445         * WebCore.exp.in: 
446         Add new file.
447
448         * WebCore.xcodeproj/project.pbxproj:
449         Add new file.
450
451         * page/EventHandler.cpp:
452         (WebCore::EventHandler::handleGestureEvent):
453         * page/EventHandler.h:
454         Add entry point for handling gesture events.
455
456         * platform/PlatformGestureEvent.h: Added.
457         (WebCore::PlatformGestureEvent::PlatformGestureEvent):
458         (WebCore::PlatformGestureEvent::type):
459         (WebCore::PlatformGestureEvent::position):
460         (WebCore::PlatformGestureEvent::globalPosition):
461         (WebCore::PlatformGestureEvent::timestamp):
462         Add platform agnostic representation of a gesture event.
463
464 2011-01-26  Dan Bernstein  <mitz@apple.com>
465
466         Reviewed by Dave Hyatt.
467
468         <rdar://problem/8446709> Allow inter-ideograph justification for CJK
469         https://bugs.webkit.org/show_bug.cgi?id=53184
470
471         Tests: fast/text/justify-ideograph-complex.html
472                fast/text/justify-ideograph-simple.html
473                fast/text/justify-ideograph-vertical.html
474
475         * html/canvas/CanvasRenderingContext2D.cpp:
476         (WebCore::CanvasRenderingContext2D::drawTextInternal): Corrected the type of the third parameter
477         passed to the TextRun constructor and added the trailingExpansionBehavior parameter.
478         * platform/graphics/Font.cpp:
479         (WebCore::Font::expansionOpportunityCount): Added. Returns the number of expansion opportunities
480         for text justification. On entry, isAfterExpansion says whether an expansion opportunity exists
481         before the first character. On return, isAfterExpansion says whether an expansion opportunity
482         exists after the last character.
483         * platform/graphics/Font.h: 
484         * platform/graphics/GlyphBuffer.h:
485         (WebCore::GlyphBuffer::expandLastAdvance): Added.
486         * platform/graphics/TextRun.h:
487         (WebCore::TextRun::TextRun): Added a TrailingExpansionBehavior parameter to the constructors.
488         Renamed padding to expansion.
489         (WebCore::TextRun::expansion): Renamed padding() to this.
490         (WebCore::TextRun::allowsTrailingExpansion): Added this accessor.
491         * platform/graphics/WidthIterator.cpp:
492         (WebCore::WidthIterator::WidthIterator): Initialize m_isAfterExpansion. Use Font::expansionOpportunityCount()
493         and adjust the count if it includes a trailing expansion opportunity but the run disallows trailing
494         expansion.
495         (WebCore::WidthIterator::advance): Apply expansion before and after CJK ideographs.
496         (WebCore::WidthIterator::advanceOneCharacter): Changed to not clear the GlyphBuffer so that advance()
497         can expand the last advance if it is followed by a CJK ideograph.
498         * platform/graphics/WidthIterator.h: Renamed m_padding to m_expansion and m_padPerSpace
499         to m_expansionPerOpportunity.
500         * platform/graphics/chromium/FontChromiumWin.cpp:
501         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
502         * platform/graphics/chromium/FontLinux.cpp:
503         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
504         * platform/graphics/efl/FontEfl.cpp:
505         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
506         * platform/graphics/gtk/FontGtk.cpp:
507         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
508         * platform/graphics/haiku/FontHaiku.cpp:
509         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
510         * platform/graphics/mac/ComplexTextController.cpp:
511         (WebCore::ComplexTextController::ComplexTextController): Initialize m_isAfterExpansion. Use
512         Font::expansionOpportunityCount() and adjust the count if it includes a trailing expansion
513         opportunity but the run disallows trailing expansion.
514         (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Moved the definition and initialization
515         of hasExtraSpacing outside the loop. Apply expansion before and after CJK ideographs.
516         * platform/graphics/mac/ComplexTextController.h: Renamed m_padding to m_expansion and m_padPerSpace
517         to m_expansionPerOpportunity.
518         * platform/graphics/mac/FontMac.mm:
519         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
520         * platform/graphics/qt/FontQt.cpp:
521         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
522         * platform/graphics/win/FontWin.cpp:
523         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
524         * platform/graphics/win/UniscribeController.cpp:
525         (WebCore::UniscribeController::UniscribeController): Updated for rename.
526         * platform/graphics/wince/FontWinCE.cpp:
527         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
528         * platform/graphics/wx/FontWx.cpp:
529         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
530         * rendering/EllipsisBox.cpp:
531         (WebCore::EllipsisBox::paint): Pass a TrailingExpansionBehavior to the TextRun constructor.
532         (WebCore::EllipsisBox::selectionRect): Ditto.
533         (WebCore::EllipsisBox::paintSelection): Ditto.
534         * rendering/InlineBox.h:
535         (WebCore::InlineBox::InlineBox): Renamed m_toAdd to m_expansion.
536         (WebCore::InlineBox::expansion): Renamed toAdd() to this.
537         * rendering/InlineTextBox.cpp:
538         (WebCore::InlineTextBox::selectionRect): Pass a TrailingExpansionBehavior to the TextRun constructor.
539         (WebCore::InlineTextBox::paint): Ditto.
540         (WebCore::InlineTextBox::paintSelection): Ditto.
541         (WebCore::InlineTextBox::paintCompositionBackground): Ditto.
542         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker): Ditto.
543         (WebCore::InlineTextBox::paintTextMatchMarker): Ditto.
544         (WebCore::InlineTextBox::computeRectForReplacementMarker): Ditto.
545         (WebCore::InlineTextBox::offsetForPosition): Ditto.
546         (WebCore::InlineTextBox::positionForOffset): Ditto.
547         * rendering/InlineTextBox.h:
548         (WebCore::InlineTextBox::setExpansion): Renamed setSpaceAdd() to this.
549         (WebCore::InlineTextBox::trailingExpansionBehavior): Added. Trailing expansion is allowed if this
550         is not the last leaf box on the line.
551         * rendering/RenderBlockLineLayout.cpp:
552         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Keep expansion opportunity counts
553         in a vector instead of computing them twice. Discard the trailing expansion opportunity in the
554         last text box.
555         * rendering/RenderFileUploadControl.cpp:
556         (WebCore::RenderFileUploadControl::paintObject): Pass a TrailingExpansionBehavior to the TextRun constructor.
557         (WebCore::RenderFileUploadControl::computePreferredLogicalWidths): Ditto.
558         * rendering/RenderListBox.cpp:
559         (WebCore::RenderListBox::updateFromElement): Ditto.
560         (WebCore::RenderListBox::paintItemForeground): Ditto. Also corrected the type of the second parameter.
561         * rendering/RenderTextControl.cpp:
562         (WebCore::RenderTextControl::getAvgCharWidth): Ditto.
563         (WebCore::RenderTextControl::paintPlaceholder): Ditto.
564         * rendering/svg/SVGInlineTextBox.cpp:
565         (WebCore::SVGInlineTextBox::constructTextRun): Ditto.
566
567 2011-01-26  Andy Estes  <aestes@apple.com>
568
569         Rubber-stamped by Darin Adler.
570
571         Inline HTMLObjectElement::hasValidClassId().
572
573         * html/HTMLObjectElement.cpp:
574         (WebCore::HTMLObjectElement::hasValidClassId):
575
576 2011-01-26  Evan Martin  <evan@chromium.org>
577
578         Reviewed by Tony Chang.
579
580         [chromium] crash on getBoundingClientRect in complex text
581         https://bugs.webkit.org/show_bug.cgi?id=53199
582
583         Use the correct array bound; we want the number of characters processed by
584         the shaper, not the longest continuous script run length.
585
586         Test: platform/chromium-linux/fast/text/international/complex-text-rectangle.html
587
588         * platform/graphics/chromium/ComplexTextControllerLinux.cpp:
589         (WebCore::ComplexTextController::nextScriptRun):
590         * platform/graphics/chromium/ComplexTextControllerLinux.h:
591         (WebCore::ComplexTextController::numCodePoints):
592
593 2011-01-26  Emil A Eklund  <eae@chromium.org>
594
595         Reviewed by Alexey Proskuryakov.
596
597         Remove cached document reference from CSSStyleSheet and XSLStyleSheet.
598         https://bugs.webkit.org/show_bug.cgi?id=52084
599
600         Test: fast/dom/css-delete-doc.html
601
602         * css/CSSMediaRule.cpp:
603         (WebCore::CSSMediaRule::insertRule):
604         (WebCore::CSSMediaRule::deleteRule):
605         * css/CSSStyleSheet.cpp:
606         (WebCore::CSSStyleSheet::CSSStyleSheet):
607         (WebCore::CSSStyleSheet::document):
608         * css/CSSStyleSheet.h:
609         * xml/XSLStyleSheet.h:
610         (WebCore::XSLStyleSheet::parentStyleSheet):
611         * xml/XSLStyleSheetLibxslt.cpp:
612         (WebCore::XSLStyleSheet::XSLStyleSheet):
613         (WebCore::XSLStyleSheet::cachedResourceLoader):
614         (WebCore::XSLStyleSheet::setParentStyleSheet):
615         (WebCore::XSLStyleSheet::ownerDocument):
616         * xml/XSLStyleSheetQt.cpp:
617         (WebCore::XSLStyleSheet::XSLStyleSheet):
618         (WebCore::XSLStyleSheet::cachedResourceLoader):
619         (WebCore::XSLStyleSheet::ownerDocument):
620
621 2011-01-25  Dimitri Glazkov  <dglazkov@chromium.org>
622
623         Reviewed by Kent Tamura.
624
625         Reduce ref-count churn in shadowPseudoId.
626         https://bugs.webkit.org/show_bug.cgi?id=53136
627
628         Refactoring, so no new tests.
629
630         * dom/Element.h:
631         (WebCore::Element::shadowPseudoId): Changed signature to use const AtomicString&
632         * html/ValidationMessage.cpp:
633         (WebCore::ElementWithPseudoId::shadowPseudoId): Ditto.
634         * html/shadow/SliderThumbElement.cpp:
635         (WebCore::SliderThumbElement::shadowPseudoId): Ditto, plus moved from the header file.
636         * html/shadow/SliderThumbElement.h: Ditto.
637         * rendering/MediaControlElements.cpp:
638         (WebCore::MediaControlMuteButtonElement::shadowPseudoId): Ditto.
639         (WebCore::MediaControlVolumeSliderMuteButtonElement::shadowPseudoId): Ditto.
640         (WebCore::MediaControlPlayButtonElement::shadowPseudoId): Ditto.
641         (WebCore::MediaControlSeekForwardButtonElement::shadowPseudoId): Ditto.
642         (WebCore::MediaControlSeekBackButtonElement::shadowPseudoId): Ditto.
643         (WebCore::MediaControlRewindButtonElement::shadowPseudoId): Ditto.
644         (WebCore::MediaControlReturnToRealtimeButtonElement::shadowPseudoId): Ditto.
645         (WebCore::MediaControlToggleClosedCaptionsButtonElement::shadowPseudoId): Ditto.
646         (WebCore::MediaControlTimelineElement::shadowPseudoId): Ditto.
647         (WebCore::MediaControlVolumeSliderElement::shadowPseudoId): Ditto.
648         (WebCore::MediaControlFullscreenButtonElement::shadowPseudoId): Ditto.
649         * rendering/MediaControlElements.h: Ditto.
650
651 2011-01-26  Dave Hyatt  <hyatt@apple.com>
652
653         Reviewed by Dan Bernstein.
654
655         https://bugs.webkit.org/show_bug.cgi?id=46421, make multi-column layout work with vertical text.
656
657         Added new tests in fast/multicol/vertical-lr and fast/multicol/vertical-rl.
658
659         * css/html.css:
660         Update p, blockquote and h1-h6 to respect directionality so that column layout tests that use those
661         elements work properly.
662
663         * rendering/InlineFlowBox.cpp:
664         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
665         Fix a flipping bug with the computation of lineTopIncludingMargins where it could be incorrectly shrunk
666         in some cases (causing lines to all stack on top of one another).
667
668         * rendering/InlineTextBox.h:
669         (WebCore::InlineTextBox::calculateBoundaries):
670         Fix calculateBoundaries to be physical rather than logical.
671
672         * rendering/LayoutState.cpp:
673         (WebCore::LayoutState::addForcedColumnBreak):
674         * rendering/LayoutState.h:
675         Rename childY to childLogicalOffset.
676
677         * rendering/RenderBlock.cpp:
678         (WebCore::RenderBlock::layoutBlock):
679         (WebCore::RenderBlock::addOverflowFromChildren):
680         (WebCore::RenderBlock::addOverflowFromFloats):
681         (WebCore::RenderBlock::collapseMargins):
682         (WebCore::RenderBlock::estimateLogicalTopPosition):
683         (WebCore::RenderBlock::layoutBlockChild):
684         (WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
685         (WebCore::RenderBlock::paintColumnRules):
686         (WebCore::RenderBlock::paintColumnContents):
687         (WebCore::RenderBlock::paintFloats):
688         (WebCore::RenderBlock::selectionGaps):
689         (WebCore::RenderBlock::removeFloatingObjectsBelow):
690         (WebCore::RenderBlock::addOverhangingFloats):
691         (WebCore::RenderBlock::hitTestFloats):
692         (WebCore::RenderBlock::hitTestColumns):
693         (WebCore::RenderBlock::calcColumnWidth):
694         (WebCore::RenderBlock::desiredColumnWidth):
695         (WebCore::RenderBlock::columnRectAt):
696         (WebCore::RenderBlock::layoutColumns):
697         (WebCore::RenderBlock::adjustPointToColumnContents):
698         (WebCore::RenderBlock::adjustRectForColumns):
699         (WebCore::RenderBlock::flipForWritingModeIncludingColumns):
700         (WebCore::RenderBlock::adjustForColumns):
701         (WebCore::RenderBlock::adjustForBorderFit):
702         (WebCore::RenderBlock::nextPageLogicalTop):
703         (WebCore::RenderBlock::applyBeforeBreak):
704         (WebCore::RenderBlock::applyAfterBreak):
705         (WebCore::RenderBlock::adjustForUnsplittableChild):
706         (WebCore::RenderBlock::adjustLinePositionForPagination):
707         * rendering/RenderBlock.h:
708         (WebCore::RenderBlock::logicalRightOffsetForContent):
709         (WebCore::RenderBlock::logicalLeftOffsetForContent):
710         (WebCore::RenderBlock::leftForFloatIncludingMargin):
711         (WebCore::RenderBlock::topForFloatIncludingMargin):
712         * rendering/RenderBlockLineLayout.cpp:
713         (WebCore::RenderBlock::layoutInlineChildren):
714         (WebCore::RenderBlock::determineStartPosition):
715         Reworking of all the RenderBlock column functions to support flipping and vertical modes.
716
717         * rendering/RenderBox.cpp:
718         (WebCore::RenderBox::offsetFromContainer):
719         (WebCore::RenderBox::flipForWritingModeIncludingColumns):
720         Patch offsetFromContainer to be aware of flipped block writing modes when dealing with column layouts.
721
722         * rendering/RenderBox.h:
723         (WebCore::RenderBox::clientLogicalBottom):
724         Fix a bug in clientLogicalBottom where it didn't add in the right border/padding.
725         
726         * rendering/RenderFlexibleBox.cpp:
727         (WebCore::RenderFlexibleBox::layoutBlock):
728         Better terminology for pagination.
729
730         * rendering/RenderInline.cpp:
731         (WebCore::RenderInline::offsetFromContainer):
732         (WebCore::RenderInline::mapLocalToContainer):
733         * rendering/RenderLayer.cpp:
734         (WebCore::RenderLayer::paintChildLayerIntoColumns):
735         (WebCore::RenderLayer::hitTestChildLayerColumns):
736         (WebCore::RenderLayer::localBoundingBox):
737         (WebCore::RenderLayer::boundingBox):
738         Patch painting in RenderLayers to be vertical-text-aware.
739     
740         * rendering/RenderObject.cpp:
741         (WebCore::RenderObject::mapLocalToContainer):
742         Add code to be flipped block-aware with columns.
743
744         * rendering/RenderTable.cpp:
745         (WebCore::RenderTable::layout):
746         * rendering/RenderTableRow.cpp:
747         (WebCore::RenderTableRow::layout):
748         * rendering/RenderTableSection.cpp:
749         (WebCore::RenderTableSection::layoutRows):
750         Fix pagination to use better terminology.
751         
752         * rendering/RenderText.cpp:
753         (WebCore::RenderText::absoluteQuads):
754         (WebCore::RenderText::absoluteQuadsForRange):
755         Fix a bug where vertical text wasn't taken into account.
756
757 2011-01-26  Dimitri Glazkov  <dglazkov@chromium.org>
758
759         Unreviewed, rolling out r76719.
760         http://trac.webkit.org/changeset/76719
761         https://bugs.webkit.org/show_bug.cgi?id=53122
762
763         Broke a bunch of media tests in Chromium/Qt/GTK.
764
765 2011-01-26  Tony Chang  <tony@chromium.org>
766
767         Reviewed by Ryosuke Niwa.
768
769         [gtk] strip NUL characters when copying text/html on GTK+
770         https://bugs.webkit.org/show_bug.cgi?id=52508
771
772         Putting NUL characters in the text/html clipboard doesn't work in
773         WebKit GTK+ (the pasted value is truncated at the NUL).  Since we're
774         already stripping this character for plain text (for Windows), strip
775         it in text/html too.
776
777         * editing/MarkupAccumulator.h: mark function as virtual
778         * editing/markup.cpp:
779         (WebCore::StyledMarkupAccumulator::appendString):
780         (WebCore::StyledMarkupAccumulator::takeResults): strip nulls
781
782 2011-01-26  Mario Sanchez Prada  <msanchez@igalia.com>
783
784         Reviewed by Martin Robinson.
785
786         [GTK] Reliable crash with getTextAtOffset()
787         https://bugs.webkit.org/show_bug.cgi?id=53131
788
789         Properly calculate length in bytes for a UTF8 substring.
790
791         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
792         (utf8Substr): Use character instead of bytes as units to
793         calculate the length in bytes for the UTF8 string.
794
795 2011-01-25  Dimitri Glazkov  <dglazkov@chromium.org>
796
797         Reviewed by Kent Tamura.
798
799         Change HTMLInputElement-derived parts of media element shadow DOM to use shadowPseudoId.
800         https://bugs.webkit.org/show_bug.cgi?id=53122
801
802         This is the first step in converting HTMLMediaElement to the new shadow DOM.
803
804         Should not regress any existing tests. No observable change in behavior.
805
806         * css/CSSSelector.cpp:
807         (WebCore::CSSSelector::pseudoId): Removed now-unnecessary hard-coded pseudo-element selectors.
808         (WebCore::nameToPseudoTypeMap): Ditto.
809         (WebCore::CSSSelector::extractPseudoType): Ditto.
810         * css/CSSSelector.h: Ditto.
811         * css/mediaControls.css: Added proper initial values, now that elements use the proper selector pipeline.
812         * rendering/MediaControlElements.cpp:
813         (WebCore::MediaControlInputElement::MediaControlInputElement): Removed the switch statement,
814             which is now replaced with virtual shadowPseudoId on each corresponding class.
815         (WebCore::MediaControlInputElement::styleForElement): Changed to use element pipeline.
816         (WebCore::MediaControlMuteButtonElement::MediaControlMuteButtonElement): Changed to set
817             display type in constructor.
818         (WebCore::MediaControlMuteButtonElement::create): Changed to not take PseudoId as
819             constructor argument.
820         (WebCore::MediaControlMuteButtonElement::shadowPseudoId): Added.
821         (WebCore::MediaControlVolumeSliderMuteButtonElement::MediaControlVolumeSliderMuteButtonElement): Added
822             to disambiguate from the MediaControlMuteButtonElement.
823         (WebCore::MediaControlVolumeSliderMuteButtonElement::create): Added.
824         (WebCore::MediaControlVolumeSliderMuteButtonElement::shadowPseudoId): Added.
825         (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement): Changed to not take PseudoId as
826             constructor argument.
827         (WebCore::MediaControlPlayButtonElement::shadowPseudoId): Added.
828         (WebCore::MediaControlSeekButtonElement::MediaControlSeekButtonElement): Changed to not take PseudoId as
829             constructor argument.
830         (WebCore::MediaControlSeekForwardButtonElement::MediaControlSeekForwardButtonElement): Added.
831         (WebCore::MediaControlSeekForwardButtonElement::create): Added.
832         (WebCore::MediaControlSeekForwardButtonElement::shadowPseudoId): Added.
833         (WebCore::MediaControlSeekBackButtonElement::MediaControlSeekBackButtonElement): Added.
834         (WebCore::MediaControlSeekBackButtonElement::create): Added.
835         (WebCore::MediaControlSeekBackButtonElement::shadowPseudoId): Added.
836         (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement): Added.
837         (WebCore::MediaControlRewindButtonElement::shadowPseudoId): Added.
838         (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement): Changed to not take PseudoId as
839             constructor argument.
840         (WebCore::MediaControlReturnToRealtimeButtonElement::shadowPseudoId): Added.
841         (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement): Changed to not take PseudoId as
842             constructor argument.
843         (WebCore::MediaControlToggleClosedCaptionsButtonElement::shadowPseudoId): Added.
844         (WebCore::MediaControlTimelineElement::MediaControlTimelineElement): Changed to not take PseudoId as
845             constructor argument.
846         (WebCore::MediaControlTimelineElement::shadowPseudoId): Added.
847         (WebCore::MediaControlVolumeSliderElement::MediaControlVolumeSliderElement): Changed to not take PseudoId as
848             constructor argument.
849         (WebCore::MediaControlVolumeSliderElement::shadowPseudoId): Added.
850         (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement): Changed to not take PseudoId as
851             constructor argument.
852         (WebCore::MediaControlFullscreenButtonElement::shadowPseudoId): Added.
853         * rendering/MediaControlElements.h:
854         (WebCore::MediaControlSeekForwardButtonElement::isForwardButton): Added.
855         (WebCore::MediaControlSeekBackButtonElement::isForwardButton): Added.
856         * rendering/RenderMedia.cpp:
857         (WebCore::RenderMedia::createMuteButton): Changed to use new constructor.
858         (WebCore::RenderMedia::createSeekBackButton): Ditto.
859         (WebCore::RenderMedia::createSeekForwardButton): Ditto.
860         (WebCore::RenderMedia::createVolumeSliderMuteButton): Ditto.
861         * rendering/style/RenderStyleConstants.h: Removed constants that are no longer used.
862
863 2011-01-26  Kenneth Russell  <kbr@google.com>
864
865         Reviewed by James Robinson.
866
867         Fix multisampling support in DrawingBuffer
868         https://bugs.webkit.org/show_bug.cgi?id=53154
869
870         In DrawingBuffer's multisampling code path, fixed enum usage and a
871         bug where it would incorrectly redefine the depth and stencil
872         buffers. Hooked up multisampling code path in Chromium port.
873
874         Tested manually with some accelerated 2D canvas content.
875         Multisampling isn't being switched on for the accelerated 2D
876         canvas at the current time because it will increase fill rate
877         requirements and cause a large number of rebaselines.
878
879         * platform/graphics/Extensions3D.h:
880         * platform/graphics/chromium/DrawingBufferChromium.cpp:
881         (WebCore::DrawingBuffer::publishToPlatformLayer):
882         * platform/graphics/chromium/Extensions3DChromium.h:
883         * platform/graphics/gpu/DrawingBuffer.cpp:
884         (WebCore::DrawingBuffer::create):
885         (WebCore::DrawingBuffer::reset):
886         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
887         (WebCore::Extensions3DOpenGL::supports):
888
889 2011-01-26  Tony Chang  <tony@chromium.org>
890
891         Unreviewed.
892
893         [chromium] revert r68310 because of race conditions detected by tsans
894         https://bugs.webkit.org/show_bug.cgi?id=53185
895
896         Causes stability problems for Chromium, http://crbug.com/70589
897
898         * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp:
899         (WebCore::SQLiteFileSystem::registerSQLiteVFS):
900
901 2011-01-26  Justin Schuh  <jschuh@chromium.org>
902
903         Reviewed by Adam Barth.
904
905         Make fireEventsAndUpdateStyle use stack local vectors. 
906         https://bugs.webkit.org/show_bug.cgi?id=46760
907
908         Test: animations/animation-add-events-in-handler.html
909
910         * page/animation/AnimationController.cpp:
911         (WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle):
912
913 2011-01-26  Nate Chapin  <japhet@chromium.org>
914
915         Reviewed by Adam Barth.
916
917         Remove m_URL from FrameLoader and depend on Document::url()
918         instead. FrameLoader::url() will be removed in a followup patch.
919         https://bugs.webkit.org/show_bug.cgi?id=41165
920
921         Refactor only, no new tests.
922
923         * WebCore.exp.in:
924         * dom/Document.cpp:
925         (WebCore::Document::Document):
926         (WebCore::Document::updateURLForPushOrReplaceState):
927         * loader/DocumentWriter.cpp:
928         (WebCore::DocumentWriter::begin):
929         * loader/FrameLoader.cpp:
930         (WebCore::FrameLoader::iconURL):
931         (WebCore::FrameLoader::didOpenURL):
932         (WebCore::FrameLoader::didExplicitOpen):
933         (WebCore::FrameLoader::receivedFirstData):
934         (WebCore::FrameLoader::url):
935         (WebCore::FrameLoader::setOutgoingReferrer):
936         (WebCore::FrameLoader::startIconLoader):
937         (WebCore::FrameLoader::commitIconURLToIconDatabase):
938         (WebCore::FrameLoader::finishedParsing):
939         (WebCore::FrameLoader::checkIfDisplayInsecureContent):
940         (WebCore::FrameLoader::checkIfRunInsecureContent):
941         (WebCore::FrameLoader::updateFirstPartyForCookies):
942         (WebCore::FrameLoader::loadInSameDocument):
943         (WebCore::FrameLoader::commitProvisionalLoad):
944         (WebCore::FrameLoader::open):
945         (WebCore::FrameLoader::shouldScrollToAnchor):
946         * loader/FrameLoader.h: Rename setURL() to setOutgoingReferrer().
947
948 2011-01-25  Brian Weinstein  <bweinstein@apple.com>
949
950         Reviewed by Antti Koivisto.
951
952         Crashes loading pages when cancelling subresource loads through WebKit
953         https://bugs.webkit.org/show_bug.cgi?id=53123
954         <rdar://problem/8914361>
955         
956         Fix a crash that happened when cancelling subresource loads through WebKit.
957         
958         When a load is cancelled synchronously (via the WebKit client), CachedResourceLoader::requestResource 
959         can be called recursively on the same function, either leading to infinite recursion, or deleting 
960         an object when it is not done being used.
961         
962         The fix for this was to call checkForPendingPreloads and servePendingRequests asynchronously when 
963         CachedResourceLoader::loadDone was called synchronously (due to the load being cancelled synchronously).
964
965         Test: fast/loader/willSendRequest-null-for-preload.html
966
967         * loader/DocumentLoader.cpp:
968         (WebCore::DocumentLoader::setRequest): Only dispatch didReceiveServerRedirectForProvisionalLoadForFrame 
969             if our new URL is non-null.
970         * loader/cache/CachedResourceLoader.cpp:
971         (WebCore::CachedResourceLoader::CachedResourceLoader): Initialize our timer.
972         (WebCore::CachedResourceLoader::loadDone): If the CachedResource we were passed in was 0, that means this 
973             function was called synchronously
974             from CachedResourceRequest::load, and we don't want to call into checkForPendingPreloads synchronously, 
975             so put it on a 0-delay timer to make the calls to checkForPendingPreloads and servePendingRequests asynchronous.
976         (WebCore::CachedResourceLoader::loadDonePendingActionTimerFired): Call checkForPendingPreloads and servePendingRequests.
977         (WebCore::CachedResourceLoader::checkForPendingPreloads): m_pendingPreloads is now a Deque instead of a Vector, 
978             so use Deque methods.
979         * loader/cache/CachedResourceLoader.h: Add the timer, the timer callback function, and make m_pendingPreloads a Deque.
980
981 2011-01-25  Pavel Podivilov  <podivilov@chromium.org>
982
983         Reviewed by Pavel Feldman.
984
985         Web Inspector: evaluate in console may not work when window.console is substituted or deleted.
986         https://bugs.webkit.org/show_bug.cgi?id=53072
987
988         Test: inspector/console-substituted.html
989
990         * inspector/InjectedScriptSource.js:
991         (.):
992
993 2011-01-26  Carlos Garcia Campos  <cgarcia@igalia.com>
994
995         Reviewed by Martin Robinson.
996
997         [cairo] Use CAIRO_OPERATOR_DARKEN when available
998         https://bugs.webkit.org/show_bug.cgi?id=53084
999
1000         Use CAIRO_OPERATOR_DARKEN for CompositePlusDarker instead of
1001         CAIRO_OPERATOR_SATURATE when building with cairo version >= 1.10.
1002
1003         * platform/graphics/cairo/CairoUtilities.cpp:
1004         (WebCore::toCairoOperator):
1005
1006 2011-01-26  Pavel Feldman  <pfeldman@chromium.org>
1007
1008         Reviewed by Yury Semikhatsky.
1009
1010         Web Inspector: visualize \n in strings as unicode cr
1011         symbol in stack variables sidebar.
1012         https://bugs.webkit.org/show_bug.cgi?id=53162
1013
1014         * inspector/front-end/ObjectPropertiesSection.js:
1015         (WebInspector.ObjectPropertyTreeElement.prototype.update):
1016
1017 2011-01-26  Andrey Kosyakov  <caseq@chromium.org>
1018
1019         Reviewed by Pavel Feldman.
1020
1021         Web Inspector: size is wrong for cached resources in Network panel
1022         - Set the size for 304/not modified resources from cached resource.
1023         - Add response headers size to resource transfer size.
1024         https://bugs.webkit.org/show_bug.cgi?id=52886
1025
1026         * inspector/InspectorResourceAgent.cpp:
1027         (WebCore::InspectorResourceAgent::didReceiveResponse):
1028         * inspector/front-end/Resource.js:
1029         (WebInspector.Resource):
1030         (WebInspector.Resource.prototype.get transferSize):
1031         (WebInspector.Resource.prototype.set responseHeaders):
1032         (WebInspector.Resource.prototype._headersSize):
1033         (WebInspector.Resource.prototype._mimeTypeIsConsistentWithType):
1034
1035 2011-01-26  Carol Szabo  <carol.szabo@nokia.com>
1036
1037         Reviewed by Simon Hausmann.
1038
1039         Fixed TiledBacking store to take into account new dirty regions caused by
1040         paint time layouts.
1041
1042         Flawed rendering design for QtWebKit resulting in artifacts being displayed
1043         https://bugs.webkit.org/show_bug.cgi?id=49184
1044
1045         There are no new tests as this patch aims at fixing flicker that
1046         happen randomly, mostly on slow hardware, thus are hard to reproduce
1047         consistently in an automated test.
1048
1049         This patch does not fully address the said bug but it is a step in the
1050         right direction. A full solution to the bug, as currently perceived,
1051         requires either a Qt GUI API change, a performance hit for QtWebKit,
1052         or a hack, until a full solution is provided this patch is progress.
1053
1054         * platform/graphics/TiledBackingStore.cpp:
1055         (WebCore::TiledBackingStore::updateTileBuffers):
1056         Changed to take into account newly dirtied areas created during
1057         tile update initiated layouts during the same update.
1058
1059 2011-01-26  Patrick Gansterer  <paroga@webkit.org>
1060
1061         Reviewed by Andreas Kling.
1062
1063         [SKIA] Remove "current path" of GraphicsContext
1064         https://bugs.webkit.org/show_bug.cgi?id=53124
1065
1066         * platform/graphics/GraphicsContext.h:
1067         * platform/graphics/skia/GraphicsContextSkia.cpp:
1068         (WebCore::GraphicsContext::clipPath):
1069         (WebCore::GraphicsContext::fillPath):
1070         (WebCore::GraphicsContext::strokePath):
1071         * platform/graphics/skia/PathSkia.cpp:
1072         (WebCore::Path::strokeBoundingRect):
1073         * platform/graphics/skia/PlatformContextSkia.cpp:
1074         * platform/graphics/skia/PlatformContextSkia.h:
1075
1076 2011-01-26  Zalan Bujtas <zbujtas@gmail.com>
1077
1078         Reviewed by Andreas Kling.
1079
1080         [Qt] Path::normalAngleAtLength() returns incorrect value on ACID3.
1081
1082         QPainterPath returns angle values with the origo being at the top left corner,
1083         we need to account for this in normalAngleAtLength().
1084         This Regressed with r66979.
1085
1086         No new tests as this is already covered by ACID3.
1087
1088         * platform/graphics/qt/PathQt.cpp:
1089         (WebCore::Path::normalAngleAtLength):
1090
1091 2011-01-26  Pavel Feldman  <pfeldman@chromium.org>
1092
1093         Reviewed by Yury Semikhatsky.
1094
1095         Web Inspector: live edit does not update source snippet.
1096         https://bugs.webkit.org/show_bug.cgi?id=53097
1097
1098         * inspector/front-end/ScriptsPanel.js:
1099         (WebInspector.ScriptsPanel.prototype._scriptSourceChanged):
1100
1101 2011-01-26  Pavel Feldman  <pfeldman@chromium.org>
1102
1103         Reviewed by Yury Semikhatsky.
1104
1105         Web Inspector: Incorrect on-hover evaluation of a variable named 'profile'.
1106         https://bugs.webkit.org/show_bug.cgi?id=53018
1107
1108         * inspector/InjectedScript.cpp:
1109         (WebCore::InjectedScript::evaluate):
1110         (WebCore::InjectedScript::evaluateOnCallFrame):
1111         (WebCore::InjectedScript::getCompletions):
1112         (WebCore::InjectedScript::getCompletionsOnCallFrame):
1113         * inspector/InjectedScript.h:
1114         * inspector/InjectedScriptSource.js:
1115         (.):
1116         * inspector/Inspector.idl:
1117         * inspector/InspectorDebuggerAgent.cpp:
1118         (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
1119         (WebCore::InspectorDebuggerAgent::getCompletionsOnCallFrame):
1120         * inspector/InspectorDebuggerAgent.h:
1121         * inspector/InspectorRuntimeAgent.cpp:
1122         (WebCore::InspectorRuntimeAgent::evaluate):
1123         (WebCore::InspectorRuntimeAgent::getCompletions):
1124         * inspector/InspectorRuntimeAgent.h:
1125         * inspector/front-end/ConsoleView.js:
1126         (WebInspector.ConsoleView.prototype.completions):
1127         (WebInspector.ConsoleView.prototype.evalInInspectedWindow):
1128         (WebInspector.ConsoleView.prototype._enterKeyPressed):
1129         * inspector/front-end/ScriptsPanel.js:
1130         (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame.updatingCallbackWrapper):
1131         (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame):
1132         * inspector/front-end/SourceFrame.js:
1133         (WebInspector.SourceFrame.prototype._showPopup):
1134         * inspector/front-end/WatchExpressionsSidebarPane.js:
1135         (WebInspector.WatchExpressionsSection.prototype.update):
1136
1137 2011-01-26  Hironori Bono  <hbono@chromium.org>
1138
1139         Reviewed by Kent Tamura.
1140
1141         A speculative fix for Bug 52422 - [chromium] More crash in
1142         FontFallbackList::determinePitch(const Font* font)
1143         https://bugs.webkit.org/show_bug.cgi?id=52422
1144
1145         My previous change may not work on non-US Windows whose system fonts
1146         have localized aliases matching to the system locale because of a
1147         font-name mismatch in createFontIndirectAndGetWinName(). This change
1148         tries all the fonts installed in a PC and returns the first font that we
1149         can create without errors.
1150
1151         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
1152         (WebCore::GetLastResortFallbackFontProcData::GetLastResortFallbackFontProcData):
1153         Added a struct used for getLastResortFallbackFontProc().
1154         (WebCore::getLastResortFallbackFontProc): Added a callback for EnumFontFamilies().
1155         (WebCore::FontCache::getLastResortFallbackFont): Use EnumFontFamilies() to find a last-resort font.
1156
1157 2011-01-26  James Robinson  <jamesr@chromium.org>
1158
1159         Reviewed by Nate Chapin.
1160
1161         Add a DOMTimeStamp parameter to the requestAnimationFrame callback
1162         https://bugs.webkit.org/show_bug.cgi?id=53142
1163
1164         This adds a DOMTimeStamp parameter to the requestAnimationFrame callback to more
1165         closely match mozilla's proposal.  This is useful if the page has multiple imperative animations
1166         and wants to ensure that they all remain synchronized.  If each callback used Date.now() to
1167         update its animation state, they would potentially be out of sync with each other.  If they use
1168         the timestamp then all callbacks for the same "frame" will update to the same state.
1169
1170         Test: fast/animation/request-animation-frame-timestamps.html
1171
1172         * bindings/scripts/CodeGeneratorV8.pm:
1173         * bindings/scripts/test/V8/V8TestCallback.cpp:
1174         (WebCore::V8TestCallback::callbackWithClass2Param):
1175         * dom/Document.cpp:
1176         (WebCore::Document::serviceScriptedAnimations):
1177         * dom/Document.h:
1178         * dom/RequestAnimationFrameCallback.h:
1179         * dom/RequestAnimationFrameCallback.idl:
1180         * page/FrameView.cpp:
1181         (WebCore::FrameView::serviceScriptedAnimations):
1182         * page/FrameView.h:
1183
1184 2011-01-25  Yuzo Fujishima  <yuzo@google.com>
1185
1186         Unreviewed attempt to fix compilation error for Chromium Clang.
1187
1188         * platform/graphics/mac/ComplexTextController.cpp:
1189         (WebCore::ComplexTextController::advance):
1190
1191 2011-01-25  Ned Holbrook  <nholbrook@apple.com>
1192
1193         Reviewed by Dan Bernstein.
1194
1195         ComplexTextController incorrectly conflates string length and range of indexes
1196         https://bugs.webkit.org/show_bug.cgi?id=52760
1197
1198         Test: fast/text/offsetForPosition-complex-fallback.html
1199
1200         * platform/graphics/mac/ComplexTextController.cpp:
1201         (WebCore::ComplexTextController::offsetForPosition):
1202         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
1203         (WebCore::ComplexTextController::ComplexTextRun::setIsNonMonotonic):
1204         (WebCore::ComplexTextController::advance):
1205         * platform/graphics/mac/ComplexTextController.h:
1206         (WebCore::ComplexTextController::ComplexTextRun::create):
1207         (WebCore::ComplexTextController::ComplexTextRun::indexEnd):
1208         * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
1209         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
1210         * platform/graphics/mac/ComplexTextControllerCoreText.cpp:
1211         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
1212         (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText):
1213
1214 2011-01-25  Sam Weinig  <sam@webkit.org>
1215
1216         Reviewed by David Hyatt.
1217
1218         Scrollbars don't work correctly for top-to-bottom text in an overflow: scroll area
1219         https://bugs.webkit.org/show_bug.cgi?id=53048
1220
1221         Test: fast/overflow/overflow-rtl-vertical-origin.html
1222
1223         * rendering/RenderLayer.cpp:
1224         (WebCore::RenderLayer::scrollPosition):
1225         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
1226         Take the scroll origin into account when calculating scrollbars in more places.
1227
1228 2011-01-25  Steve Falkenburg  <sfalken@apple.com>
1229
1230         Windows production build fix.
1231         Use correct configuration-specific path in makefile.
1232
1233         * WebCore.vcproj/WebCore.make:
1234
1235 2011-01-25  Kent Tamura  <tkent@chromium.org>
1236
1237         Reviewed by Dimitri Glazkov.
1238
1239         Radio button group state is not restored correctly
1240         https://bugs.webkit.org/show_bug.cgi?id=50442
1241
1242         Fixes a bug that radio button states are not restored correctly in
1243         a case that non-first radio button in a group is checked.
1244
1245         If "checked" attribute is present, the radio button is checked and
1246         other radio buttons in the group are unchecked. This behavior
1247         disturbs form state restoring. This patch changes this behavior so
1248         that the "checked" attribute handling is delayed after form state
1249         restoring.
1250
1251         Test: fast/forms/state-restore-radio-group.html
1252
1253         * html/HTMLFormControlElement.h:
1254          Make finishParsingChildren() protected so that HTMLInpuElement can call it.
1255         * html/HTMLInputElement.cpp:
1256         (WebCore::HTMLInputElement::HTMLInputElement):
1257          - Add createdByParser parameter.
1258          - Initialize m_stateRestored and m_parsingInProgress.
1259         (WebCore::HTMLInputElement::create): Sync with the constructor.
1260         (WebCore::HTMLInputElement::restoreFormControlState):
1261          Set m_stateRestored in order to refer it in finishParsingChildren().
1262         (WebCore::HTMLInputElement::parseMappedAttribute):
1263          Don't call setChecked() during parsing. Move setNeedsValidityCheck()
1264          to setChecked().
1265         (WebCore::HTMLInputElement::finishParsingChildren):
1266          Call setChecked() if form state is not restored.
1267         (WebCore::HTMLInputElement::setChecked):
1268          Move setNeedsValidityCheck() from parseMappedAttribute() because
1269          finishParsingChildren() also needs to call setNeedsValidityCheck().
1270         * html/HTMLInputElement.h:
1271          - Remove the default value of HTMLFormElement* of the HTMLInputElement
1272            constructor, and add createdByParser parameter.
1273          - Introduce m_parsingInProgress and m_stateRestored.
1274         * html/HTMLIsIndexElement.cpp:
1275         (WebCore::HTMLIsIndexElement::HTMLIsIndexElement):
1276          Sync with the HTMLInputElement constructor change.
1277         * html/HTMLTagNames.in: Add constructorNeedsCreatedByParser flag.
1278         * rendering/MediaControlElements.cpp:
1279         (WebCore::MediaControlInputElement::MediaControlInputElement):
1280          Sync with the HTMLInputElement constructor change.
1281         * rendering/ShadowElement.cpp:
1282         (WebCore::ShadowInputElement::ShadowInputElement): ditto.
1283         * rendering/ShadowElement.h:
1284         (WebCore::ShadowElement::ShadowElement): ditto.
1285
1286 2011-01-25  Kent Tamura  <tkent@chromium.org>
1287
1288         Reviewed by Dimitri Glazkov.
1289
1290         HTMLFormElement::checkValidity() returns incorrect result if 'invalid' events are canceled.
1291         https://bugs.webkit.org/show_bug.cgi?id=52565
1292
1293         * html/HTMLFormElement.cpp:
1294         (WebCore::HTMLFormElement::validateInteractively):
1295           Check checkInvalidControlsAndCollectUnhandled() result instead of
1296           checking emptiness of unhandled invalid controls list.
1297         (WebCore::HTMLFormElement::checkValidity): ditto.
1298         (WebCore::HTMLFormElement::checkInvalidControlsAndCollectUnhandled):
1299           Renamed from collectUnhandledInvalidControls().
1300           Returns true if there is any invalid control regardless of event canceling.
1301         * html/HTMLFormElement.h: Rename collectUnhandledInvalidControls() to
1302           checkInvalidControlsAndCollectUnhandled().
1303
1304 2011-01-25  Kent Tamura  <tkent@chromium.org>
1305
1306         Reviewed by Dimitri Glazkov.
1307
1308         Range and number inputs should reject increment and decrement by
1309         keyboard or mouse wheel if they are disabled or read-only
1310         https://bugs.webkit.org/show_bug.cgi?id=53151
1311
1312         * html/RangeInputType.cpp:
1313         (WebCore::RangeInputType::handleKeydownEvent): Check disabled() and readOnly().
1314         * html/TextFieldInputType.cpp:
1315         (WebCore::TextFieldInputType::handleKeydownEventForSpinButton): ditto.
1316         (WebCore::TextFieldInputType::handleWheelEventForSpinButton): ditto.
1317
1318 2011-01-25  Kent Tamura  <tkent@chromium.org>
1319
1320         Reviewed by Dimitri Glazkov.
1321
1322         API to support localized numbers for <input type=number>
1323         https://bugs.webkit.org/show_bug.cgi?id=45730
1324
1325         Introduce platform/text/LocalizedNumber.h, and
1326         LocalizedNumberNone.cpp, which is an empty implementation of the
1327         functions in LocalizedNumber.h.  We use LocalizedNumberNone.cpp in
1328         all platforms for now.
1329
1330         A string in a type=number field is parsed as a localized number
1331         first. If the parsing fails, it is parsed as the HTML5 number.
1332
1333         We introduce HTMLInputElement::visibleValue(). It represents a value
1334         which should be drawn by a renderer. HTMLInputElement::value() always
1335         returns a number formatted for HTML5, and visibleValue() may return a
1336         localized number.
1337
1338         No new tests because this doesn't change any behavior.
1339
1340         * Android.mk: Add LocalizedNumber.h and/or LocalizedNumberNone.cpp.
1341         * CMakeLists.txt: ditto.
1342         * GNUmakefile.am: ditto.
1343         * WebCore.gypi: ditto.
1344         * WebCore.pro: ditto.
1345         * WebCore.vcproj/WebCore.vcproj: ditto.
1346         * WebCore.xcodeproj/project.pbxproj: ditto.
1347         * dom/InputElement.h: Add visibleValue().
1348         * html/HTMLInputElement.cpp:
1349         (WebCore::HTMLInputElement::visibleValue): Added.  Just call InputType::visibleValue().
1350         * html/HTMLInputElement.h: Declare visibleValue().
1351         * html/InputType.cpp:
1352         (WebCore::InputType::visibleValue): Add the default implementation of
1353           visibleValue(), which returns HTMLInputElement::value().
1354         * html/InputType.h: Add declarations.
1355         * html/NumberInputType.cpp:
1356         (WebCore::isHTMLNumberCharacter): Renamed from isNumberCharacter().
1357         (WebCore::isNumberCharacter): Calls isLocalizedNumberCharacter() and isHTMLNumberCharacter().
1358         (WebCore::NumberInputType::visibleValue):
1359           Returns a localized number string produced by formatLocalizedNumber().
1360         (WebCore::NumberInputType::isAcceptableValue): Calls parseLocalizedNumber().
1361         (WebCore::NumberInputType::sanitizeValue): Calls parseLocalizedNumber().
1362         * html/NumberInputType.h: Add declarations.
1363         * platform/text/LocalizedNumber.h: Added.
1364         * platform/text/LocalizedNumberNone.cpp: Added.
1365         (WebCore::parseLocalizedNumber):
1366         (WebCore::formatLocalizedNumber):
1367         (WebCore::isLocalizedNumberCharacter):
1368         * rendering/RenderTextControlSingleLine.cpp:
1369         (WebCore::RenderTextControlSingleLine::updateFromElement):
1370           Calls InputElement::visibleValue() instead of value().
1371         * wml/WMLInputElement.h:
1372         (WebCore::WMLInputElement::visibleValue): Added. It just calls value().
1373
1374 2011-01-25  Alexey Proskuryakov  <ap@apple.com>
1375
1376         Reviewed by Darin Adler.
1377
1378         https://bugs.webkit.org/show_bug.cgi?id=53143
1379         Add IntRectHash
1380
1381         * WebCore.xcodeproj/project.pbxproj:
1382         * platform/graphics/IntRectHash.h: Added.
1383
1384         * platform/graphics/IntSizeHash.h: Don't do "using WebCore::IntSize"!
1385
1386 2011-01-25  Ilya Sherman  <isherman@chromium.org>
1387
1388         Reviewed by Ryosuke Niwa.
1389
1390         Remove trailing whitespace in HTMLInputElement.cpp
1391         https://bugs.webkit.org/show_bug.cgi?id=53152
1392
1393         * html/HTMLInputElement.cpp:
1394         (WebCore::HTMLInputElement::updateCheckedRadioButtons):
1395         (WebCore::HTMLInputElement::applyStep):
1396         (WebCore::HTMLInputElement::updateFocusAppearance):
1397         (WebCore::HTMLInputElement::mapToEntry):
1398         (WebCore::HTMLInputElement::setAutofilled):
1399         (WebCore::HTMLInputElement::willMoveToNewOwnerDocument):
1400         (WebCore::HTMLInputElement::didMoveToNewOwnerDocument):
1401
1402 2011-01-25  Mike Reed  <reed@google.com>
1403
1404         Reviewed by James Robinson.
1405
1406         DrawingBufer::reset() today checks if the new size is the same as its
1407         m_size, and if so, returns immediately. This does not match the
1408         semantics of <canvas>, which wants to clear its contents anytime the
1409         size is specified.
1410         https://bugs.webkit.org/show_bug.cgi?id=53149
1411
1412         Test: Covered by existing <canvas> tests using gpu.
1413
1414         * platform/graphics/chromium/DrawingBufferChromium.cpp:
1415         (WebCore::DrawingBuffer::DrawingBuffer):
1416         * platform/graphics/gpu/DrawingBuffer.cpp:
1417         (WebCore::DrawingBuffer::reset):
1418
1419 2011-01-25  Cris Neckar  <cdn@chromium.org>
1420
1421         Reviewed by Adam Barth.
1422
1423         Add a hashset of DOMURLs to ScriptExecutionContext to track back references.
1424         https://bugs.webkit.org/show_bug.cgi?id=53038
1425
1426         Test: fast/dom/window-domurl-crash.html
1427
1428         * dom/ScriptExecutionContext.cpp:
1429         (WebCore::ScriptExecutionContext::~ScriptExecutionContext):
1430         (WebCore::ScriptExecutionContext::createdDomUrl):
1431         (WebCore::ScriptExecutionContext::destroyedDomUrl):
1432         * dom/ScriptExecutionContext.h:
1433         (WebCore::ScriptExecutionContext::domUrls):
1434         * html/DOMURL.cpp:
1435         (WebCore::DOMURL::DOMURL):
1436         (WebCore::DOMURL::~DOMURL):
1437         (WebCore::DOMURL::contextDestroyed):
1438         * html/DOMURL.h:
1439         (WebCore::DOMURL::scriptExecutionContext):
1440
1441 2011-01-23  Antti Koivisto  <antti@apple.com>
1442
1443         Reviewed by Darin Adler.
1444
1445         https://bugs.webkit.org/show_bug.cgi?id=52983
1446         Eliminate m_tagHistory pointer from CSSSelector
1447
1448         Keep the component selectors in the array in CSSSelectorList instead
1449         of maintaining a linked list between them. This allows eliminating
1450         m_tagHistory pointer, shrinking CSSSelector by 25% (selection performance
1451         seems to improve some too due to better locality).
1452
1453         * WebCore.xcodeproj/project.pbxproj:
1454         
1455             Make CSSSelector.h a private header.
1456         
1457         * css/CSSGrammar.y:
1458         
1459             Use CSSParserSelector during parsing to keep the tag history in 
1460             a linked list. This is flattened to an array after parsing.
1461             Use accessors for setting selector values.
1462             Use OwnPtr in selector vector.
1463             
1464         * css/CSSPageRule.cpp:
1465         (WebCore::CSSPageRule::CSSPageRule):
1466         * css/CSSPageRule.h:
1467         (WebCore::CSSPageRule::create):
1468         
1469             Simplify.
1470     
1471         * css/CSSParser.cpp:
1472         (WebCore::CSSParser::~CSSParser):
1473         (WebCore::CSSParser::createFloatingSelector):
1474         (WebCore::CSSParser::sinkFloatingSelector):
1475         (WebCore::CSSParser::createStyleRule):
1476         (WebCore::CSSParser::updateSpecifiersWithElementName):
1477         (WebCore::CSSParser::createPageRule):
1478         * css/CSSParser.h:
1479         (WebCore::CSSParser::reusableSelectorVector):
1480         
1481             CSSSelector -> CSSParserSelector.
1482             Use OwnPtr in selector vector.
1483             
1484         * css/CSSParserValues.cpp:
1485         (WebCore::CSSParserSelector::CSSParserSelector):
1486         (WebCore::CSSParserSelector::~CSSParserSelector):
1487         * css/CSSParserValues.h:
1488         (WebCore::CSSParserSelector::releaseSelector):
1489         (WebCore::CSSParserSelector::setTag):
1490         (WebCore::CSSParserSelector::setValue):
1491         (WebCore::CSSParserSelector::setAttribute):
1492         (WebCore::CSSParserSelector::setArgument):
1493         (WebCore::CSSParserSelector::setSimpleSelector):
1494         (WebCore::CSSParserSelector::setMatch):
1495         (WebCore::CSSParserSelector::setRelation):
1496         (WebCore::CSSParserSelector::setForPage):
1497         (WebCore::CSSParserSelector::pseudoType):
1498         (WebCore::CSSParserSelector::isUnknownPseudoElement):
1499         (WebCore::CSSParserSelector::isSimple):
1500         (WebCore::CSSParserSelector::tagHistory):
1501         (WebCore::CSSParserSelector::setTagHistory):
1502         
1503             Linked list used during parsing.
1504             Avoid recursive destruction.
1505
1506         * css/CSSSelector.cpp:
1507         (WebCore::CSSSelector::extractPseudoType):
1508         (WebCore::CSSSelector::operator==):
1509         (WebCore::CSSSelector::selectorText):
1510         (WebCore::CSSSelector::setSimpleSelector):
1511         * css/CSSSelector.h:
1512         (WebCore::CSSSelector::CSSSelector):
1513         (WebCore::CSSSelector::~CSSSelector):
1514         (WebCore::CSSSelector::tagHistory):
1515         (WebCore::CSSSelector::tag):
1516         (WebCore::CSSSelector::value):
1517         (WebCore::CSSSelector::setTag):
1518         (WebCore::CSSSelector::isLastInTagHistory):
1519         (WebCore::CSSSelector::setNotLastInTagHistory):
1520         (WebCore::CSSSelector::RareData::RareData):
1521         (WebCore::CSSSelector::RareData::~RareData):
1522         (WebCore::CSSSelector::createRareData):
1523         (WebCore::CSSSelector::setValue):
1524         
1525             Remove m_tagHistory.
1526             Keep m_value in the union with the rare data pointer instead.
1527             Make m_value and m_tag private, implement accessors.
1528             Add a new bit to indicate end of the tag history (multipart selector).
1529             Eliminate complex destruction. Selectors are now deleted as an array or by a CSSParserSelector chain.
1530             
1531         * css/CSSSelectorList.cpp:
1532         (WebCore::CSSSelectorList::adoptSelectorVector):
1533         
1534             Flatten everything to an array.
1535         
1536         (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()):
1537         * css/CSSSelectorList.h:
1538         (WebCore::CSSSelectorList::hasOneSelector):
1539         (WebCore::CSSSelectorList::next):
1540         
1541             Skip over the subparts of multipart selectors to find the next selector.
1542     
1543         * css/CSSStyleRule.h:
1544         (WebCore::CSSStyleRule::adoptSelectorVector):
1545         
1546             CSSSelector -> CSSParserSelector.
1547             
1548         * css/CSSStyleSelector.cpp:
1549         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
1550         (WebCore::CSSRuleSet::addRule):
1551         (WebCore::collectIdsAndSiblingRulesFromList):
1552         (WebCore::CSSStyleSelector::matchPageRulesForList):
1553         * dom/Node.cpp:
1554         (WebCore::Node::querySelector):
1555         * dom/SelectorNodeList.cpp:
1556         (WebCore::createSelectorNodeList):
1557         
1558             Use accessors.
1559
1560 2011-01-25  James Simonsen  <simonjam@chromium.org>
1561
1562         Reviewed by Tony Chang.
1563
1564         [Chromium] Support small caps in complex text on linux
1565         https://bugs.webkit.org/show_bug.cgi?id=53051
1566
1567         * platform/graphics/chromium/ComplexTextControllerLinux.cpp:
1568         (WebCore::ComplexTextController::nextScriptRun): Break runs at small caps boundaries.
1569         (WebCore::ComplexTextController::setupFontForScriptRun): Setup small caps font data if needed.
1570         * platform/graphics/chromium/ComplexTextControllerLinux.h: Store small caps text in separate string.
1571
1572 2011-01-25  Steve Falkenburg  <sfalken@apple.com>
1573
1574         Rubber-stamped by Adam Roben.
1575
1576         Windows production build fix.
1577         Use correct environment variable escaping
1578
1579         * WebCore.vcproj/WebCore.make:
1580
1581 2011-01-25  Adam Barth  <abarth@webkit.org>
1582
1583         Reviewed by Eric Seidel.
1584
1585         Empty URLs are never display isolated
1586         https://bugs.webkit.org/show_bug.cgi?id=53053
1587
1588         This check mirrors the check in the local case.  There isn't a good way
1589         to test this with a LayoutTest, but it is tested in Chromium (where
1590         this registry is used).
1591
1592         * platform/SchemeRegistry.cpp:
1593         (WebCore::SchemeRegistry::shouldTreatURLSchemeAsDisplayIsolated):
1594
1595 2011-01-25  Sam Weinig  <sam@webkit.org>
1596
1597         Reviewed by Anders Carlsson.
1598
1599         Pipe a timestamp down into the PlatformWheelEvent for the Mac.
1600         https://bugs.webkit.org/show_bug.cgi?id=53111
1601
1602         * platform/PlatformWheelEvent.h:
1603         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1604         (WebCore::PlatformWheelEvent::timestamp):
1605         Add timestamp member.
1606
1607         * platform/mac/WheelEventMac.mm:
1608         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1609         Initialize the timestamp from the event.
1610
1611 2011-01-25  Sheriff Bot  <webkit.review.bot@gmail.com>
1612
1613         Unreviewed, rolling out r76625.
1614         http://trac.webkit.org/changeset/76625
1615         https://bugs.webkit.org/show_bug.cgi?id=53119
1616
1617         "incorrect pixel test results" (Requested by rniwa on
1618         #webkit).
1619
1620         * rendering/RenderBox.cpp:
1621         (WebCore::RenderBox::localCaretRect):
1622
1623 2011-01-25  Patrick Gansterer  <paroga@webkit.org>
1624
1625         Unreviewed WinCE build fix for r76614.
1626
1627         * platform/FileSystem.h:
1628
1629 2011-01-21  Levi Weintraub  <leviw@chromium.org>
1630
1631         Reviewed by Darin Adler.
1632
1633         Adding border and padding to the calculation of the local caret rect for RenderBoxes.
1634
1635         Undo moves caret to invalid position
1636         https://bugs.webkit.org/show_bug.cgi?id=49744
1637
1638         Tests: editing/selection/caret-painting-after-paste-undo-rtl.html
1639                editing/selection/caret-painting-after-paste-undo.html
1640
1641         * rendering/RenderBox.cpp:
1642         (WebCore::RenderBox::localCaretRect):
1643
1644 2011-01-25  Sam Weinig  <sam@webkit.org>
1645
1646         Reviewed by Anders Carlsson.
1647
1648         Add hasPreciseScrollingDeltas bit to PlatformWheelEvent on the Mac.
1649         https://bugs.webkit.org/show_bug.cgi?id=53107
1650
1651         * platform/PlatformWheelEvent.h:
1652         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1653         (WebCore::PlatformWheelEvent::hasPreciseScrollingDeltas):
1654         * platform/mac/WheelEventMac.mm:
1655         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1656
1657 2011-01-20  Jer Noble  <jer.noble@apple.com>
1658
1659         Reviewed by Eric Carlson.
1660
1661         REGRESSION (r72119): Audio never plays on Star Wars intro animation
1662         https://bugs.webkit.org/show_bug.cgi?id=52467
1663         
1664         QuickTime's eat/m4a movie importer compontent doesn't list audio/m4a as a mime
1665         type which it supports, though it handles .m4a files just fine.  Change the way
1666         we build the list of supported MIME Types through a new WebKitSystemInterface
1667         function.
1668         
1669         Caused by r72119, which adds system-specific extension->MIME entries to the cache
1670         before global entries, and the system-specific entries include QuickTime's registry 
1671         entries which contain the audio/m4a MIME type, while its components do not.
1672
1673         Test: media/audio-mpeg4-supported.html
1674
1675         * WebCore.vcproj/QTMovieWinCommon.vsprops:
1676         * platform/graphics/win/QTMovie.cpp:
1677         (getMIMETypeCallBack):
1678         (initializeSupportedTypes):
1679         (QTMovie::countSupportedTypes): gSupportedTypes is now a CFArrayRef.
1680         (QTMovie::getSupportedType): Ditto.
1681
1682 2011-01-25  Hans Wennborg  <hans@chromium.org>
1683
1684         Reviewed by Jeremy Orlow.
1685
1686         IndexedDB: Remove PlatformBridge::idbShutdown()
1687         https://bugs.webkit.org/show_bug.cgi?id=53077
1688
1689         Since Chromium r72157, this is not used anymore. The previous use was
1690         to signal to the embedder that IndexedDB was shutting down, but we
1691         agreed it is better if the embedder keeps track of that itself.
1692
1693         No new tests: this does not change any functionality.
1694
1695         * platform/chromium/PlatformBridge.h:
1696         * storage/IDBFactoryBackendInterface.cpp:
1697         * storage/IDBFactoryBackendInterface.h:
1698         (WebCore::IDBFactoryBackendInterface::~IDBFactoryBackendInterface):
1699         * storage/chromium/IDBFactoryBackendInterface.cpp:
1700
1701 2011-01-25  Darin Adler  <darin@apple.com>
1702
1703         Reviewed by Anders Carlsson.
1704
1705         WebKit is using CSBackupSetItemExcluded incorrectly
1706         https://bugs.webkit.org/show_bug.cgi?id=53095
1707         rdar://problem/8790540
1708
1709         * loader/icon/IconDatabase.cpp:
1710         (WebCore::IconDatabase::performOpenInitialization): Added code to
1711         exclude the database from backup one time, and record inside the
1712         database that this has been done.
1713         (WebCore::IconDatabase::wasExcludedFromBackup): Added.
1714         (WebCore::IconDatabase::setWasExcludedFromBackup): Added.
1715         * loader/icon/IconDatabase.h: Added new functions above.
1716
1717         * platform/FileSystem.cpp:
1718         (WebCore::canExcludeFromBackup): Added.
1719         (WebCore::excludeFromBackup): Added.
1720
1721         * platform/FileSystem.h: Added canExcludeFromBackup, excludeFromBackup,
1722         and pathAsURL functions. Cleaned up ifdefs and comments a bit and sorted
1723         things alphabetically, particularly platform-specific sections.
1724
1725         * platform/cf/FileSystemCF.cpp:
1726         (WebCore::pathAsURL): Added.
1727
1728         * platform/mac/FileSystemMac.mm:
1729         (WebCore::canExcludeFromBackup): Added.
1730         (WebCore::excludeFromBackup): Added.
1731
1732         * platform/network/cf/FormDataStreamCFNet.cpp:
1733         (WebCore::advanceCurrentStream): Changed to call pathAsURL.
1734         * platform/network/mac/FormDataStreamMac.mm:
1735         (WebCore::advanceCurrentStream): Ditto.
1736
1737 2011-01-25  Helder Correia  <helder@sencha.com>
1738
1739         Reviewed by Dirk Schulze.
1740
1741         REGRESSION(75139): SVG gradients are not applied to texts
1742         https://bugs.webkit.org/show_bug.cgi?id=52531
1743
1744         CGContextConcatCTM should use the CGLayer context, not the
1745         GraphicsContext. Also, the CTM needs to be adjusted (translated).
1746         This fixes SVG text gradient fill.
1747
1748         Test: svg/css/composite-shadow-text.svg
1749
1750         * platform/graphics/cg/GraphicsContextCG.cpp:
1751         (WebCore::GraphicsContext::fillRect):
1752
1753 2011-01-25  Benjamin Kalman  <kalman@chromium.org>
1754
1755         Reviewed by Ryosuke Niwa.
1756
1757         Cannot extend or modify forward by word over a non-contenteditable region
1758         https://bugs.webkit.org/show_bug.cgi?id=53070
1759
1760         Test: editing/selection/extend-forward-by-word-over-non-editable.html
1761
1762         Change all instances of honorEditableBoundaryAtOrAfter to honorEditableBoundaryAtOrBefore and vice versa in the
1763         functions which determine the end/start of words/lines/sentences in visible_units.cpp.
1764
1765         This fixes the bug where moving forwards by a word over a non-contenteditable region would place the cursor
1766         inside that region, and then get moved back to the start of the word due to honorEditableBoundaryAtOrBefore.
1767         The cursor is now moved to the end of the region (which is effectively a noop in this case).
1768
1769         * editing/visible_units.cpp: Change all instances of honorEditableBoundaryAtOrAfter to
1770         honorEditableBoundaryAtOrBefore and vice versa.
1771         (WebCore::previousWordPosition):
1772         (WebCore::nextWordPosition):
1773         (WebCore::startOfLine):
1774         (WebCore::endOfLine):
1775         (WebCore::previousSentencePosition):
1776         (WebCore::nextSentencePosition):
1777         (WebCore::logicalStartOfLine):
1778         (WebCore::logicalEndOfLine):
1779
1780 2011-01-25  Yael Aharon  <yael.aharon@nokia.com>
1781
1782         Unreviewed build fix.
1783         After r76466, efsrv.lib is used unconditionally.
1784         Don't guard it with ENABLE_NETSCAPE_PLUGIN_API.
1785
1786         * WebCore.pro:
1787
1788 2011-01-24  Zhenyao Mo  <zmo@google.com>
1789
1790         Reviewed by Kenneth Russell.
1791
1792         Style cleanup for WebGLRenderingContext
1793         https://bugs.webkit.org/show_bug.cgi?id=52352
1794
1795         * html/canvas/WebGLBuffer.cpp:
1796         * html/canvas/WebGLBuffer.h:
1797         * html/canvas/WebGLObject.cpp:
1798         * html/canvas/WebGLProgram.cpp:
1799         * html/canvas/WebGLRenderbuffer.cpp:
1800         * html/canvas/WebGLRenderingContext.cpp:
1801         (WebCore::WebGLRenderingContext::create):
1802         (WebCore::WebGLRenderingContext::blendFunc):
1803         (WebCore::WebGLRenderingContext::createShader):
1804         (WebCore::WebGLRenderingContext::deleteBuffer):
1805         (WebCore::WebGLRenderingContext::deleteShader):
1806         (WebCore::WebGLRenderingContext::deleteTexture):
1807         (WebCore::WebGLRenderingContext::disableVertexAttribArray):
1808         (WebCore::WebGLRenderingContext::validateIndexArrayPrecise):
1809         (WebCore::WebGLRenderingContext::validateRenderingState):
1810         (WebCore::WebGLRenderingContext::enableVertexAttribArray):
1811         (WebCore::WebGLRenderingContext::getUniform):
1812         (WebCore::WebGLRenderingContext::detachAndRemoveAllObjects):
1813         * html/canvas/WebGLRenderingContext.h:
1814         * html/canvas/WebGLShader.cpp:
1815         * html/canvas/WebGLTexture.cpp:
1816         * html/canvas/WebGLUniformLocation.cpp:
1817         * html/canvas/WebGLUniformLocation.h:
1818
1819 2011-01-24  Chris Marrin  <cmarrin@apple.com>
1820
1821         Reviewed by Eric Seidel.
1822
1823         Change ENABLE_3D_CANVAS to ENABLE_WEBGL
1824         https://bugs.webkit.org/show_bug.cgi?id=53041
1825
1826         * Configurations/FeatureDefines.xcconfig:
1827         * DerivedSources.cpp:
1828         * GNUmakefile.am:
1829         * WebCore.pro:
1830         * bindings/generic/RuntimeEnabledFeatures.h:
1831         * bindings/js/JSArrayBufferCustom.cpp:
1832         * bindings/js/JSCanvasRenderingContextCustom.cpp:
1833         (WebCore::toJS):
1834         * bindings/js/JSDOMWindowCustom.cpp:
1835         * bindings/js/JSDataViewCustom.cpp:
1836         * bindings/js/JSDocumentCustom.cpp:
1837         * bindings/js/JSFloat32ArrayCustom.cpp:
1838         * bindings/js/JSHTMLCanvasElementCustom.cpp:
1839         (WebCore::JSHTMLCanvasElement::getContext):
1840         * bindings/js/JSInt16ArrayCustom.cpp:
1841         * bindings/js/JSInt32ArrayCustom.cpp:
1842         * bindings/js/JSInt8ArrayCustom.cpp:
1843         * bindings/js/JSUint16ArrayCustom.cpp:
1844         * bindings/js/JSUint32ArrayCustom.cpp:
1845         * bindings/js/JSUint8ArrayCustom.cpp:
1846         * bindings/js/JSWebGLRenderingContextCustom.cpp:
1847         * bindings/js/JSXMLHttpRequestCustom.cpp:
1848         (WebCore::JSXMLHttpRequest::markChildren):
1849         (WebCore::JSXMLHttpRequest::send):
1850         (WebCore::JSXMLHttpRequest::response):
1851         * bindings/v8/custom/V8ArrayBufferCustom.cpp:
1852         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
1853         * bindings/v8/custom/V8DataViewCustom.cpp:
1854         * bindings/v8/custom/V8DocumentCustom.cpp:
1855         (WebCore::V8Document::getCSSCanvasContextCallback):
1856         * bindings/v8/custom/V8Float32ArrayCustom.cpp:
1857         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
1858         (WebCore::V8HTMLCanvasElement::getContextCallback):
1859         * bindings/v8/custom/V8Int16ArrayCustom.cpp:
1860         * bindings/v8/custom/V8Int32ArrayCustom.cpp:
1861         * bindings/v8/custom/V8Int8ArrayCustom.cpp:
1862         * bindings/v8/custom/V8Uint16ArrayCustom.cpp:
1863         * bindings/v8/custom/V8Uint32ArrayCustom.cpp:
1864         * bindings/v8/custom/V8Uint8ArrayCustom.cpp:
1865         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
1866         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
1867         (WebCore::V8XMLHttpRequest::responseAccessorGetter):
1868         (WebCore::V8XMLHttpRequest::sendCallback):
1869         * features.pri:
1870         * html/HTMLCanvasElement.cpp:
1871         (WebCore::HTMLCanvasElement::getContext):
1872         (WebCore::HTMLCanvasElement::reset):
1873         * html/HTMLCanvasElement.h:
1874         * html/canvas/ArrayBuffer.cpp:
1875         * html/canvas/ArrayBuffer.idl:
1876         * html/canvas/ArrayBufferView.cpp:
1877         * html/canvas/ArrayBufferView.idl:
1878         * html/canvas/DataView.cpp:
1879         * html/canvas/DataView.idl:
1880         * html/canvas/Float32Array.cpp:
1881         * html/canvas/Float32Array.idl:
1882         * html/canvas/Int16Array.cpp:
1883         * html/canvas/Int16Array.idl:
1884         * html/canvas/Int32Array.cpp:
1885         * html/canvas/Int32Array.idl:
1886         * html/canvas/Int8Array.cpp:
1887         * html/canvas/Int8Array.idl:
1888         * html/canvas/OESStandardDerivatives.cpp:
1889         * html/canvas/OESStandardDerivatives.idl:
1890         * html/canvas/OESTextureFloat.cpp:
1891         * html/canvas/OESTextureFloat.idl:
1892         * html/canvas/Uint16Array.cpp:
1893         * html/canvas/Uint16Array.idl:
1894         * html/canvas/Uint32Array.cpp:
1895         * html/canvas/Uint32Array.idl:
1896         * html/canvas/Uint8Array.cpp:
1897         * html/canvas/Uint8Array.idl:
1898         * html/canvas/WebGLActiveInfo.idl:
1899         * html/canvas/WebGLBuffer.cpp:
1900         * html/canvas/WebGLBuffer.idl:
1901         * html/canvas/WebGLContextAttributes.cpp:
1902         * html/canvas/WebGLContextAttributes.idl:
1903         * html/canvas/WebGLContextEvent.idl:
1904         * html/canvas/WebGLExtension.cpp:
1905         * html/canvas/WebGLFramebuffer.cpp:
1906         * html/canvas/WebGLFramebuffer.idl:
1907         * html/canvas/WebGLGetInfo.cpp:
1908         * html/canvas/WebGLObject.cpp:
1909         * html/canvas/WebGLProgram.cpp:
1910         * html/canvas/WebGLProgram.idl:
1911         * html/canvas/WebGLRenderbuffer.cpp:
1912         * html/canvas/WebGLRenderbuffer.idl:
1913         * html/canvas/WebGLRenderingContext.cpp:
1914         * html/canvas/WebGLRenderingContext.idl:
1915         * html/canvas/WebGLShader.cpp:
1916         * html/canvas/WebGLShader.idl:
1917         * html/canvas/WebGLTexture.cpp:
1918         * html/canvas/WebGLTexture.idl:
1919         * html/canvas/WebGLUniformLocation.cpp:
1920         * html/canvas/WebGLUniformLocation.idl:
1921         * html/canvas/WebKitLoseContext.cpp:
1922         * html/canvas/WebKitLoseContext.idl:
1923         * page/DOMWindow.idl:
1924         * platform/graphics/ANGLEWebKitBridge.cpp:
1925         * platform/graphics/GraphicsContext3D.cpp:
1926         * platform/graphics/cg/GraphicsContext3DCG.cpp:
1927         * platform/graphics/gpu/DrawingBuffer.cpp:
1928         * platform/graphics/gpu/mac/DrawingBufferMac.mm:
1929         * platform/graphics/mac/GraphicsContext3DMac.mm:
1930         * platform/graphics/mac/WebGLLayer.mm:
1931         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
1932         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
1933         * platform/graphics/qt/Extensions3DQt.cpp:
1934         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1935         * platform/graphics/qt/GraphicsLayerQt.cpp:
1936         (WebCore::GraphicsLayerQtImpl::GraphicsLayerQtImpl):
1937         (WebCore::GraphicsLayerQtImpl::paint):
1938         (WebCore::GraphicsLayerQtImpl::flushChanges):
1939         * platform/graphics/qt/GraphicsLayerQt.h:
1940         * platform/graphics/skia/GraphicsContext3DSkia.cpp:
1941         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
1942         * rendering/RenderLayerBacking.cpp:
1943         (WebCore::isAcceleratedCanvas):
1944         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
1945         (WebCore::RenderLayerBacking::containsPaintedContent):
1946         (WebCore::RenderLayerBacking::contentChanged):
1947         * webaudio/AudioBuffer.cpp:
1948         * webaudio/AudioBuffer.idl:
1949         * webaudio/RealtimeAnalyser.cpp:
1950         * webaudio/RealtimeAnalyser.h:
1951         * webaudio/RealtimeAnalyserNode.h:
1952         * webaudio/RealtimeAnalyserNode.idl:
1953         * xml/XMLHttpRequest.cpp:
1954         (WebCore::XMLHttpRequest::setResponseType):
1955         (WebCore::XMLHttpRequest::clearResponse):
1956         (WebCore::XMLHttpRequest::didReceiveData):
1957         * xml/XMLHttpRequest.h:
1958
1959 2011-01-25  Mikhail Naganov  <mnaganov@chromium.org>
1960
1961         Reviewed by Pavel Feldman.
1962
1963         Web Inspector: [Chromium] Prepare for landing of detailed heap snapshots.
1964
1965         - Introduce Preferences.detailedHeapProfiles flag for controlling
1966           querying of detailed heap snapshots.
1967         - Add boilerplate code for the new view.
1968         - Factor out common code.
1969
1970         https://bugs.webkit.org/show_bug.cgi?id=52624
1971
1972         * WebCore.gypi:
1973         * WebCore.vcproj/WebCore.vcproj:
1974         * bindings/js/ScriptProfiler.h:
1975         (WebCore::ScriptProfiler::HeapSnapshotControl::~HeapSnapshotControl):
1976         (WebCore::ScriptProfiler::takeHeapSnapshot):
1977         * bindings/v8/ScriptProfiler.cpp:
1978         (WebCore::ScriptProfiler::takeHeapSnapshot):
1979         * bindings/v8/ScriptProfiler.h:
1980         (WebCore::ScriptProfiler::HeapSnapshotControl::~HeapSnapshotControl):
1981         * inspector/Inspector.idl:
1982         * inspector/InspectorProfilerAgent.cpp:
1983         (WebCore::InspectorProfilerAgent::takeHeapSnapshot):
1984         * inspector/InspectorProfilerAgent.h:
1985         * inspector/front-end/DetailedHeapshotView.js: Added.
1986         (WebInspector.DetailedHeapshotView):
1987         (WebInspector.DetailedHeapshotView.prototype.get statusBarItems):
1988         (WebInspector.DetailedHeapshotView.prototype.get profile):
1989         (WebInspector.DetailedHeapshotView.prototype.set profile):
1990         (WebInspector.DetailedHeapshotView.prototype.show):
1991         (WebInspector.DetailedHeapshotView.prototype.hide):
1992         (WebInspector.DetailedHeapshotProfileType):
1993         (WebInspector.DetailedHeapshotProfileType.prototype.get buttonTooltip):
1994         (WebInspector.DetailedHeapshotProfileType.prototype.get buttonStyle):
1995         (WebInspector.DetailedHeapshotProfileType.prototype.buttonClicked):
1996         (WebInspector.DetailedHeapshotProfileType.prototype.get welcomeMessage):
1997         (WebInspector.DetailedHeapshotProfileType.prototype.createSidebarTreeElementForProfile):
1998         (WebInspector.DetailedHeapshotProfileType.prototype.createView):
1999         * inspector/front-end/HeapSnapshot.js: Added.
2000         (WebInspector.HeapSnapshotEdgesIterator):
2001         (WebInspector.HeapSnapshotEdgesIterator.prototype.get done):
2002         (WebInspector.HeapSnapshotEdgesIterator.prototype.get isElement):
2003         (WebInspector.HeapSnapshotEdgesIterator.prototype.get isHidden):
2004         (WebInspector.HeapSnapshotEdgesIterator.prototype.get name):
2005         (WebInspector.HeapSnapshotEdgesIterator.prototype.next):
2006         (WebInspector.HeapSnapshotEdgesIterator.prototype.get node):
2007         (WebInspector.HeapSnapshotEdgesIterator.prototype.get nodeIndex):
2008         (WebInspector.HeapSnapshotEdgesIterator.prototype._getNameOrIndex):
2009         (WebInspector.HeapSnapshotEdgesIterator.prototype._getType):
2010         (WebInspector.HeapSnapshotNodeWrapper):
2011         (WebInspector.HeapSnapshotNodeWrapper.prototype.get edges):
2012         (WebInspector.HeapSnapshotNodeWrapper.prototype.get edgesCount):
2013         (WebInspector.HeapSnapshotNodeWrapper.prototype.get instancesCount):
2014         (WebInspector.HeapSnapshotNodeWrapper.prototype.get isHidden):
2015         (WebInspector.HeapSnapshotNodeWrapper.prototype.get name):
2016         (WebInspector.HeapSnapshotNodeWrapper.prototype.get selfSize):
2017         (WebInspector.HeapSnapshotNodeWrapper.prototype._getName):
2018         (WebInspector.HeapSnapshotNodeWrapper.prototype._getEdges):
2019         (WebInspector.HeapSnapshotNodeWrapper.prototype._getType):
2020         (WebInspector.HeapSnapshot):
2021         (WebInspector.HeapSnapshot.prototype._init):
2022         (WebInspector.HeapSnapshot.prototype.get rootEdges):
2023         * inspector/front-end/HeapSnapshotView.js:
2024         (WebInspector.HeapSnapshotProfileType.prototype.buttonClicked):
2025         * inspector/front-end/ProfilesPanel.js:
2026         (WebInspector.ProfilesPanel.prototype._setRecordingProfile):
2027         (WebInspector.ProfilesPanel.prototype._reportHeapSnapshotProgress):
2028         (WebInspector.ProfilerDispatcher.prototype.setRecordingProfile):
2029         (WebInspector.ProfilerDispatcher.prototype.reportHeapSnapshotProgress):
2030         * inspector/front-end/Settings.js:
2031         * inspector/front-end/WebKit.qrc:
2032         * inspector/front-end/inspector.html:
2033         * inspector/front-end/inspector.js:
2034         (WebInspector._createPanels):
2035
2036 2011-01-25  Yury Semikhatsky  <yurys@chromium.org>
2037
2038         Reviewed by Pavel Feldman.
2039
2040         Web Inspector: remove "attached" state related methods from InspectorAgent
2041         https://bugs.webkit.org/show_bug.cgi?id=53086
2042
2043         * WebCore.exp.in:
2044         * inspector/InspectorAgent.cpp:
2045         * inspector/InspectorAgent.h:
2046         * inspector/InspectorFrontendClientLocal.cpp:
2047         (WebCore::InspectorFrontendClientLocal::changeAttachedWindowHeight):
2048         (WebCore::InspectorFrontendClientLocal::restoreAttachedWindowHeight):
2049         * inspector/InspectorSettings.cpp:
2050         (WebCore::InspectorSettings::InspectorSettings):
2051         * inspector/InspectorSettings.h:
2052
2053 2011-01-25  Qi Zhang  <qi.2.zhang@nokia.com>
2054
2055         Reviewed by Laszlo Gombos.
2056
2057         [Symbian] RVCT fails to compile [U|I]nt[8|16|32]Array.h
2058         https://bugs.webkit.org/show_bug.cgi?id=51873
2059         
2060         Replace the using declaration, because it doesn't compile on RVCT, and WINSCW has the same issue.
2061         No new functionality so no new tests.
2062
2063         * html/canvas/Int32Array.h:
2064         (WebCore::Int32Array::set):
2065         * html/canvas/Int8Array.h:
2066         (WebCore::Int8Array::set):
2067         * html/canvas/Uint16Array.h:
2068         (WebCore::Uint16Array::set):
2069         * html/canvas/Uint32Array.h:
2070         (WebCore::Uint32Array::set):
2071         * html/canvas/Uint8Array.h:
2072         (WebCore::Uint8Array::set):
2073
2074 2011-01-25  Zoltan Herczeg  <zherczeg@webkit.org>
2075
2076         Reviewed by Dirk Schulze.
2077
2078         Repaint SVG elements with filter instead of relayout where possible
2079         https://bugs.webkit.org/show_bug.cgi?id=52200
2080
2081         This patch allows repainting of filters, when their
2082         attribute changes does not require relayout.
2083
2084         Existing dynamic-update tests cover this feature.
2085
2086         * platform/graphics/filters/FilterEffect.cpp:
2087         (WebCore::FilterEffect::clearResult): Clearing the currently stored image
2088         before repainting.
2089         * platform/graphics/filters/FilterEffect.h:
2090         * rendering/RenderObject.h:
2091         (WebCore::RenderObject::isSVGResourceFilter): Not only the filter primitives,
2092         but filters should also be detected to allow safe testing and casting.
2093         * rendering/svg/RenderSVGResourceFilter.cpp:
2094         (WebCore::RenderSVGResourceFilter::buildPrimitives): Passing the renderer.
2095         (WebCore::RenderSVGResourceFilter::applyResource):
2096         determineFilterPrimitiveSubregion does not require the filter anymore.
2097         (WebCore::RenderSVGResourceFilter::postApplyResource): Repaint
2098         if lastEffect->hasResult() is false.
2099         (WebCore::RenderSVGResourceFilter::primitiveAttributeChanged):
2100         Searching for all FilterEffects, whose created by the current FilterElement,
2101         and clearing all resulting images depending on those FilterEffects.
2102         * rendering/svg/RenderSVGResourceFilter.h:
2103         (WebCore::RenderSVGResourceFilter::isSVGResourceFilter):
2104         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
2105         (WebCore::RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion):
2106         The filter argument is unnecessary anymore. But is is still kept as a static
2107         member, since the primitive renderer still does not know about the
2108         FilterEffect objects.
2109         * rendering/svg/RenderSVGResourceFilterPrimitive.h:
2110         (WebCore::RenderSVGResourceFilterPrimitive::RenderSVGResourceFilterPrimitive):
2111         (WebCore::RenderSVGResourceFilterPrimitive::primitiveAttributeChanged):
2112         Calls RenderSVGResourceFilter::primitiveAttributeChanged.
2113         * svg/SVGFEDiffuseLightingElement.cpp:
2114         (WebCore::SVGFEDiffuseLightingElement::setFilterEffectAttribute):
2115         Setting the new attribute value for each FilterEffect.
2116         (WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged):
2117         * svg/SVGFEDiffuseLightingElement.h:
2118         Calling primitiveAttributeChanged.
2119         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
2120         (WebCore::SVGFilterPrimitiveStandardAttributes::setFilterEffectAttribute):
2121         This function will be removed when all FilterElement implements
2122         their setFilterEffectAttribute
2123         * svg/SVGFilterPrimitiveStandardAttributes.h:
2124         (WebCore::SVGFilterPrimitiveStandardAttributes::primitiveAttributeChanged):
2125         * svg/graphics/filters/SVGFilterBuilder.cpp:
2126         (WebCore::SVGFilterBuilder::appendEffectToEffectReferences): The
2127         renderers are assigned to the filter effects.
2128         (WebCore::SVGFilterBuilder::clearEffects):
2129         (WebCore::SVGFilterBuilder::clearResultsRecursive): Recursively
2130         clearing the result images for those filters, whose depend on
2131         the starting filter.
2132         * svg/graphics/filters/SVGFilterBuilder.h:
2133         (WebCore::SVGFilterBuilder::effectReferences): 'get' is unnecessary
2134         (WebCore::SVGFilterBuilder::effectByRenderer): returns the
2135         FilterEffect belongs to this RenderObject.
2136
2137 2011-01-25  Dirk Schulze  <krit@webkit.org>
2138
2139         Reviewed by Nikolas Zimmermann.
2140
2141         SVG is missing to-animation support for Path
2142         https://bugs.webkit.org/show_bug.cgi?id=52982
2143
2144         SVG was missing 'to' animation support for SVG paths. Even the fallback to discrete
2145         animation did not work and an assert was thrown, because of the missing m_fromPath.
2146         This also influences a test of the W3C test suite. Subtest 2 of animate-elem-83-t.svg passes now.
2147
2148         Test: svg/animations/animate-path-to-animation.html
2149
2150         * svg/SVGAnimateElement.cpp:
2151         (WebCore::SVGAnimateElement::calculateAnimatedValue): Take the value of the last SVGAnimateElement for
2152         m_fromPath, since 'to' animations are accumulative.
2153         (WebCore::SVGAnimateElement::calculateFromAndToValues): Added support for 'to' animations.
2154         (WebCore::SVGAnimateElement::resetToBaseValue): Set m_animatedPath on the first animation element to baseVal.
2155         * svg/SVGPathByteStream.h:
2156         (WebCore::SVGPathByteStream::copySVGPathByteStream): Return copy of current byte stream.
2157
2158 2011-01-25  Pavel Feldman  <pfeldman@chromium.org>
2159
2160         Reviewed by Yury Semikhatsky.
2161
2162         Web Inspector: bind resources to URLs upon adding them into the tree.
2163         https://bugs.webkit.org/show_bug.cgi?id=53013
2164
2165         * inspector/front-end/AuditRules.js:
2166         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.evalCallback.selectorsCallback):
2167         * inspector/front-end/CSSStyleModel.js:
2168         (WebInspector.CSSStyleModel.prototype._styleSheetChanged.callback):
2169         (WebInspector.CSSStyleModel.prototype._styleSheetChanged):
2170         * inspector/front-end/DebuggerModel.js:
2171         (WebInspector.DebuggerModel.prototype._parsedScriptSource):
2172         * inspector/front-end/NetworkManager.js:
2173         (WebInspector.NetworkManager.prototype._processCachedResources):
2174         (WebInspector.NetworkManager.prototype.inflightResourceForURL):
2175         (WebInspector.NetworkDispatcher):
2176         (WebInspector.NetworkDispatcher.prototype.willSendRequest):
2177         (WebInspector.NetworkDispatcher.prototype.markResourceAsCached):
2178         (WebInspector.NetworkDispatcher.prototype.didReceiveResponse):
2179         (WebInspector.NetworkDispatcher.prototype.didReceiveContentLength):
2180         (WebInspector.NetworkDispatcher.prototype.didFinishLoading):
2181         (WebInspector.NetworkDispatcher.prototype.didFailLoading):
2182         (WebInspector.NetworkDispatcher.prototype.willSendWebSocketHandshakeRequest):
2183         (WebInspector.NetworkDispatcher.prototype.didReceiveWebSocketHandshakeResponse):
2184         (WebInspector.NetworkDispatcher.prototype.didCloseWebSocket):
2185         (WebInspector.NetworkDispatcher.prototype._appendRedirect):
2186         (WebInspector.NetworkDispatcher.prototype._startResource):
2187         (WebInspector.NetworkDispatcher.prototype._finishResource):
2188         (WebInspector.NetworkDispatcher.prototype._createResource):
2189         * inspector/front-end/ResourceTreeModel.js:
2190         (WebInspector.ResourceTreeModel.prototype.addResourceToFrame):
2191         (WebInspector.ResourceTreeModel.prototype._bindResourceURL):
2192         (WebInspector.ResourceTreeModel.prototype._clearResources):
2193         (WebInspector.ResourceTreeModel.prototype._unbindResourceURL):
2194         * inspector/front-end/ResourcesPanel.js:
2195         (WebInspector.ResourcesPanel.prototype.canShowSourceLine):
2196         (WebInspector.ResourcesPanel.prototype.showSourceLine):
2197         * inspector/front-end/ScriptsPanel.js:
2198         (WebInspector.ScriptsPanel.prototype._parsedScriptSource):
2199         (WebInspector.ScriptsPanel.prototype._addScript):
2200
2201 2011-01-25  Nikolas Zimmermann  <nzimmermann@rim.com>
2202
2203         Reviewed by Dirk Schulze.
2204
2205         Introduce FontMetrics abstraction
2206         https://bugs.webkit.org/show_bug.cgi?id=51456
2207
2208         Use accurate floating-point metrics for SVG Font calculations instead of casting float -> integer.
2209         This hopefully fixes differences between 32/64 bit bots.
2210
2211         Needs new layout test results for several platforms, which need to be taken from the bots landing afterwards.
2212
2213         * platform/graphics/SimpleFontData.cpp:
2214         (WebCore::SimpleFontData::SimpleFontData):
2215         (WebCore::SimpleFontData::initCharWidths):
2216
2217 2011-01-24  Pavel Podivilov  <podivilov@chromium.org>
2218
2219         Reviewed by Pavel Feldman.
2220
2221         Web Inspector: debugger and browser debugger agents should manage sticky breakpoints independently.
2222         https://bugs.webkit.org/show_bug.cgi?id=52999
2223
2224         * inspector/Inspector.idl:
2225         * inspector/InspectorAgent.cpp:
2226         (WebCore::InspectorAgent::didCommitLoad):
2227         (WebCore::InspectorAgent::enableDebugger):
2228         (WebCore::InspectorAgent::inspectedURLWithoutFragment):
2229         * inspector/InspectorAgent.h:
2230         * inspector/InspectorBrowserDebuggerAgent.cpp:
2231         (WebCore::InspectorBrowserDebuggerAgent::setAllBrowserBreakpoints):
2232         (WebCore::InspectorBrowserDebuggerAgent::inspectedURLChanged):
2233         (WebCore::InspectorBrowserDebuggerAgent::restoreStickyBreakpoint):
2234         * inspector/InspectorBrowserDebuggerAgent.h:
2235         * inspector/InspectorDebuggerAgent.cpp:
2236         (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
2237         (WebCore::InspectorDebuggerAgent::setAllJavaScriptBreakpoints):
2238         (WebCore::InspectorDebuggerAgent::inspectedURLChanged):
2239         (WebCore::InspectorDebuggerAgent::restoreBreakpoints):
2240         * inspector/InspectorDebuggerAgent.h:
2241         * inspector/InspectorState.cpp:
2242         (WebCore::InspectorState::InspectorState):
2243         * inspector/InspectorState.h:
2244         * inspector/front-end/BreakpointManager.js:
2245         (WebInspector.BreakpointManager):
2246         (WebInspector.BreakpointManager.prototype._projectChanged):
2247         (WebInspector.BreakpointManager.prototype._saveBreakpoints):
2248         (WebInspector.BreakpointManager.prototype._pushBreakpointsToBackend):
2249
2250 2011-01-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2251
2252         Reviewed by Martin Robinson.
2253
2254         [GTK] Crash in some pages containing flash
2255         https://bugs.webkit.org/show_bug.cgi?id=53016
2256
2257         Flash plugin can produce X errors that are handled by the GDK X
2258         error handler, which exits the process. Since we don't want to
2259         crash due to flash bugs, we install a custom error handler to show
2260         a warning when a X error happens without aborting.
2261
2262         * plugins/gtk/PluginPackageGtk.cpp:
2263         (WebCore::webkitgtkXError):
2264         (WebCore::PluginPackage::load):
2265
2266 2011-01-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2267
2268         Reviewed by Martin Robinson.
2269
2270         [GTK] Implement spin buttons in RenderThemeGtk
2271         https://bugs.webkit.org/show_bug.cgi?id=51454
2272
2273         Paint inner up/down buttons for spin button elements when building
2274         with GTK+ 3.x.
2275
2276         Test results will land with the GTK+ 2.x version of this patch.
2277
2278         * platform/gtk/RenderThemeGtk.h:
2279         * platform/gtk/RenderThemeGtk2.cpp:
2280         (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
2281         (WebCore::RenderThemeGtk::paintInnerSpinButton):
2282         * platform/gtk/RenderThemeGtk3.cpp:
2283         (WebCore::spinButtonArrowSize):
2284         (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
2285         (WebCore::paintSpinArrowButton):
2286         (WebCore::RenderThemeGtk::paintInnerSpinButton):
2287
2288 2011-01-24  Mihai Parparita  <mihaip@chromium.org>
2289
2290         Unreviewed. Missed move of one m_deleted use to be outside NDEBUG block
2291         in r76575.
2292
2293         * loader/cache/CachedResource.cpp:
2294         (WebCore::CachedResource::~CachedResource):
2295
2296 2011-01-24  Mihai Parparita  <mihaip@chromium.org>
2297
2298         Reviewed by Tony Chang.
2299
2300         Add runtime checks for invariants in memory cache
2301         https://bugs.webkit.org/show_bug.cgi?id=53059
2302         
2303         To help track down bug 53045, add some CRASH calls in addition to
2304         ASSERTs, so that we can track down failures in reliability bots.
2305
2306         Just some checks, no new tests necessary.
2307         
2308         * css/CSSImageValue.cpp:
2309         (WebCore::CSSImageValue::cachedImage):
2310         * loader/cache/CachedResource.h:
2311         * loader/cache/CachedResource.cpp:
2312         (WebCore::CachedResource::~CachedResource):
2313
2314 2011-01-24  Simon Fraser  <simon.fraser@apple.com>
2315
2316         Reviewed by Dan Bernstein.
2317
2318         Leaking CSSRuleDataList objects
2319         https://bugs.webkit.org/show_bug.cgi?id=53062
2320
2321         Fix leaked CSSRuleDataLists added to the m_pseudoRules hash.
2322
2323         * css/CSSStyleSelector.cpp:
2324         (WebCore::CSSRuleSet::~CSSRuleSet):
2325
2326 2011-01-24  Simon Fraser  <simon.fraser@apple.com>
2327
2328         Reviewed by Eric Seidel.
2329
2330         Refcount Images used in rendering code
2331         https://bugs.webkit.org/show_bug.cgi?id=52701
2332
2333         Change StyleImage::image(RenderObject*, const IntSize&) and
2334         CSSImageGeneratorValue::image(RenderObject*, const IntSize&) to
2335         return PassRefPtr<Image>, and adjust other code accordingly.
2336         
2337         This allows us to return one-time images, for example for CSS gradients
2338         whose appearance may change depending on factors other than the renderer
2339         and the destination size.
2340
2341         * css/CSSCanvasValue.cpp:
2342         (WebCore::CSSCanvasValue::image):
2343         * css/CSSCanvasValue.h:
2344         * css/CSSGradientValue.cpp:
2345         (WebCore::CSSGradientValue::image):
2346         * css/CSSGradientValue.h:
2347         * css/CSSImageGeneratorValue.h:
2348         * rendering/RenderBoxModelObject.cpp:
2349         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2350         (WebCore::RenderBoxModelObject::paintNinePieceImage):
2351         * rendering/RenderImage.cpp:
2352         (WebCore::RenderImage::paintReplaced):
2353         (WebCore::RenderImage::paintIntoRect):
2354         * rendering/RenderImageResource.h:
2355         (WebCore::RenderImageResource::image):
2356         * rendering/RenderImageResourceStyleImage.h:
2357         (WebCore::RenderImageResourceStyleImage::image):
2358         * rendering/RenderListMarker.cpp:
2359         (WebCore::RenderListMarker::paint):
2360         * rendering/style/StyleCachedImage.cpp:
2361         (WebCore::StyleCachedImage::image):
2362         * rendering/style/StyleCachedImage.h:
2363         * rendering/style/StyleGeneratedImage.cpp:
2364         (WebCore::StyleGeneratedImage::image):
2365         * rendering/style/StyleGeneratedImage.h:
2366         * rendering/style/StyleImage.h:
2367         * rendering/style/StylePendingImage.h:
2368         (WebCore::StylePendingImage::image):
2369         * rendering/svg/RenderSVGImage.cpp:
2370         (WebCore::RenderSVGImage::paint):
2371
2372 2011-01-24  Tony Chang  <tony@chromium.org>
2373
2374         Unreviewed, round ascent and descent to match old code.
2375
2376         * platform/graphics/chromium/SimpleFontDataLinux.cpp:
2377         (WebCore::SimpleFontData::platformInit):
2378
2379 2011-01-24  Simon Fraser  <simon.fraser@apple.com>
2380
2381         Reviewed by Chris Marrin.
2382
2383         perspective() transform function should take lengths
2384         https://bugs.webkit.org/show_bug.cgi?id=52683
2385         
2386         The argument to the perspective() transform function should
2387         be a Length, rather than a bare number. Bare numbers are still
2388         accepted (and treated as px), but this behavior is deprecated.
2389
2390         Test: animations/3d/transform-perspective.html
2391               transforms/3d/general/3dtransform-values.html
2392
2393         * css/CSSParser.cpp:
2394         (WebCore::CSSParser::parseTransform): Check the units for the perspective()
2395         function. Allow bare numbers for backwards compatibility.
2396         * css/CSSStyleSelector.cpp:
2397         (WebCore::CSSStyleSelector::createTransformOperations): Convert
2398         value to Length.
2399         * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
2400         (WebCore::clampToPostiveInteger): Helper.
2401         (WebCore::PerspectiveTransformOperation::blend): Blend via Lengths.
2402         * platform/graphics/transforms/PerspectiveTransformOperation.h:
2403         (WebCore::PerspectiveTransformOperation::create): double -> Length.
2404         (WebCore::PerspectiveTransformOperation::perspective): Ditto.
2405         (WebCore::PerspectiveTransformOperation::isIdentity): Ditto.
2406         (WebCore::PerspectiveTransformOperation::apply): Ditto.
2407         (WebCore::PerspectiveTransformOperation::PerspectiveTransformOperation): Assert
2408         that the Length is a fixed type.
2409
2410 2011-01-24  Kent Tamura  <tkent@chromium.org>
2411
2412         Reviewed by Dimitri Glazkov.
2413
2414         [Windows] Textfield <input>s have different widths.
2415         https://bugs.webkit.org/show_bug.cgi?id=48405
2416
2417         - Apply the padding override for type=text to other textfield types too.
2418         - Reset margin value of outer spin button, which is not used in Windows.
2419         - Don't add inner spin button width to the preferred text field width.
2420           Text fields should have the identical widths regardless of the
2421           existence of spin buttons.
2422
2423         Test: fast/forms/input-widths.html
2424
2425         * css/themeWin.css:
2426         (input[type="week"]):
2427         (input[type="week"]:disabled):
2428         (input[type="search"]::-webkit-search-cancel-button):
2429         (input::-webkit-outer-spin-button):
2430         * rendering/RenderTextControlSingleLine.cpp:
2431         (WebCore::RenderTextControlSingleLine::preferredContentWidth):
2432         Don't add inner spin button width to the preferred width.
2433
2434 2011-01-24  Kent Tamura  <tkent@chromium.org>
2435
2436         Reviewed by Dimitri Glazkov.
2437
2438         Some bugs of search cancel button and spin button about state change in
2439         an event handler.
2440         https://bugs.webkit.org/show_bug.cgi?id=46950
2441
2442         Fix the following problems:
2443          * Type=search field didn't release event capturing
2444          * Assertion failure when an input field with spin buttons was changed
2445            to another type on focus event.
2446          * A input field with spin button didn't release event capturing when it
2447            was changed to another type on focus event.
2448
2449         Tests: fast/forms/input-number-change-type-on-focus.html
2450                fast/forms/search-hide-cancel-on-cancel.html
2451
2452         * rendering/TextControlInnerElements.cpp:
2453         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
2454          - Make the variable 'input' RefPtr.  It makes the code simpler.
2455          - Remove visibility check on mouseup event. We should release capturing
2456            anyway because the cancel button may be invisible if JavaScript code
2457            called by the focus event removes the input value.
2458         (WebCore::SpinButtonElement::detach):
2459          - Release capturing on detach because it is possible that a spin button
2460            node is detached while it is capturing events.
2461         (WebCore::SpinButtonElement::defaultEventHandler):
2462           Take a reference to this and check renderer() after some functions which
2463           may run JavaScript code.
2464         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
2465           Make the variable 'input' RefPtr to align other functions in this file.
2466         (WebCore::InputFieldSpeechButtonElement::setRecognitionResult): ditto.
2467         * rendering/TextControlInnerElements.h: Declare SpinButtonElement::detach().
2468
2469 2011-01-24  Ryosuke Niwa  <rniwa@webkit.org>
2470
2471         Reviewed by Ojan Vafai.
2472
2473         Inserting multiple whitespace using text composition (IME) should insert interleaved nbsp and whitespace.
2474         https://bugs.webkit.org/show_bug.cgi?id=52781
2475
2476         The bug was caused by stringWithRebalancedWhitespace's replacing the space at the beginning of a paragraph
2477         and the end of a paragraph by a non-breaking space after it replaced two consecutive spaces by a space and
2478         non-breaking space pattern, thereby replacing more spaces by non-breaking spaces than needed.
2479
2480         Rewrote the function using Vector<UChar> to fix the bug. New function no longer calls String::replace
2481         multiple times but instead it traverses through the string and replaces a space that immediately follows
2482         another space or appears at the beginning of a paragraph or at the end of a paragraph by a non-break space.
2483
2484         * editing/CompositeEditCommand.cpp:
2485         * editing/htmlediting.cpp:
2486         (WebCore::stringWithRebalancedWhitespace): Written.
2487         * editing/htmlediting.h:
2488         (WebCore::isWhitespace): Removed from CompositeEditCommand.cpp
2489
2490 2011-01-24  Kenneth Russell  <kbr@google.com>
2491
2492         Reviewed by James Robinson.
2493
2494         Web Audio API: port FFTFrame to FFTW
2495         https://bugs.webkit.org/show_bug.cgi?id=52989
2496
2497         Ported FFTFrame class to the open-source FFTW library. Tested with
2498         unit tests from Chris Rogers. Made preliminary changes to GYP
2499         files for conditional compilation of these files; will need to be
2500         adjusted once FFTW is integrated as third-party source.
2501
2502         * WebCore.gyp/WebCore.gyp:
2503         * WebCore.gypi:
2504         * platform/audio/FFTFrame.h:
2505         * platform/audio/fftw: Added.
2506         * platform/audio/fftw/FFTFrameFFTW.cpp: Added.
2507         (WebCore::FFTFrame::FFTFrame):
2508         (WebCore::FFTFrame::~FFTFrame):
2509         (WebCore::FFTFrame::multiply):
2510         (WebCore::FFTFrame::doFFT):
2511         (WebCore::FFTFrame::doInverseFFT):
2512         (WebCore::FFTFrame::cleanup):
2513         (WebCore::FFTFrame::realData):
2514         (WebCore::FFTFrame::imagData):
2515         (WebCore::FFTFrame::fftwPlanForSize):
2516
2517 2011-01-24  Anders Carlsson  <andersca@apple.com>
2518
2519         Reviewed by Dan Bernstein.
2520
2521         Reset the page scale factor on standard frame loads
2522         https://bugs.webkit.org/show_bug.cgi?id=53058
2523         <rdar://problem/8908844>
2524
2525         Add a symbol needed by WebKit2.
2526
2527         * WebCore.exp.in:
2528
2529 2011-01-24  Ryosuke Niwa  <rniwa@webkit.org>
2530
2531         Reviewed by Eric Seidel.
2532
2533         Stop instantiating legacy editing positions in InsertTextCommand, MoveSelectionCommand,
2534         ReplaceSelectionCommand, SelectionController, SpellChecker, TypingCommand, and markup.cpp
2535         https://bugs.webkit.org/show_bug.cgi?id=52676
2536
2537         Stop instantiating legacy editing positions in the following files.
2538
2539         * editing/InsertTextCommand.cpp:
2540         (WebCore::InsertTextCommand::prepareForTextInsertion):
2541         (WebCore::InsertTextCommand::performTrivialReplace):
2542         (WebCore::InsertTextCommand::input):
2543         (WebCore::InsertTextCommand::insertTab):
2544         * editing/MoveSelectionCommand.cpp:
2545         (WebCore::MoveSelectionCommand::doApply):
2546         * editing/ReplaceSelectionCommand.cpp:
2547         (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds):
2548         (WebCore::ReplaceSelectionCommand::mergeEndIfNeeded):
2549         (WebCore::ReplaceSelectionCommand::doApply):
2550         (WebCore::ReplaceSelectionCommand::shouldRemoveEndBR):
2551         (WebCore::ReplaceSelectionCommand::performTrivialReplace):
2552         * editing/SelectionController.cpp:
2553         (WebCore::SelectionController::setSelectionFromNone):
2554         * editing/SpellChecker.cpp:
2555         (WebCore::SpellChecker::didCheck):
2556         * editing/TypingCommand.cpp:
2557         (WebCore::TypingCommand::makeEditableRootEmpty):
2558         (WebCore::TypingCommand::deleteKeyPressed):
2559         (WebCore::TypingCommand::forwardDeleteKeyPressed):
2560         * editing/markup.cpp:
2561         (WebCore::StyledMarkupAccumulator::appendText):
2562         (WebCore::StyledMarkupAccumulator::serializeNodes):
2563         (WebCore::highestAncestorToWrapMarkup):
2564         (WebCore::createMarkup):
2565
2566 2011-01-24  Peter Kasting  <pkasting@google.com>
2567
2568         Reviewed by Darin Adler.
2569
2570         Roll back r67261 ("Don't fire onclick on middle clicks") due to
2571         regressions.
2572         https://bugs.webkit.org/show_bug.cgi?id=46733
2573
2574         * html/HTMLAnchorElement.cpp:
2575         (WebCore::isLinkClick):
2576         * html/HTMLInputElement.cpp:
2577         (WebCore::HTMLInputElement::preDispatchEventHandler):
2578         (WebCore::HTMLInputElement::postDispatchEventHandler):
2579         (WebCore::HTMLInputElement::defaultEventHandler):
2580         * page/EventHandler.cpp:
2581         (WebCore::EventHandler::handleMouseDoubleClickEvent):
2582         (WebCore::EventHandler::handleMouseReleaseEvent):
2583
2584 2011-01-24  Martin Robinson  <mrobinson@igalia.com>
2585
2586         Reviewed by Eric Seidel.
2587
2588         [GTK] Many DOM XHTML tests time out
2589         https://bugs.webkit.org/show_bug.cgi?id=52553
2590
2591         Properly handle the situation where a synchronous load fails before the inner
2592         event loop has started. In this case, we simply do not run the inner event loop,
2593         or else it will block indefinitely (since no GIO or libsoup callbacks will fire).
2594
2595         * platform/network/soup/ResourceHandleSoup.cpp:
2596         (WebCore::ResourceHandle::loadResourceSynchronously): Bail out of a synchronous
2597         load if it fails up front.
2598
2599 2011-01-24  Zhenyao Mo  <zmo@google.com>
2600
2601         Reviewed by Eric Seidel.
2602
2603         Cleanup WebGLGetInfo and related get*Parameter helpers in WebGLRenderingContext
2604         https://bugs.webkit.org/show_bug.cgi?id=52338
2605
2606         Removed the long/unsigned long types and corresponding get functions
2607         and use int/unsigned int instead.
2608
2609         * bindings/js/JSWebGLRenderingContextCustom.cpp:
2610         (WebCore::toJS):
2611         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
2612         (WebCore::toV8Object):
2613         * html/canvas/WebGLGetInfo.cpp:
2614         (WebCore::WebGLGetInfo::WebGLGetInfo):
2615         (WebCore::WebGLGetInfo::getInt):
2616         (WebCore::WebGLGetInfo::getUnsignedInt):
2617         * html/canvas/WebGLGetInfo.h:
2618         * html/canvas/WebGLRenderingContext.cpp:
2619         (WebCore::WebGLRenderingContext::getBufferParameter):
2620         (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter):
2621         (WebCore::WebGLRenderingContext::getParameter):
2622         (WebCore::WebGLRenderingContext::getProgramParameter):
2623         (WebCore::WebGLRenderingContext::getRenderbufferParameter):
2624         (WebCore::WebGLRenderingContext::getShaderParameter):
2625         (WebCore::WebGLRenderingContext::getTexParameter):
2626         (WebCore::WebGLRenderingContext::getUniform):
2627         (WebCore::WebGLRenderingContext::getVertexAttrib):
2628         (WebCore::WebGLRenderingContext::getIntParameter):
2629         (WebCore::WebGLRenderingContext::getUnsignedIntParameter):
2630         * html/canvas/WebGLRenderingContext.h:
2631
2632 2011-01-24  Zhenyao Mo  <zmo@google.com>
2633
2634         Reviewed by Darin Adler.
2635
2636         Remove sizeInBytes from GraphicsContext3D's various implementations
2637         https://bugs.webkit.org/show_bug.cgi?id=52339
2638
2639         * html/canvas/WebGLRenderingContext.cpp:
2640         (WebCore::WebGLRenderingContext::sizeInBytes):
2641         * platform/graphics/GraphicsContext3D.h:
2642         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2643         * platform/graphics/qt/GraphicsContext3DQt.cpp:
2644
2645 2011-01-24  Adam Roben  <aroben@apple.com>
2646
2647         Windows Production build fix
2648
2649         * WebCore.vcproj/WebCore.make: Update for move of WebCore into Source.
2650
2651 2011-01-24  Anton Muhin  <antonm@chromium.org>
2652
2653         Reviewed by Nate Chapin.
2654
2655         [v8] Refactoring: extract IntrusiveDOMWrapperMap into a seprate class and files.
2656         https://bugs.webkit.org/show_bug.cgi?id=52911
2657
2658         Plain refactoring, covered by the existing tests.
2659
2660         * WebCore.gypi: IntrusiveDOMWrapperMap.h added.
2661         * bindings/v8/DOMDataStore.cpp: IntrusiveDOMWrapperMap is moved out of DOMDataStore class.
2662         * bindings/v8/DOMDataStore.h: IntrusiveDOMWrapperMap is moved out of DOMDataStore class.
2663         * bindings/v8/IntrusiveDOMWrapperMap.h: Added.
2664         (WebCore::ChunkedTable::ChunkedTable):
2665         (WebCore::ChunkedTable::add):
2666         (WebCore::ChunkedTable::remove):
2667         (WebCore::ChunkedTable::clear):
2668         (WebCore::ChunkedTable::visit):
2669         (WebCore::ChunkedTable::Chunk::Chunk):
2670         (WebCore::ChunkedTable::clearEntries):
2671         (WebCore::ChunkedTable::visitEntries):
2672         (WebCore::IntrusiveDOMWrapperMap::IntrusiveDOMWrapperMap):
2673         (WebCore::IntrusiveDOMWrapperMap::get):
2674         (WebCore::IntrusiveDOMWrapperMap::set):
2675         (WebCore::IntrusiveDOMWrapperMap::contains):
2676         (WebCore::IntrusiveDOMWrapperMap::visit):
2677         (WebCore::IntrusiveDOMWrapperMap::removeIfPresent):
2678         (WebCore::IntrusiveDOMWrapperMap::clear):
2679         (WebCore::IntrusiveDOMWrapperMap::ChunkedTableTraits::move):
2680         (WebCore::IntrusiveDOMWrapperMap::ChunkedTableTraits::clear):
2681         (WebCore::IntrusiveDOMWrapperMap::ChunkedTableTraits::visit):
2682         * bindings/v8/StaticDOMDataStore.h: include added.
2683
2684 2011-01-24  Shane Stephens  <shanestephens@google.com>
2685
2686         Reviewed by Chris Marrin.
2687
2688         TransformationMatrix multiply operations apply operands in wrong order.
2689         https://bugs.webkit.org/show_bug.cgi?id=52780
2690
2691         Rename TranformationMatrix::multLeft into multiply (the method does a multRight,
2692         not a multLeft).
2693
2694         Remove TransformationMatrix::multiply, which was actually doing a multLeft.
2695
2696         Fix TransformationMatrix::operator* and operator*= such that the operand is
2697         applied to the right-hand side of the matrix that the method is called on.
2698         i.e., previously "a * b" used to compute "b * a", and "a *= b" used to store
2699         "b * a" in "a".  This has now been fixed so "a * b" computes "a * b" and
2700         "a *= b" stores "a * b" in "a".
2701
2702         Convert all call sites for these methods to provide operands in the correct order.
2703
2704         No new tests as patch adds no new functionality.
2705
2706         * css/WebKitCSSMatrix.cpp:
2707         (WebCore::WebKitCSSMatrix::multiply):
2708         * platform/graphics/transforms/Matrix3DTransformOperation.h:
2709         (WebCore::Matrix3DTransformOperation::apply):
2710         * platform/graphics/transforms/MatrixTransformOperation.h:
2711         (WebCore::MatrixTransformOperation::apply):
2712         * platform/graphics/transforms/TransformationMatrix.cpp:
2713         (WebCore::TransformationMatrix::scaleNonUniform):
2714         (WebCore::TransformationMatrix::scale3d):
2715         (WebCore::TransformationMatrix::rotate3d):
2716         (WebCore::TransformationMatrix::skew):
2717         (WebCore::TransformationMatrix::applyPerspective):
2718         (WebCore::TransformationMatrix::multiply):
2719         (WebCore::TransformationMatrix::recompose):
2720         * platform/graphics/transforms/TransformationMatrix.h:
2721         (WebCore::TransformationMatrix::operator*=):
2722         (WebCore::TransformationMatrix::operator*):
2723         * rendering/RenderLayer.cpp:
2724         (WebCore::transparencyClipBox):
2725         * rendering/RenderObject.cpp:
2726         (WebCore::RenderObject::getTransformFromContainer):
2727         * rendering/TransformState.cpp:
2728         (WebCore::TransformState::applyTransform):
2729         (WebCore::HitTestingTransformState::applyTransform):
2730
2731 2011-01-24  Andrei Popescu  <andreip@google.com>
2732
2733         Reviewed by Nate Chapin.
2734
2735         IndexedDatabase methods should not take arguments of type OptionsObject
2736         https://bugs.webkit.org/show_bug.cgi?id=53012
2737
2738         This patch reverts all IDB methods, except IDBDatabase::createObjectStore and
2739         IDBObjectStore::createIndex, to using a plain list of arguments instead of
2740         grouping the various parameters inside a single OptionsObject argument.
2741         This decision was made on public-webapps@w3.org mailing list.
2742
2743         We also add support (v8 only for now) for passing DOMStringList objects as arguments to native
2744         methods. The code for obtaining a DOMStringList object from a JS array of strings existed already
2745         in OptionsObject.cpp, I just copied it to V8Bindings.cpp and taught the v8 code generator how to
2746         use it.
2747
2748         * bindings/scripts/CodeGeneratorV8.pm:
2749         * bindings/v8/V8Binding.cpp:
2750         (WebCore::v8ValueToWebCoreDOMStringList):
2751         * bindings/v8/V8Binding.h:
2752         * storage/IDBDatabase.cpp:
2753         (WebCore::IDBDatabase::transaction):
2754         * storage/IDBDatabase.h:
2755         (WebCore::IDBDatabase::transaction):
2756         * storage/IDBDatabase.idl:
2757         * storage/IDBIndex.cpp:
2758         (WebCore::IDBIndex::openCursor):
2759         (WebCore::IDBIndex::openKeyCursor):
2760         * storage/IDBIndex.h:
2761         (WebCore::IDBIndex::openCursor):
2762         (WebCore::IDBIndex::openKeyCursor):
2763         * storage/IDBIndex.idl:
2764         * storage/IDBObjectStore.cpp:
2765         (WebCore::IDBObjectStore::openCursor):
2766         * storage/IDBObjectStore.h:
2767         (WebCore::IDBObjectStore::openCursor):
2768         * storage/IDBObjectStore.idl:
2769
2770 2011-01-24  Pavel Feldman  <pfeldman@chromium.org>
2771
2772         Reviewed by Yury Semikhatsky.
2773
2774         Web Inspector: extract dispatch API from network manager.
2775         https://bugs.webkit.org/show_bug.cgi?id=53009
2776
2777         * WebCore.xcodeproj/project.pbxproj:
2778         * inspector/front-end/NetworkManager.js:
2779         (WebInspector.NetworkManager):
2780         (WebInspector.NetworkManager.prototype.reset):
2781         (WebInspector.NetworkManager.prototype.requestContent):
2782         (WebInspector.NetworkManager.prototype._processCachedResources):
2783         (WebInspector.NetworkDispatcher):
2784         (WebInspector.NetworkDispatcher.prototype._updateResourceWithRequest):
2785         (WebInspector.NetworkDispatcher.prototype._updateResourceWithResponse):
2786         (WebInspector.NetworkDispatcher.prototype._updateResourceWithCachedResource):
2787         (WebInspector.NetworkDispatcher.prototype.identifierForInitialRequest):
2788         (WebInspector.NetworkDispatcher.prototype.willSendRequest):
2789         (WebInspector.NetworkDispatcher.prototype.didReceiveResponse):
2790         (WebInspector.NetworkDispatcher.prototype.didLoadResourceFromMemoryCache):
2791         (WebInspector.NetworkDispatcher.prototype.didCommitLoadForFrame):
2792         (WebInspector.NetworkDispatcher.prototype.didCreateWebSocket):
2793         (WebInspector.NetworkDispatcher.prototype._appendRedirect):
2794         (WebInspector.NetworkDispatcher.prototype._startResource):
2795         (WebInspector.NetworkDispatcher.prototype._updateResource):
2796         (WebInspector.NetworkDispatcher.prototype._finishResource):
2797         (WebInspector.NetworkDispatcher.prototype._addFramesRecursively):
2798         (WebInspector.NetworkDispatcher.prototype._dispatchEventToListeners):
2799         (WebInspector.NetworkDispatcher.prototype._createResource):
2800         * inspector/front-end/Resource.js:
2801         (WebInspector.Resource.prototype._innerRequestContent):
2802         * inspector/front-end/ResourceTreeModel.js:
2803         (WebInspector.ResourceTreeModel):
2804         (WebInspector.ResourceTreeModel.prototype.reset):
2805         (WebInspector.ResourceTreeModel.prototype.unbindResourceURL):
2806
2807 2011-01-24  Yury Semikhatsky  <yurys@chromium.org>
2808
2809         Reviewed by Pavel Feldman.
2810
2811         Web Inspector: [JSC] remove ScriptDebugServer::pageCreated
2812         https://bugs.webkit.org/show_bug.cgi?id=53007
2813
2814         It's impossible to create "provisional" inspector for pages which are
2815         not yet created so there is no need to listen for page creation in ScriptDebugServer.
2816
2817         * bindings/js/ScriptDebugServer.cpp:
2818         * bindings/js/ScriptDebugServer.h:
2819         * page/Page.cpp:
2820         (WebCore::Page::Page):
2821
2822 2011-01-24  Pavel Podivilov  <podivilov@chromium.org>
2823
2824         Reviewed by Pavel Feldman.
2825
2826         Web Inspector: [REGRESSION] AppCache view on resources panel is broken.
2827         https://bugs.webkit.org/show_bug.cgi?id=53002
2828
2829
2830         * inspector/front-end/ApplicationCacheItemsView.js:
2831         (WebInspector.ApplicationCacheItemsView.prototype._update):
2832         * inspector/front-end/DOMAgent.js:
2833         (WebInspector.ApplicationCacheDispatcher.getApplicationCachesAsync):
2834
2835 2011-01-24  Andreas Kling  <kling@webkit.org>
2836
2837         Reviewed by Kenneth Rohde Christiansen.
2838
2839         [Qt] Fix warnings about unregistering an invalid timer
2840         https://bugs.webkit.org/show_bug.cgi?id=53006
2841
2842         The ShadowBuffer's purge timer ID was initialized with 0 which lead
2843         to us calling QObject::killTimer(0), causing some qWarnings.
2844
2845         * platform/graphics/qt/ContextShadowQt.cpp:
2846         (WebCore::ShadowBuffer::ShadowBuffer):
2847         (WebCore::ShadowBuffer::schedulePurge):
2848
2849 2011-01-21  Mikhail Naganov  <mnaganov@chromium.org>
2850
2851         Reviewed by Pavel Feldman.
2852
2853         Web Inspector: [Chromium] Fix heap snapshot table sorting.
2854
2855         Fix table sorting to avoid qsort instability artefacts.
2856
2857         https://bugs.webkit.org/show_bug.cgi?id=52914
2858
2859         * inspector/front-end/HeapSnapshotView.js:
2860         (WebInspector.HeapSnapshotView.prototype._sortData):
2861         (WebInspector.HeapSnapshotDataGridList.propertyComparator.comparator):
2862         (WebInspector.HeapSnapshotDataGridList.propertyComparator):
2863
2864 2011-01-24  Mikhail Naganov  <mnaganov@chromium.org>
2865
2866         Reviewed by Yury Semikhatsky.
2867
2868         Web Inspector: Find duplicate strings in localizedStrings.js, update it.
2869
2870         https://bugs.webkit.org/show_bug.cgi?id=53005
2871
2872         * English.lproj/localizedStrings.js:
2873
2874 2011-01-24  Pavel Podivilov  <podivilov@chromium.org>
2875
2876         Unreviewed, build fix  for r76509.
2877
2878         * inspector/InspectorDebuggerAgent.cpp:
2879         (WebCore::InspectorDebuggerAgent::setBreakpoint):
2880
2881 2011-01-24  Pavel Podivilov  <podivilov@chromium.org>
2882
2883         Unreviewed, build fix  for r76509.
2884
2885         * bindings/js/ScriptDebugServer.h:
2886
2887 2011-01-24  Pavel Podivilov  <podivilov@chromium.org>
2888
2889         Reviewed by Yury Semikhatsky.
2890
2891         Web Inspector: set breakpoints by line:column.
2892         https://bugs.webkit.org/show_bug.cgi?id=52615
2893
2894         * CMakeLists.txt:
2895         * GNUmakefile.am:
2896         * WebCore.gypi:
2897         * WebCore.pro:
2898         * WebCore.vcproj/WebCore.vcproj:
2899         * WebCore.xcodeproj/project.pbxproj:
2900         * bindings/js/ScriptDebugServer.cpp:
2901         (WebCore::ScriptDebugServer::setBreakpoint):
2902         (WebCore::ScriptDebugServer::removeBreakpoint):
2903         (WebCore::ScriptDebugServer::hasBreakpoint):
2904         (WebCore::ScriptDebugServer::clearBreakpoints):
2905         * bindings/js/ScriptDebugServer.h:
2906         * bindings/v8/DebuggerScript.js:
2907         ():
2908         * bindings/v8/ScriptDebugServer.cpp:
2909         (WebCore::ScriptDebugServer::setBreakpoint):
2910         * bindings/v8/ScriptDebugServer.h:
2911         * inspector/Inspector.idl:
2912         * inspector/InspectorBrowserDebuggerAgent.cpp:
2913         (WebCore::InspectorBrowserDebuggerAgent::restoreStickyBreakpoint):
2914         * inspector/InspectorDebuggerAgent.cpp:
2915         (WebCore::InspectorDebuggerAgent::setStickyBreakpoint):
2916         (WebCore::InspectorDebuggerAgent::setBreakpoint):
2917         (WebCore::InspectorDebuggerAgent::restoreBreakpoint):
2918         (WebCore::InspectorDebuggerAgent::didParseSource):
2919         * inspector/InspectorDebuggerAgent.h:
2920         * inspector/ScriptBreakpoint.cpp: Removed.
2921         * inspector/ScriptBreakpoint.h:
2922         (WebCore::ScriptBreakpoint::ScriptBreakpoint):
2923         * inspector/front-end/Breakpoint.js:
2924         (WebInspector.Breakpoint):
2925         (WebInspector.Breakpoint.prototype.get url):
2926         * inspector/front-end/BreakpointManager.js:
2927         (WebInspector.JavaScriptBreakpoint.prototype._serializeToJSON):
2928         * inspector/front-end/DebuggerModel.js:
2929         (WebInspector.DebuggerModel.prototype.continueToLine):
2930         (WebInspector.DebuggerModel.prototype.setBreakpoint):
2931         (WebInspector.DebuggerModel.prototype._breakpointSetOnBackend):
2932         (WebInspector.DebuggerDispatcher.prototype.breakpointResolved):
2933
2934 2011-01-24  Peter Beverloo  <peter@chromium.org>
2935
2936         Reviewed by Pavel Feldman.
2937
2938         Web Inspector: recognize application/x-font-woff as a valid mime-type.
2939         https://bugs.webkit.org/show_bug.cgi?id=52977
2940
2941         No new tests.
2942
2943         * inspector/front-end/inspector.js:
2944
2945 2011-01-24  Pavel Podivilov  <podivilov@chromium.org>
2946
2947         Unreviewed, fix for r76497.
2948
2949         * inspector/front-end/ResourcesPanel.js:
2950         (WebInspector.ResourcesPanel.prototype.show):
2951
2952 2011-01-24  Andreas Kling  <kling@webkit.org>
2953
2954         Reviewed by Tor Arne Vestbø.
2955
2956         [Qt] Use rad2deg() from WTF instead of rolling our own.
2957         https://bugs.webkit.org/show_bug.cgi?id=52993
2958
2959         * platform/graphics/qt/GraphicsContextQt.cpp:
2960         (WebCore::GraphicsContext::rotate):
2961         * platform/graphics/qt/PathQt.cpp:
2962         (WebCore::Path::addArc):
2963
2964 2011-01-24  Sergio Villar Senin  <svillar@igalia.com>
2965
2966         Reviewed by Martin Robinson.
2967
2968         [Gtk] ResourceHandleSoup: do not wait for streams to close to issue didFinishLoading
2969         https://bugs.webkit.org/show_bug.cgi?id=52885
2970
2971         No new tests as it does not change functionality. We will not wait for
2972         the the input stream to close to issue didFinishLoading to
2973         WebCore. We expect a subtle performance improvement with this
2974         patch when loading complex web pages, as we wouldn't have to wait
2975         for the stream to close (which involves creating a thread among
2976         other things).
2977
2978         * platform/network/soup/ResourceHandleSoup.cpp:
2979         (WebCore::closeCallback):
2980         (WebCore::readCallback):
2981
2982 2011-01-21  Pavel Podivilov  <podivilov@chromium.org>
2983
2984         Reviewed by Pavel Feldman.
2985
2986         Web Inspector: eliminate SourceView and ScriptView classes.
2987         https://bugs.webkit.org/show_bug.cgi?id=52896
2988
2989         SourceView and ScriptView delegate everything to SourceFrame and should be eliminated.
2990
2991         * WebCore.gypi:
2992         * WebCore.vcproj/WebCore.vcproj:
2993         * inspector/front-end/GoToLineDialog.js:
2994         (WebInspector.GoToLineDialog.prototype._highlightSelectedLine):
2995         * inspector/front-end/ResourceView.js:
2996         (WebInspector.ResourceView.createResourceView):
2997         (WebInspector.ResourceView.resourceViewTypeMatchesResource):
2998         (WebInspector.SourceFrameContentProviderForResource):  Moved from SourceView.
2999         * inspector/front-end/ResourcesPanel.js:
3000         (WebInspector.ResourcesPanel.prototype.show):
3001         (WebInspector.ResourcesPanel.prototype._applyDiffMarkup):
3002         (WebInspector.FrameResourceTreeElement.prototype._errorsWarningsUpdated):
3003         * inspector/front-end/ScriptView.js: Removed.
3004         * inspector/front-end/ScriptsPanel.js:
3005         (WebInspector.ScriptsPanel.prototype._scriptSourceChanged):
3006         (WebInspector.ScriptsPanel.prototype._sourceFrameForScriptOrResource):
3007         (WebInspector.ScriptsPanel.prototype._showScriptOrResource):
3008         (WebInspector.ScriptsPanel.prototype._setPauseOnExceptions):
3009         (WebInspector.ScriptsPanel.prototype._formatScript):
3010         (WebInspector.SourceFrameContentProviderForScript): Moved from ScriptView.
3011         * inspector/front-end/SourceFrame.js:
3012         (WebInspector.SourceFrame):
3013         (WebInspector.SourceFrame.prototype.show):
3014         (WebInspector.SourceFrame.prototype.hide):
3015         (WebInspector.SourceFrame.prototype.hasContent):
3016         (WebInspector.SourceFrame.prototype._createTextViewer):
3017         (WebInspector.SourceFrame.prototype.performSearch.doFindSearchMatches):
3018         (WebInspector.SourceFrame.prototype.performSearch):
3019         * inspector/front-end/SourceView.js: Removed.
3020         * inspector/front-end/WebKit.qrc:
3021         * inspector/front-end/inspector.html:
3022
3023 2011-01-24  Andras Becsi  <abecsi@webkit.org>
3024
3025         Reviewed by Csaba Osztrogonác.
3026
3027         [Qt] Move project files into Source
3028         https://bugs.webkit.org/show_bug.cgi?id=52891
3029
3030         No new tests needed.
3031
3032         * WebCore.pri:
3033         * WebCore.pro:
3034
3035 2011-01-24  Kent Tamura  <tkent@chromium.org>
3036
3037         Unreviewed, trivial fix.
3038
3039         Fix a Chromium-only assertion failure by r76491.
3040         https://bugs.webkit.org/show_bug.cgi?id=38982
3041
3042         Separate icon loading from the FileChooser constructor in order to avoid
3043         ref() before adoptRef().
3044
3045         * platform/FileChooser.cpp:
3046         (WebCore::FileChooser::FileChooser):
3047         (WebCore::FileChooser::initialize):
3048         (WebCore::FileChooser::create):
3049         * platform/FileChooser.h:
3050
3051 2011-01-24  MORITA Hajime  <morrita@google.com>
3052
3053         Reviewed by Kent Tamura.
3054
3055         TextControlInnerElement::m_shadowParent should be removed.
3056         https://bugs.webkit.org/show_bug.cgi?id=52998
3057
3058         No new tests. No behavioral change.
3059
3060         * rendering/TextControlInnerElements.cpp:
3061         (WebCore::TextControlInnerElement::TextControlInnerElement):
3062         * rendering/TextControlInnerElements.h:
3063
3064 2011-01-24  Yury Semikhatsky  <yurys@chromium.org>
3065
3066         Reviewed by Pavel Feldman.
3067
3068         REGRESSION (r72895): console.trace crashes
3069         https://bugs.webkit.org/show_bug.cgi?id=52981
3070
3071         - Use local RefPtr variable for accessing PassRefPtr arguments to make sure the PassRefPtr has
3072         non-null value.
3073         - Use PassRefPtr for objects whos ownership is passed to the inspector.
3074
3075         * GNUmakefile.am:
3076         * WebCore.gypi:
3077         * WebCore.pro:
3078         * WebCore.vcproj/WebCore.vcproj:
3079         * WebCore.xcodeproj/project.pbxproj:
3080         * inspector/InspectorConsoleInstrumentation.h: Added. Extract inline methods called from the console into their
3081         own header to reduce compilation time of other classes that depend on the inspector instrumentation.
3082         (WebCore::InspectorInstrumentation::addMessageToConsole):
3083         (WebCore::InspectorInstrumentation::consoleCount):
3084         (WebCore::InspectorInstrumentation::startConsoleTiming):
3085         (WebCore::InspectorInstrumentation::stopConsoleTiming):
3086         (WebCore::InspectorInstrumentation::consoleMarkTimeline):
3087         (WebCore::InspectorInstrumentation::addStartProfilingMessageToConsole):
3088         (WebCore::InspectorInstrumentation::addProfile):
3089         (WebCore::InspectorInstrumentation::profilerEnabled):
3090         (WebCore::InspectorInstrumentation::getCurrentUserInitiatedProfileName):
3091         * inspector/InspectorDatabaseInstrumentation.h: Added. Extract inline methods called from the datanase code into their
3092         own header to reduce compilation time of other classes that depend on the inspector instrumentation.
3093         (WebCore::InspectorInstrumentation::didOpenDatabase):
3094         * inspector/InspectorInstrumentation.cpp:
3095         (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
3096         (WebCore::InspectorInstrumentation::consoleCountImpl):
3097         (WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
3098         (WebCore::InspectorInstrumentation::consoleMarkTimelineImpl):
3099         (WebCore::InspectorInstrumentation::addProfileImpl):
3100         (WebCore::InspectorInstrumentation::didOpenDatabaseImpl):
3101         * inspector/InspectorInstrumentation.h:
3102         * page/Console.cpp: use RefPtr local variable instead of accessing PassRefPtr argument directly.
3103         (WebCore::Console::addMessage):
3104         (WebCore::Console::trace):
3105         (WebCore::Console::count):
3106         (WebCore::Console::markTimeline):
3107         (WebCore::Console::profileEnd):
3108         (WebCore::Console::timeEnd):
3109         (WebCore::Console::group):
3110         (WebCore::Console::groupCollapsed):
3111         * storage/Database.cpp:
3112         (WebCore::Database::openDatabase):
3113
3114 2010-01-24  Kent Tamura  <tkent@chromium.org>
3115
3116         Reviewed by Darin Fisher.
3117
3118         [Chromium] Support icon loading for <input type=file>
3119         https://bugs.webkit.org/show_bug.cgi?id=38982
3120
3121         An icon data in Chromium port is represented as WebCore::Image. We
3122         don't need OS-specific code anymore.
3123
3124         * WebCore.gypi:
3125         * platform/graphics/Icon.h:
3126         (WebCore::Icon::create): Add Chromium-specific factory.
3127         * platform/graphics/chromium/IconChromium.cpp: Added.
3128         * platform/graphics/chromium/IconChromiumLinux.cpp: Removed.
3129         * platform/graphics/chromium/IconChromiumMac.cpp: Removed.
3130         * platform/graphics/chromium/IconChromiumWin.cpp: Removed.
3131         * platform/graphics/chromium/PlatformIcon.h:
3132
3133 2011-01-21  Pavel Podivilov  <podivilov@chromium.org>
3134
3135         Reviewed by Pavel Feldman.
3136
3137         Web Inspector: move search functions from SourceView to SourceFrame.
3138         https://bugs.webkit.org/show_bug.cgi?id=52895
3139
3140         This is the last step before eliminating SourceView and ScriptView since
3141         this classes just delegate everything to SourceFrame.
3142
3143         * inspector/front-end/SourceFrame.js:
3144         (WebInspector.SourceFrame.prototype.set visible):
3145         (WebInspector.SourceFrame.prototype._clearLineHighlight):
3146         (WebInspector.SourceFrame.prototype._createTextViewer):
3147         (WebInspector.SourceFrame.prototype.performSearch.doFindSearchMatches):
3148         (WebInspector.SourceFrame.prototype.performSearch):
3149         (WebInspector.SourceFrame.prototype.searchCanceled):
3150         (WebInspector.SourceFrame.prototype.jumpToFirstSearchResult):
3151         (WebInspector.SourceFrame.prototype.jumpToLastSearchResult):
3152         (WebInspector.SourceFrame.prototype.jumpToNextSearchResult):
3153         (WebInspector.SourceFrame.prototype.jumpToPreviousSearchResult):
3154         (WebInspector.SourceFrame.prototype.showingFirstSearchResult):
3155         (WebInspector.SourceFrame.prototype.showingLastSearchResult):
3156         (WebInspector.SourceFrame.prototype._jumpToSearchResult):
3157         * inspector/front-end/SourceView.js:
3158         (WebInspector.SourceView.prototype.hide):
3159         (WebInspector.SourceView.prototype.searchCanceled):
3160         (WebInspector.SourceView.prototype.performSearch):
3161         (WebInspector.SourceView.prototype.jumpToFirstSearchResult):
3162         (WebInspector.SourceView.prototype.jumpToLastSearchResult):
3163         (WebInspector.SourceView.prototype.jumpToNextSearchResult):
3164         (WebInspector.SourceView.prototype.jumpToPreviousSearchResult):
3165         (WebInspector.SourceView.prototype.showingFirstSearchResult):
3166         (WebInspector.SourceView.prototype.showingLastSearchResult):
3167         (WebInspector.SourceView.prototype.clearMessages):
3168
3169 2011-01-24  Sheriff Bot  <webkit.review.bot@gmail.com>
3170
3171         Unreviewed, rolling out r76463.
3172         http://trac.webkit.org/changeset/76463
3173         https://bugs.webkit.org/show_bug.cgi?id=52993
3174
3175         It broke canvas/philip/tests/2d.path.stroke.skew.html
3176         (Requested by Ossy on #webkit).
3177
3178         * platform/graphics/qt/GraphicsContextQt.cpp:
3179         (WebCore::GraphicsContext::rotate):
3180         * platform/graphics/qt/PathQt.cpp:
3181         (WebCore::Path::addArc):
3182
3183 2011-01-23  Andrey Kosyakov  <caseq@chromium.org>
3184
3185         Reviewed by Pavel Feldman.
3186
3187         Web Inspector: summary bar is not resized properly with the rest of network panel
3188         https://bugs.webkit.org/show_bug.cgi?id=52881
3189
3190         * inspector/front-end/NetworkPanel.js:
3191         (WebInspector.NetworkPanel.prototype.updateSidebarWidth):
3192         (WebInspector.NetworkPanel.prototype._positionSummaryBar):
3193         (WebInspector.NetworkPanel.prototype._toggleGridMode):
3194
3195 2011-01-19  MORITA Hajime  <morrita@google.com>
3196
3197         Reviewed by Ryosuke Niwa.
3198
3199         Space and tab characters "sent" by an input method give totally different results than typing them directly
3200         https://bugs.webkit.org/show_bug.cgi?id=5241
3201         
3202         * Introduced TextEvent::InputTypeComposition and TypingCommand::TextCompositionType to 
3203           distinguish text input which is originated by composition.
3204         * Generalized rebalanceWhitespaceAt() to rebalanceWhitespaceOnTextSubstring() to rebalancing 
3205           range of string on text node, instead of surrounding part of that.
3206
3207         Test: editing/inserting/insert-composition-whitespace.html
3208
3209         * dom/TextEvent.h:
3210         (WebCore::TextEvent::isComposition):
3211         * dom/TextEventInputType.h: Added TextEventInputComposition as a member of TextEvent::InputType
3212         * editing/CompositeEditCommand.cpp:
3213         (WebCore::containsOnlyWhitespace):
3214         (WebCore::CompositeEditCommand::shouldRebalanceLeadingWhitespaceFor):
3215         (WebCore::CompositeEditCommand::canRebalance):
3216         (WebCore::CompositeEditCommand::rebalanceWhitespaceAt):
3217         (WebCore::CompositeEditCommand::rebalanceWhitespaceOnTextSubstring): Added: A generalized version of rebalanceWhitespaceAt(), which takes a range inside Text string.
3218         * editing/CompositeEditCommand.h:
3219         * editing/Editor.cpp:
3220         (WebCore::Editor::insertTextForConfirmedComposition): Added.
3221         (WebCore::Editor::insertTextWithoutSendingTextEvent):
3222         (WebCore::Editor::confirmComposition): Now uses insertTextForConfirmedComposition().
3223         (WebCore::Editor::setComposition):
3224         * editing/Editor.h:
3225         * editing/InsertTextCommand.cpp:
3226         (WebCore::InsertTextCommand::input):
3227         * editing/InsertTextCommand.h:
3228         * editing/TypingCommand.cpp:
3229         (WebCore::TypingCommand::TypingCommand):
3230         (WebCore::TypingCommand::insertText):
3231         (WebCore::TypingCommand::insertTextRunWithoutNewlines):
3232         * editing/TypingCommand.h: Added TypingCommand::m_compositionType and TypingCommand::TextCompositionType
3233         (WebCore::TypingCommand::setCompositionType): Added.
3234         (WebCore::TypingCommand::create):
3235
3236 2011-01-23  Mark Rowe  <mrowe@apple.com>
3237
3238         Follow-up to r76477.
3239
3240         Fix the scripts that detect problematic code such as static initializers
3241         and destructors, weak vtables, inappropriate files in the framework wrappers,
3242         and public headers including private headers. These had all been broken
3243         since the projects were moved in to the Source directory as the paths to the
3244         scripts were not updated at that time.
3245
3246         Stop copying an IDL file in to the framework wrapper. Doing that doesn't even make sense.
3247
3248         * WebCore.xcodeproj/project.pbxproj:
3249
3250 2011-01-23  Mark Rowe  <mrowe@apple.com>
3251
3252         Build fix after r76459.
3253
3254         Static member variables or globals of types that have constructors or destructors are bad as
3255         they generate static initializers and destructors. This is code that is run either at link time
3256         when the library is loaded in to memory or at application termination time. Both of these are
3257         terrible for performance and are thus outlawed in WebKit code.
3258
3259         The typical solution is to replace the static member or global with a function that allocates
3260         the necessary variable on the heap. The variable is leaked to prevent it from being destroyed
3261         at application termination time. The DEFINE_STATIC_LOCAL macro wraps this in to a concise little
3262         package, but sadly fails to work in this case due to the type containing multiple template
3263         parameters.
3264         
3265         * inspector/InspectorInstrumentation.cpp:
3266         (WebCore::InspectorInstrumentation::inspectorAgents):
3267         * inspector/InspectorInstrumentation.h:
3268         (WebCore::InspectorInstrumentation::bindInspectorAgent):
3269         (WebCore::InspectorInstrumentation::unbindInspectorAgent):
3270         (WebCore::InspectorInstrumentation::inspectorAgentForPage):
3271
3272 2011-01-21  Vangelis Kokkevis  <vangelis@chromium.org>
3273
3274         Reviewed by Kenneth Russell.
3275
3276         [chromium] Add support for -webkit-mask properties to the
3277         accelerated compositing path.
3278         https://bugs.webkit.org/show_bug.cgi?id=49780
3279          
3280         Tests: Existing tests in LayoutTests/compositing/masks
3281
3282         * platform/graphics/chromium/ContentLayerChromium.cpp:
3283         (WebCore::ContentLayerChromium::draw):
3284         (WebCore::ContentLayerChromium::unreserveContentsTexture):
3285         (WebCore::ContentLayerChromium::bindContentsTexture):
3286         * platform/graphics/chromium/ContentLayerChromium.h:
3287         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
3288         (WebCore::GraphicsLayerChromium::setMaskLayer):
3289         * platform/graphics/chromium/GraphicsLayerChromium.h:
3290         * platform/graphics/chromium/LayerChromium.cpp:
3291         (WebCore::LayerChromium::LayerChromium):
3292         * platform/graphics/chromium/LayerChromium.h:
3293         (WebCore::LayerChromium::setMaskLayer):
3294         (WebCore::LayerChromium::maskLayer):
3295         (WebCore::LayerChromium::unreserveContentsTexture):
3296         (WebCore::LayerChromium::bindContentsTexture):
3297         * platform/graphics/chromium/LayerRendererChromium.cpp:
3298         (WebCore::LayerRendererChromium::updateLayersRecursive):
3299         * platform/graphics/chromium/LayerTexture.cpp:
3300         (WebCore::LayerTexture::bindTexture):
3301         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
3302         (WebCore::RenderSurfaceChromium::SharedValues::SharedValues):
3303         (WebCore::RenderSurfaceChromium::SharedValues::~SharedValues):
3304         (WebCore::RenderSurfaceChromium::RenderSurfaceChromium):
3305         (WebCore::RenderSurfaceChromium::draw):
3306         * platform/graphics/chromium/RenderSurfaceChromium.h:
3307         (WebCore::RenderSurfaceChromium::SharedValues::maskShaderProgram):
3308         (WebCore::RenderSurfaceChromium::SharedValues::maskShaderSamplerLocation):
3309         (WebCore::RenderSurfaceChromium::SharedValues::maskShaderMaskSamplerLocation):
3310         (WebCore::RenderSurfaceChromium::SharedValues::maskShaderMatrixLocation):
3311         (WebCore::RenderSurfaceChromium::SharedValues::maskShaderAlphaLocation):
3312
3313 2011-01-23  Patrick Gansterer  <paroga@webkit.org>
3314
3315         Reviewed by Darin Adler.
3316
3317         Use WTF::StringHasher in WebCore
3318         https://bugs.webkit.org/show_bug.cgi?id=52934
3319
3320         * loader/appcache/ApplicationCacheStorage.cpp:
3321         (WebCore::urlHostHash):
3322         * platform/LinkHash.cpp:
3323         (WebCore::visitedLinkHashInline):
3324         * platform/cf/BinaryPropertyList.cpp:
3325         (WebCore::IntegerArrayHash::hash):
3326         * platform/graphics/wx/FontPlatformDataWx.cpp:
3327         (WebCore::FontPlatformData::computeHash):
3328         * platform/network/ProtectionSpaceHash.h:
3329         (WebCore::ProtectionSpaceHash::hash):
3330
3331 2011-01-23  Patrick Gansterer  <paroga@webkit.org>
3332
3333         Reviewed by David Kilzer.
3334
3335         Add an overload to base64Encode with String output
3336         https://bugs.webkit.org/show_bug.cgi?id=50122
3337
3338         This change removes duplicated code.
3339
3340         * inspector/InspectorResourceAgent.cpp:
3341         (WebCore::InspectorResourceAgent::resourceContentBase64):
3342         * page/DOMWindow.cpp:
3343         (WebCore::DOMWindow::btoa):
3344         * platform/graphics/skia/FontCustomPlatformData.cpp:
3345         (WebCore::createUniqueFontName):
3346         * platform/graphics/win/FontCustomPlatformData.cpp:
3347         (WebCore::createUniqueFontName):
3348         * platform/graphics/wince/FontCustomPlatformData.cpp:
3349         (WebCore::createUniqueFontName):
3350         * platform/network/cf/ResourceHandleCFNet.cpp:
3351         (WebCore::encodeBasicAuthorization):
3352         * platform/network/mac/ResourceHandleMac.mm:
3353         (WebCore::encodeBasicAuthorization):
3354         * platform/text/Base64.cpp:
3355         (WebCore::base64Encode):
3356         * platform/text/Base64.h:
3357         (WebCore::base64Encode):
3358         * platform/wince/KeygenWinCE.cpp:
3359         (WebCore::WebCore::signedPublicKeyAndChallengeString):
3360
3361 2011-01-23  Patrick Gansterer  <paroga@webkit.org>
3362
3363         Reviewed by David Kilzer.
3364
3365         Add String::containsOnlyLatin1()
3366         https://bugs.webkit.org/show_bug.cgi?id=52979
3367
3368         Use String::containsOnlyLatin1() instead of isSafeToConvertCharList().
3369
3370         * page/DOMWindow.cpp:
3371         (WebCore::DOMWindow::btoa):
3372         (WebCore::DOMWindow::atob):
3373
3374 2011-01-23  Patrick Gansterer  <paroga@webkit.org>
3375
3376         Reviewed by Andreas Kling.
3377
3378         [CMake] Add missing CodeGenerator dependencies
3379         https://bugs.webkit.org/show_bug.cgi?id=52976
3380
3381         * CMakeLists.txt:
3382
3383 2011-01-23  Yael Aharon  <yael.aharon@nokia.com>
3384
3385         Reviewed by Kenneth Rohde Christiansen.
3386
3387         [Qt][Symbian] Fix --minimal build
3388         https://bugs.webkit.org/show_bug.cgi?id=52839
3389
3390         Some of the plugins' functionality is reimplemented in
3391         Symbian specific files.
3392         Some of this functionality should be compiled in even if 
3393         the guard NETSCAPE_PLUGIN_API is turned off.
3394         This patch moves that functionality out of the
3395         NETSCAPE_PLUGIN_API guard.
3396
3397         Build fix so no new tests.
3398
3399         * WebCore.pro:
3400         * plugins/symbian/PluginPackageSymbian.cpp:
3401
3402 2011-01-23  Andreas Kling  <kling@webkit.org>
3403
3404         Reviewed by Tor Arne Vestbø.
3405
3406         [Qt] Use rad2deg() from WTF instead of rolling our own.
3407
3408         * platform/graphics/qt/GraphicsContextQt.cpp:
3409         (WebCore::GraphicsContext::rotate):
3410         * platform/graphics/qt/PathQt.cpp:
3411         (WebCore::Path::addArc):
3412
3413 2011-01-23  Kenneth Rohde Christiansen <kenneth@webkit.org>
3414
3415         Reviewed by Andreas Kling.
3416
3417         Viewport meta: Always adjust device dimensions to the device pixel ratio.
3418
3419         * dom/ViewportArguments.cpp:
3420         (WebCore::computeViewportAttributes):
3421
3422 2011-01-23  Andreas Kling  <kling@webkit.org>
3423
3424         Reviewed by Kenneth Rohde Christiansen.
3425
3426         Don't scale absolute geometry specified by viewport meta tag.
3427
3428         * dom/ViewportArguments.cpp:
3429         (WebCore::computeViewportAttributes):
3430
3431 2011-01-23  Ilya Tikhonovsky  <loislo@chromium.org>
3432
3433         Unreviewed build fix.
3434
3435         Web Inspector: looks like efl doesn't regenerate InspectorBackendDispatcher.
3436
3437         Touch Inspector.idl.
3438
3439         * inspector/Inspector.idl:
3440
3441 2011-01-22  Ilya Tikhonovsky  <loislo@chromium.org>
3442
3443         Reviewed by Pavel Feldman.
3444
3445         Web Inspector: next step in splitting InspectorController.
3446
3447         Splitting InspectorController is a bit tricky process.
3448
3449         As a first step I'll do the next things:
3450         1) rename existing InspectorController to InspectorAgent;
3451         2) s/nspectorController/nspectorAgent/g everywhere in WebCore/inspector but InspectorInstrumentation;
3452         3) create a fake InspectorController derived from the InspectorAgent for the rest of WebCore and WebKit;
3453
3454         The second step is a migration of a small set of functions described in bug 52510 from InspectorAgent to InspectorController.
3455
3456         As far as the second step will have significant changes in the functions' implementation I'll do it as a separate patch.
3457
3458         https://bugs.webkit.org/show_bug.cgi?id=52955
3459
3460         * CMakeLists.txt:
3461         * GNUmakefile.am:
3462         * WebCore.exp.in:
3463         * WebCore.gypi:
3464         * WebCore.pro:
3465         * WebCore.vcproj/WebCore.vcproj:
3466         * WebCore.xcodeproj/project.pbxproj:
3467         * bindings/js/JSInjectedScriptHostCustom.cpp:
3468         (WebCore::JSInjectedScriptHost::nodeForId):
3469         (WebCore::JSInjectedScriptHost::selectDOMStorage):
3470         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
3471         (WebCore::V8InjectedScriptHost::nodeForIdCallback):
3472         * inspector/CodeGeneratorInspector.pm:
3473         * inspector/InjectedScriptHost.cpp:
3474         (WebCore::InjectedScriptHost::InjectedScriptHost):
3475         (WebCore::InjectedScriptHost::clearConsoleMessages):
3476         (WebCore::InjectedScriptHost::databaseForId):
3477         (WebCore::InjectedScriptHost::selectDatabase):
3478         (WebCore::InjectedScriptHost::selectDOMStorage):
3479         (WebCore::InjectedScriptHost::injectedScriptForMainFrame):
3480         (WebCore::InjectedScriptHost::inspectorDOMAgent):
3481         (WebCore::InjectedScriptHost::frontend):
3482         (WebCore::InjectedScriptHost::didCreateWorker):
3483         (WebCore::InjectedScriptHost::didDestroyWorker):
3484         * inspector/InjectedScriptHost.h:
3485         (WebCore::InjectedScriptHost::create):
3486         (WebCore::InjectedScriptHost::inspectorAgent):
3487         (WebCore::InjectedScriptHost::disconnectController):
3488         * inspector/InspectorAgent.cpp: Copied from Source/WebCore/inspector/InspectorController.cpp.
3489         (WebCore::InspectorAgent::InspectorAgent):
3490         (WebCore::InspectorAgent::~InspectorAgent):
3491         (WebCore::InspectorAgent::inspectedPageDestroyed):
3492         (WebCore::InspectorAgent::enabled):
3493         (WebCore::InspectorAgent::inspectorStartsAttached):
3494         (WebCore::InspectorAgent::setInspectorStartsAttached):
3495         (WebCore::InspectorAgent::setInspectorAttachedHeight):
3496         (WebCore::InspectorAgent::inspectorAttachedHeight):
3497         (WebCore::InspectorAgent::searchingForNodeInPage):
3498         (WebCore::InspectorAgent::restoreInspectorStateFromCookie):
3499         (WebCore::InspectorAgent::inspect):
3500         (WebCore::InspectorAgent::focusNode):
3501         (WebCore::InspectorAgent::highlight):
3502         (WebCore::InspectorAgent::highlightDOMNode):
3503         (WebCore::InspectorAgent::highlightFrame):
3504         (WebCore::InspectorAgent::hideHighlight):
3505         (WebCore::InspectorAgent::mouseDidMoveOverElement):
3506         (WebCore::InspectorAgent::handleMousePress):
3507         (WebCore::InspectorAgent::setInspectorFrontendClient):
3508         (WebCore::InspectorAgent::didClearWindowObjectInWorld):
3509         (WebCore::InspectorAgent::setSearchingForNode):
3510         (WebCore::InspectorAgent::connectFrontend):
3511         (WebCore::InspectorAgent::show):
3512         (WebCore::InspectorAgent::showPanel):
3513         (WebCore::InspectorAgent::close):
3514         (WebCore::InspectorAgent::disconnectFrontend):
3515         (WebCore::InspectorAgent::resourceAgent):
3516         (WebCore::InspectorAgent::releaseFrontendLifetimeAgents):
3517         (WebCore::InspectorAgent::populateScriptObjects):
3518         (WebCore::InspectorAgent::pushDataCollectedOffline):
3519         (WebCore::InspectorAgent::restoreDebugger):
3520         (WebCore::InspectorAgent::restoreProfiler):
3521         (WebCore::InspectorAgent::unbindAllResources):
3522         (WebCore::InspectorAgent::didCommitLoad):
3523         (WebCore::InspectorAgent::mainResourceFiredDOMContentEvent):
3524         (WebCore::InspectorAgent::mainResourceFiredLoadEvent):
3525         (WebCore::InspectorAgent::isMainResourceLoader):
3526         (WebCore::InspectorAgent::willSendRequest):
3527         (WebCore::InspectorAgent::ensureSettingsLoaded):
3528         (WebCore::InspectorAgent::startTimelineProfiler):
3529         (WebCore::InspectorAgent::stopTimelineProfiler):
3530         (WebCore::PostWorkerNotificationToFrontendTask::create):
3531         (WebCore::PostWorkerNotificationToFrontendTask::PostWorkerNotificationToFrontendTask):
3532         (WebCore::PostWorkerNotificationToFrontendTask::performTask):
3533         (WebCore::InspectorAgent::postWorkerNotificationToFrontend):
3534         (WebCore::InspectorAgent::didCreateWorker):
3535         (WebCore::InspectorAgent::didDestroyWorker):
3536         (WebCore::InspectorAgent::didOpenDatabase):
3537         (WebCore::InspectorAgent::getCookies):
3538         (WebCore::InspectorAgent::buildArrayForCookies):
3539         (WebCore::InspectorAgent::buildObjectForCookie):
3540         (WebCore::InspectorAgent::deleteCookie):
3541         (WebCore::InspectorAgent::didUseDOMStorage):
3542         (WebCore::InspectorAgent::didCreateWebSocket):
3543         (WebCore::InspectorAgent::willSendWebSocketHandshakeRequest):
3544         (WebCore::InspectorAgent::didReceiveWebSocketHandshakeResponse):
3545         (WebCore::InspectorAgent::didCloseWebSocket):
3546         (WebCore::InspectorAgent::isRecordingUserInitiatedProfile):
3547         (WebCore::InspectorAgent::startUserInitiatedProfiling):
3548         (WebCore::InspectorAgent::stopUserInitiatedProfiling):
3549         (WebCore::InspectorAgent::profilerEnabled):
3550         (WebCore::InspectorAgent::enableProfiler):
3551         (WebCore::InspectorAgent::disableProfiler):
3552         (WebCore::InspectorAgent::showAndEnableDebugger):
3553         (WebCore::InspectorAgent::enableDebugger):
3554         (WebCore::InspectorAgent::disableDebugger):
3555         (WebCore::InspectorAgent::resume):
3556         (WebCore::InspectorAgent::setAllBrowserBreakpoints):
3557         (WebCore::InspectorAgent::evaluateForTestInFrontend):
3558         (WebCore::InspectorAgent::didEvaluateForTestInFrontend):
3559         (WebCore::quadToPath):
3560         (WebCore::drawOutlinedQuad):
3561         (WebCore::drawOutlinedQuadWithClip):
3562         (WebCore::drawHighlightForBox):
3563         (WebCore::drawHighlightForLineBoxesOrSVGRenderer):
3564         (WebCore::convertFromFrameToMainFrame):
3565         (WebCore::frameToMainFrameOffset):
3566         (WebCore::InspectorAgent::drawNodeHighlight):
3567         (WebCore::InspectorAgent::drawElementTitle):
3568         (WebCore::InspectorAgent::openInInspectedWindow):
3569         (WebCore::InspectorAgent::addScriptToEvaluateOnLoad):
3570         (WebCore::InspectorAgent::removeAllScriptsToEvaluateOnLoad):
3571         (WebCore::InspectorAgent::setInspectorExtensionAPI):
3572         (WebCore::InspectorAgent::inspectedURL):
3573         (WebCore::InspectorAgent::reloadPage):
3574         (WebCore::InspectorAgent::setExtraHeaders):
3575         * inspector/InspectorAgent.h: Copied from Source/WebCore/inspector/InspectorController.h.
3576         (WebCore::InspectorAgent::inspectorBackendDispatcher):
3577         (WebCore::InspectorAgent::inspectorClient):
3578         (WebCore::InspectorAgent::injectedScriptHost):
3579         (WebCore::InspectorAgent::inspectedPage):
3580         (WebCore::InspectorAgent::hideDOMNodeHighlight):
3581         (WebCore::InspectorAgent::hideFrameHighlight):
3582         (WebCore::InspectorAgent::frontend):
3583         (WebCore::InspectorAgent::inspectorController):
3584         (WebCore::InspectorAgent::inspectorAgent):
3585         (WebCore::InspectorAgent::consoleAgent):
3586         (WebCore::InspectorAgent::cssAgent):
3587         (WebCore::InspectorAgent::domAgent):
3588         (WebCore::InspectorAgent::injectedScriptAgent):
3589         (WebCore::InspectorAgent::runtimeAgent):
3590         (WebCore::InspectorAgent::timelineAgent):
3591         (WebCore::InspectorAgent::databaseAgent):
3592         (WebCore::InspectorAgent::domStorageAgent):
3593         (WebCore::InspectorAgent::fileSystemAgent):
3594         (WebCore::InspectorAgent::browserDebuggerAgent):
3595         (WebCore::InspectorAgent::debuggerAgent):
3596         (WebCore::InspectorAgent::profilerAgent):
3597         (WebCore::InspectorAgent::applicationCacheAgent):
3598         (WebCore::InspectorAgent::hasInspectorFrontendClient):
3599         (WebCore::InspectorAgent::hasFrontend):
3600         (WebCore::InspectorAgent::startProfiling):
3601         (WebCore::InspectorAgent::stopProfiling):
3602         (WebCore::InspectorAgent::debuggerEnabled):
3603         (WebCore::InspectorAgent::state):
3604         (WebCore::InspectorAgent::settings):
3605         * inspector/InspectorApplicationCacheAgent.cpp:
3606         (WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent):
3607         (WebCore::InspectorApplicationCacheAgent::getApplicationCaches):
3608         * inspector/InspectorApplicationCacheAgent.h:
3609         * inspector/InspectorBrowserDebuggerAgent.cpp:
3610         (WebCore::InspectorBrowserDebuggerAgent::InspectorBrowserDebuggerAgent):
3611         (WebCore::InspectorBrowserDebuggerAgent::inspectedURLChanged):
3612         (WebCore::InspectorBrowserDebuggerAgent::restoreStickyBreakpoint):
3613         (WebCore::InspectorBrowserDebuggerAgent::setDOMBreakpoint):
3614         (WebCore::InspectorBrowserDebuggerAgent::removeDOMBreakpoint):
3615         (WebCore::InspectorBrowserDebuggerAgent::willInsertDOMNode):
3616         (WebCore::InspectorBrowserDebuggerAgent::willRemoveDOMNode):
3617         (WebCore::InspectorBrowserDebuggerAgent::willModifyDOMAttr):
3618         (WebCore::InspectorBrowserDebuggerAgent::descriptionForDOMEvent):
3619         (WebCore::InspectorBrowserDebuggerAgent::pauseOnNativeEventIfNeeded):
3620         (WebCore::InspectorBrowserDebuggerAgent::willSendXMLHttpRequest):
3621         * inspector/InspectorBrowserDebuggerAgent.h:
3622         (WebCore::InspectorBrowserDebuggerAgent::create):
3623         * inspector/InspectorConsoleAgent.cpp:
3624         (WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
3625         (WebCore::InspectorConsoleAgent::~InspectorConsoleAgent):
3626         (WebCore::InspectorConsoleAgent::clearConsoleMessages):
3627         (WebCore::InspectorConsoleAgent::addMessageToConsole):
3628         (WebCore::InspectorConsoleAgent::resourceRetrievedByXMLHttpRequest):
3629         (WebCore::InspectorConsoleAgent::didReceiveResponse):
3630         (WebCore::InspectorConsoleAgent::didFailLoading):
3631         (WebCore::InspectorConsoleAgent::setMonitoringXHREnabled):
3632         (WebCore::InspectorConsoleAgent::setConsoleMessagesEnabled):
3633         (WebCore::InspectorConsoleAgent::addConsoleMessage):
3634         * inspector/InspectorConsoleAgent.h:
3635         * inspector/InspectorController.cpp:
3636         (WebCore::InspectorController::InspectorController):
3637         * inspector/InspectorController.h:
3638         * inspector/InspectorDatabaseAgent.cpp:
3639         * inspector/InspectorDebuggerAgent.cpp:
3640         (WebCore::InspectorDebuggerAgent::create):
3641         (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
3642         (WebCore::InspectorDebuggerAgent::~InspectorDebuggerAgent):
3643         (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
3644         (WebCore::InspectorDebuggerAgent::getCompletionsOnCallFrame):
3645         (WebCore::InspectorDebuggerAgent::currentCallFrames):
3646         * inspector/InspectorDebuggerAgent.h:
3647         * inspector/InspectorFileSystemAgent.cpp:
3648         (WebCore::InspectorFileSystemAgentCallbacks::didOpenFileSystem):
3649         (WebCore::InspectorFileSystemAgent::InspectorFileSystemAgent):
3650         (WebCore::InspectorFileSystemAgent::stop):
3651         (WebCore::InspectorFileSystemAgent::getFileSystemPathAsync):
3652         (WebCore::InspectorFileSystemAgent::didGetFileSystemPath):
3653         (WebCore::InspectorFileSystemAgent::didGetFileSystemError):
3654         * inspector/InspectorFileSystemAgent.h:
3655         (WebCore::InspectorFileSystemAgent::create):
3656         * inspector/InspectorFrontendHost.cpp:
3657         (WebCore::InspectorFrontendHost::setExtensionAPI):
3658         * inspector/InspectorProfilerAgent.cpp:
3659         (WebCore::InspectorProfilerAgent::create):
3660         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
3661         (WebCore::InspectorProfilerAgent::addProfileFinishedMessageToConsole):
3662         (WebCore::InspectorProfilerAgent::addStartProfilingMessageToConsole):
3663         (WebCore::InspectorProfilerAgent::startUserInitiatedProfiling):
3664         (WebCore::InspectorProfilerAgent::stopUserInitiatedProfiling):
3665         * inspector/InspectorProfilerAgent.h:
3666
3667 2011-01-22  Chris Rogers  <crogers@google.com>
3668
3669         Rubber-stamped by Anders Carlsson.
3670
3671         Fix FFTFrameStub to compile properly
3672         https://bugs.webkit.org/show_bug.cgi?id=52969
3673
3674         No new tests since this is a build fix.
3675
3676         * platform/audio/FFTFrameStub.cpp:
3677         (WebCore::FFTFrame::FFTFrame):
3678
3679 2011-01-22  Andrei Popescu  <andreip@google.com>
3680
3681         Reviewed by Jeremy Orlow.
3682
3683         IndexedDB corrupts data on disk
3684         https://bugs.webkit.org/show_bug.cgi?id=52890
3685
3686         We need to store the SerializedScriptValues on disk in a BLOB column rather than TEXT.
3687         Test: storage/indexeddb/data-corruption.html
3688
3689         * platform/sql/SQLiteStatement.cpp:
3690         (WebCore::SQLiteStatement::bindBlob):
3691         (WebCore::SQLiteStatement::getColumnBlobAsString):
3692         (WebCore::SQLiteStatement::getColumnBlobAsVector):
3693         * platform/sql/SQLiteStatement.h:
3694         * storage/IDBCursorBackendImpl.cpp:
3695         (WebCore::IDBCursorBackendImpl::loadCurrentRow):
3696         * storage/IDBFactoryBackendImpl.cpp:
3697         (WebCore::runCommands):
3698         (WebCore::createTables):
3699         (WebCore::createMetaDataTable):
3700         (WebCore::migrateDatabase):
3701         * storage/IDBObjectStoreBackendImpl.cpp:
3702         (WebCore::IDBObjectStoreBackendImpl::getInternal):
3703         (WebCore::putObjectStoreData):
3704
3705 2011-01-22  Nikolas Zimmermann  <nzimmermann@rim.com>
3706
3707         Not reviewed. Fix WinCE build.
3708
3709         * platform/graphics/wince/GraphicsContextWinCE.cpp:
3710         (WebCore::GraphicsContext::drawText):
3711         * rendering/RenderThemeWinCE.cpp:
3712         (WebCore::RenderThemeWinCE::adjustMenuListButtonStyle):
3713
3714 2011-01-22  Nikolas Zimmermann  <nzimmermann@rim.com>
3715
3716         Reviewed by Dirk Schulze.
3717
3718         REGRESSION: Vertical line metrics incorrect
3719         https://bugs.webkit.org/show_bug.cgi?id=52960
3720
3721         SimpleFontDataMac.mm contains a hack to modifiy lineGap/descent for the 'Hiragino' font.
3722         That didn't influence the lineSpacing so far, but does now, causing regressions.
3723
3724         Restore old line spacing behaviour to fix the regression.
3725         Covered by existing fast/blockflow, fast/repaint and fast/text/international test cases.
3726
3727         * platform/graphics/FontMetrics.h:
3728         (WebCore::FontMetrics::FontMetrics):
3729         (WebCore::FontMetrics::floatLineSpacing):
3730         (WebCore::FontMetrics::setLineSpacing):
3731         (WebCore::FontMetrics::lineSpacing):
3732         (WebCore::FontMetrics::reset):
3733         * platform/graphics/SimpleFontData.cpp:
3734         (WebCore::SimpleFontData::SimpleFontData):
3735         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
3736         (WebCore::SimpleFontData::platformInit):
3737         * platform/graphics/chromium/SimpleFontDataLinux.cpp:
3738         (WebCore::SimpleFontData::platformInit):
3739         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
3740         (WebCore::SimpleFontData::platformInit):
3741         * platform/graphics/haiku/SimpleFontDataHaiku.cpp:
3742         (WebCore::SimpleFontData::platformInit):
3743         * platform/graphics/mac/SimpleFontDataMac.mm:
3744         (WebCore::SimpleFontData::platformInit):
3745         * platform/graphics/pango/SimpleFontDataPango.cpp:
3746         (WebCore::SimpleFontData::platformInit):
3747         * platform/graphics/qt/SimpleFontDataQt.cpp:
3748         (WebCore::SimpleFontData::platformInit):
3749         * platform/graphics/win/SimpleFontDataCGWin.cpp:
3750         (WebCore::SimpleFontData::platformInit):
3751         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
3752         (WebCore::SimpleFontData::platformInit):
3753         * platform/graphics/win/SimpleFontDataWin.cpp:
3754         (WebCore::SimpleFontData::initGDIFont):
3755         * platform/graphics/wince/SimpleFontDataWinCE.cpp:
3756         (WebCore::SimpleFontData::platformInit):
3757         * platform/graphics/wx/SimpleFontDataWx.cpp:
3758         (WebCore::SimpleFontData::platformInit):
3759
3760 2011-01-22  Andreas Kling  <kling@webkit.org>
3761
3762         Reviewed by Kenneth Rohde Christiansen.
3763
3764         [Qt] fast/backgrounds/svg-as-mask.html fails
3765         https://bugs.webkit.org/show_bug.cgi?id=52906
3766
3767         Transparency layers should start out with in SourceOver mode with
3768         alpha 1.0 (modeled after CGContextBeginTransparencyLayer.)
3769
3770         * platform/graphics/qt/TransparencyLayer.h:
3771         (WebCore::TransparencyLayer::TransparencyLayer):
3772
3773 2011-01-22  Nikolas Zimmermann  <nzimmermann@rim.com>
3774
3775         Not reviewed.
3776
3777         Introduce FontMetrics abstraction
3778         https://bugs.webkit.org/show_bug.cgi?id=51456
3779
3780         Fix Chromium/Win build.
3781
3782         * platform/graphics/chromium/UniscribeHelperTextRun.cpp: s/->/./
3783         (WebCore::UniscribeHelperTextRun::UniscribeHelperTextRun):
3784
3785 2011-01-21  Nikolas Zimmermann  <nzimmermann@rim.com>
3786
3787         Reviewed by Dirk Schulze.
3788
3789         Introduce FontMetrics abstraction
3790         https://bugs.webkit.org/show_bug.cgi?id=51456
3791
3792         Encapsulate ascent/descent/lineHeight/lineGap methods in a single FontMetrics class, instead of
3793         having to define them in both Font & SimpleFontData. Changed to store floating point values
3794         as default, in order to get accurate information for small sized fonts. All these methods
3795         now have floating-point and integer versions. Whenever an integer variant of these functions
3796         is called, lroundf() is used to round the value.
3797
3798         This makes it possible to support small font-sizes for SVG in a follow-up patch, as well
3799         as fixing rounding issues when using SVG Fonts.
3800         
3801         Shouldn't affect existing tests.
3802
3803         * GNUmakefile.am: Add FontMetrics.h to build. 
3804         * WebCore.gypi: Ditto.
3805         * WebCore.pro: Ditto.
3806         * WebCore.vcproj/WebCore.vcproj: Ditto.
3807         * WebCore.xcodeproj/project.pbxproj: Ditto.
3808         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: Use style->fontMetrics() instead of style->font() to access the metrics.
3809         (baselinePositionForAccessibilityRenderObject):
3810         * css/CSSPrimitiveValue.cpp:         
3811         (WebCore::CSSPrimitiveValue::computeLengthDouble):
3812         * html/canvas/CanvasRenderingContext2D.cpp: Ditto.
3813         (WebCore::CanvasRenderingContext2D::drawTextInternal):
3814         * inspector/InspectorController.cpp: Ditto.
3815         (WebCore::InspectorController::drawElementTitle):
3816         * platform/chromium/PopupMenuChromium.cpp: Ditto.
3817         (WebCore::PopupListBox::paintRow):
3818         (WebCore::PopupListBox::getRowHeight):
3819         * platform/graphics/Font.h: Remove ascent/descent/height/lineGap/lineSpacing/xHeight/unitsPerEm accessor...
3820         (WebCore::Font::fontMetrics): ... and only expose a single FontMetrics object here.
3821         * platform/graphics/FontFastPath.cpp: Use fontMetrics() to query metrics information.
3822         (WebCore::Font::emphasisMarkAscent):
3823         (WebCore::Font::emphasisMarkDescent):
3824         (WebCore::Font::emphasisMarkHeight):
3825         (WebCore::Font::floatWidthForSimpleText):
3826         * platform/graphics/FontMetrics.h: Added.
3827         (WebCore::FontMetrics::FontMetrics): Creates a FontMetrics object, stored in SimpleFontData.
3828         (WebCore::FontMetrics::unitsPerEm): Returns an unsigned describing the unitsPerEm.
3829         (WebCore::FontMetrics::setUnitsPerEm): Sets the unitsPerEm value.
3830         (WebCore::FontMetrics::floatAscent): Returns the stored m_ascent float.
3831         (WebCore::FontMetrics::setAscent): Sets the stored m_ascent float.
3832         (WebCore::FontMetrics::floatDescent): Returns the stored m_descent float.
3833         (WebCore::FontMetrics::setDescent): Sets the stored m_descent float.
3834         (WebCore::FontMetrics::floatHeight): Returns floatAscent() + floatDescent().
3835         (WebCore::FontMetrics::floatLineGap): Returns the stored m_lineGap float.
3836         (WebCore::FontMetrics::setLineGap): Sets the stored m_lineGap float.
3837         (WebCore::FontMetrics::floatLineSpacing): Returns the stored m_lineSpacing float.
3838         (WebCore::FontMetrics::setLineSpacing): Sets the stored m_lineSpacing float.
3839         (WebCore::FontMetrics::xHeight): Returns the stored m_xHeight float (no integer version available, hence no 'float' prefix).
3840         (WebCore::FontMetrics::setXHeight): Sets the stored m_xHeight float.
3841         (WebCore::FontMetrics::ascent): Returns a rounded version of ascent().
3842         (WebCore::FontMetrics::descent): Ditto (for descent).
3843         (WebCore::FontMetrics::height): Returns ascent() + descent().
3844         (WebCore::FontMetrics::lineGap): Returns a rounded version of lineGap().
3845         (WebCore::FontMetrics::lineSpacing): Ditto (for lineSpacing).
3846         (WebCore::FontMetrics::reset): Nulls all members, used only by the platform variants of SimpleFontData.
3847         * platform/graphics/SimpleFontData.cpp: Adapt SVG Fonts code, to initialize the FontMetrics object, as the m_ascent/etc.. members are gone.
3848         (WebCore::SimpleFontData::SimpleFontData):
3849         (WebCore::SimpleFontData::initCharWidths):
3850         * platform/graphics/SimpleFontData.h: Remove ascent/descent/height/lineSpacing/lineGap/xHeight/unitsPerEm accessors, and members, just store a FontMetrics object and expose it.
3851         (WebCore::SimpleFontData::fontMetrics):
3852         (WebCore::SimpleFontData::avgCharWidth):
3853         * platform/graphics/chromium/FontChromiumWin.cpp: Use fontMetrics() to query font metrics.
3854         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::estimateTextBounds):
3855         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
3856         (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::estimateTextBounds):
3857         (WebCore::Font::drawComplexText):
3858         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp: Adapt platform code, to initialize the FontMetrics object.
3859         (WebCore::SimpleFontData::platformInit):
3860         * platform/graphics/chromium/SimpleFontDataLinux.cpp: Ditto.
3861         (WebCore::SimpleFontData::platformInit):
3862         * platform/graphics/chromium/UniscribeHelperTextRun.cpp: Use fontMetrics() to query font metrics.
3863         (WebCore::UniscribeHelperTextRun::UniscribeHelperTextRun):
3864         (WebCore::UniscribeHelperTextRun::nextWinFontData):
3865         * platform/graphics/freetype/SimpleFontDataFreeType.cpp: Adapt platform code, to initialize the FontMetrics object.
3866         (WebCore::SimpleFontData::platformInit):
3867         * platform/graphics/haiku/SimpleFontDataHaiku.cpp: Ditto.
3868         (WebCore::SimpleFontData::platformInit):
3869         * platform/graphics/mac/FontComplexTextMac.cpp: Use fontMetrics() to query font metrics.
3870         (WebCore::Font::floatWidthForComplexText):
3871         * platform/graphics/mac/FontMac.mm: Ditto.
3872         (WebCore::showGlyphsWithAdvances):
3873         * platform/graphics/mac/SimpleFontDataMac.mm: Adapt platform code, to initialize the FontMetrics object.
3874         (WebCore::SimpleFontData::platformInit):
3875         (WebCore::SimpleFontData::platformCharWidthInit):
3876         * platform/graphics/pango/SimpleFontDataPango.cpp: Ditto.
3877         (WebCore::SimpleFontData::platformInit):
3878         * platform/graphics/qt/SimpleFontDataQt.cpp: Ditto. (+ Switch to QFontMetricsF to get floating-point accurancy.)
3879         (WebCore::SimpleFontData::platformInit):
3880         * platform/graphics/win/FontCGWin.cpp: Use fontMetrics() to query font metrics.
3881         (WebCore::drawGDIGlyphs):
3882         * platform/graphics/win/FontWin.cpp: Ditto.
3883         (WebCore::Font::floatWidthForComplexText):
3884         * platform/graphics/win/SimpleFontDataCGWin.cpp: Adapt platform code, to initialize the FontMetrics object.
3885         (WebCore::SimpleFontData::platformInit):
3886         (WebCore::SimpleFontData::platformBoundsForGlyph):
3887         * platform/graphics/win/SimpleFontDataCairoWin.cpp: Ditto.
3888         (WebCore::SimpleFontData::platformInit):
3889         * platform/graphics/win/SimpleFontDataWin.cpp: Ditto.
3890         (WebCore::SimpleFontData::initGDIFont):
3891         * platform/graphics/wince/GraphicsContextWinCE.cpp: Use fontMetrics() to query font metrics.
3892         (WebCore::GraphicsContext::drawText):
3893         * platform/graphics/wince/SimpleFontDataWinCE.cpp: Adapt platform code, to initialize the FontMetrics object.
3894         (WebCore::SimpleFontData::platformInit):
3895         * platform/graphics/wx/SimpleFontDataWx.cpp: Ditto.
3896         (WebCore::SimpleFontData::platformInit):
3897         * platform/win/PopupMenuWin.cpp: Use style->fontMetrics() instead of style->font() to access the metrics.
3898         (WebCore::PopupMenuWin::calculatePositionAndSize): 
3899         (WebCore::PopupMenuWin::paint):
3900         * rendering/EllipsisBox.cpp: Ditto.
3901         (WebCore::EllipsisBox::paint):
3902         (WebCore::EllipsisBox::nodeAtPoint):
3903         * rendering/InlineBox.cpp: Ditto.
3904         (WebCore::InlineBox::logicalHeight):
3905         * rendering/InlineFlowBox.cpp: Ditto.
3906         (WebCore::verticalPositionForBox):
3907         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
3908         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
3909         * rendering/InlineTextBox.cpp: Ditto.
3910         (WebCore::InlineTextBox::paint):
3911         (WebCore::InlineTextBox::paintDecoration):
3912         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
3913         (WebCore::InlineTextBox::paintCompositionUnderline):
3914         * rendering/RenderBlock.cpp: Ditto.
3915         (WebCore::RenderBlock::baselinePosition):
3916         (WebCore::RenderBlock::firstLineBoxBaseline):
3917         (WebCore::RenderBlock::lastLineBoxBaseline):
3918         * rendering/RenderBox.cpp: Ditto.
3919         (WebCore::RenderBox::localCaretRect):
3920         * rendering/RenderEmbeddedObject.cpp: Ditto.
3921         (WebCore::RenderEmbeddedObject::paintReplaced):
3922         * rendering/RenderImage.cpp: Ditto.
3923         (WebCore::RenderImage::setImageSizeForAltText):
3924         (WebCore::RenderImage::paintReplaced):
3925         * rendering/RenderInline.cpp: Ditto.
3926         (WebCore::RenderInline::baselinePosition):
3927         * rendering/RenderListBox.cpp: Ditto.
3928         (WebCore::RenderListBox::paintItemForeground):
3929         (WebCore::RenderListBox::itemHeight):
3930         * rendering/RenderListMarker.cpp: Ditto.
3931         (WebCore::RenderListMarker::paint):
3932         (WebCore::RenderListMarker::layout):
3933         (WebCore::RenderListMarker::computePreferredLogicalWidths):
3934         (WebCore::RenderListMarker::updateMargins):
3935         (WebCore::RenderListMarker::getRelativeMarkerRect):
3936         * rendering/RenderTextControl.cpp: Ditto.
3937         (WebCore::RenderTextControl::paintPlaceholder):
3938         * rendering/RenderTextControlSingleLine.cpp: Ditto.
3939         (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
3940         * rendering/RenderThemeWin.cpp: Ditto.
3941         (WebCore::RenderThemeWin::adjustMenuListButtonStyle):
3942         * rendering/mathml/RenderMathMLFraction.cpp: Ditto.
3943         (WebCore::RenderMathMLFraction::baselinePosition):
3944         * rendering/style/RenderStyle.h: Add "const FontMetrics& fontMetrics() const" accessor.
3945         (WebCore::InheritedFlags::fontMetrics):
3946         (WebCore::InheritedFlags::computedLineHeight):
3947         * rendering/svg/RenderSVGInlineText.cpp: Use style->fontMetrics() instead of style->font() to access the metrics.
3948         (WebCore::RenderSVGInlineText::positionForPoint):
3949         * rendering/svg/SVGInlineTextBox.cpp: Ditto.
3950         (WebCore::SVGInlineTextBox::selectionRectForTextFragment):
3951         (WebCore::positionOffsetForDecoration):
3952         (WebCore::SVGInlineTextBox::paintDecorationWithStyle):
3953         (WebCore::SVGInlineTextBox::paintTextWithShadows):
3954         (WebCore::SVGInlineTextBox::calculateBoundaries):
3955         * rendering/svg/SVGTextLayoutEngineBaseline.cpp: Ditto.
3956         (WebCore::SVGTextLayoutEngineBaseline::calculateBaselineShift):
3957         (WebCore::SVGTextLayoutEngineBaseline::calculateAlignmentBaselineShift):
3958         (WebCore::SVGTextLayoutEngineBaseline::calculateGlyphAdvanceAndOrientation):
3959         * rendering/svg/SVGTextLayoutEngineSpacing.cpp: Ditto.
3960         (WebCore::SVGTextLayoutEngineSpacing::calculateSVGKerning):
3961         * rendering/svg/SVGTextMetrics.cpp: Ditto.
3962         (WebCore::SVGTextMetrics::SVGTextMetrics):
3963         * rendering/svg/SVGTextQuery.cpp: Ditto.
3964         (WebCore::calculateGlyphBoundaries):
3965         * svg/SVGFontFaceElement.cpp: 
3966         (WebCore::SVGFontFaceElement::unitsPerEm): Rename defaultUnitsPerEm global to gDefaultUnitsPerEm.
3967         * svg/SVGLength.cpp: Use style->fontMetrics() instead of style->font() to access the metrics.
3968         (WebCore::SVGLength::convertValueFromUserUnitsToEXS):
3969         (WebCore::SVGLength::convertValueFromEXSToUserUnits):
3970
3971 2011-01-22  Ryosuke Niwa  <rniwa@webkit.org>
3972
3973         Reviewed by Eric Seidel.
3974
3975         Stop instantiating legacy editing positions in VisibleSelection, visible_units.cpp, Frame, and RenderBlock
3976         https://bugs.webkit.org/show_bug.cgi?id=52759
3977
3978         Stopped instantiating legacy editing positions in the following files.
3979
3980         * editing/VisibleSelection.cpp:
3981         (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries):
3982         * editing/visible_units.cpp:
3983         (WebCore::previousBoundary):
3984         (WebCore::previousLinePosition):
3985         (WebCore::nextLinePosition):
3986         (WebCore::startOfBlock):
3987         * page/Frame.cpp:
3988         (WebCore::Frame::visiblePositionForPoint):
3989         * rendering/RenderBlock.cpp: Removed RenderBlock::positionForRenderer because it was not called anywhere.
3990         * rendering/RenderBlock.h: Ditto.
3991
3992 2011-01-22  Adrienne Walker  <enne@google.com>
3993
3994         Reviewed by James Robinson.
3995
3996         [chromium] Fix compositor repaints for offscreen fixed elements
3997         https://bugs.webkit.org/show_bug.cgi?id=52681
3998
3999         The fast path scrolling was clipping offscreen invalidations.
4000         Additionally, the compositor was ignoring all invalidations that were
4001         entirely out of the content rect.
4002
4003         Test: compositing/ to verify this caused no regressions.
4004         Tested fix manually in browser as I could not generate a LayoutTest that reproduced the bug in run-webkit-tests.
4005
4006         * page/FrameView.cpp:
4007         (WebCore::FrameView::scrollContentsFastPath):
4008         * platform/graphics/chromium/LayerRendererChromium.cpp:
4009         (WebCore::LayerRendererChromium::invalidateRootLayerRect):