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