b90505781a343541ab9b44db97ef44436dd34f53
[WebKit-https.git] / WebCore / ChangeLog
1 2010-10-18  Martin Robinson  <mrobinson@igalia.com>
2
3         Reviewed by Gustavo Noronha Silva.
4
5         [GTK] Move input type=range rendering to RenderThemeGtk
6         https://bugs.webkit.org/show_bug.cgi?id=47836
7
8         Begin moving widget rendering out of the old Mozilla theme drawing code,
9         which should remove many lines of code when completed. WidgetRenderingContext
10         now hides the GTK+ 2 vs. 3 API differences, so that RenderThemeGtk can stay
11         version agnostic.
12
13         No new tests as this patch does not change functionality.
14
15         * platform/gtk/RenderThemeGtk.cpp:
16         (WebCore::RenderThemeGtk::RenderThemeGtk): gtkContainer() now returns a
17         GtkWidget, so update the cast here.
18         (WebCore::RenderThemeGtk::getGtkStateType): Added this helper which
19         converts a RenderObject state into a GtkStateType.
20         (WebCore::RenderThemeGtk::paintRenderObject): Removed work-arounds for
21         scale painting, as it's not handled by this method any longer.
22         (WebCore::RenderThemeGtk::paintSliderTrack): Updated to use
23         WidgetRenderingContext.
24         (WebCore::RenderThemeGtk::paintSliderThumb): Ditto.
25         (WebCore::RenderThemeGtk::adjustSliderThumbSize): Get the size
26         properties directly from the widget now instead of asking the Mozilla code.
27         (WebCore::RenderThemeGtk::setupWidgetAndAddToContainer): Added this
28         helper which reduces the amount of code quite a bit.
29         (WebCore::RenderThemeGtk::gtkContainer): Updated to use helper.
30         (WebCore::RenderThemeGtk::gtkButton): Ditto.
31         (WebCore::RenderThemeGtk::gtkEntry): Ditto.
32         (WebCore::RenderThemeGtk::gtkTreeView): Ditto.
33         (WebCore::RenderThemeGtk::gtkVScale): Added.
34         (WebCore::RenderThemeGtk::gtkHScale): Added.
35         (WebCore::RenderThemeGtk::platformColorsDidChange): Removed
36         GTK_CONTAINER cast.
37         * platform/gtk/RenderThemeGtk.h: Updated to add new GtkHScale and
38          GtkVScale members.
39         * platform/gtk/WidgetRenderingContext.h: Aded new methods to proxy
40         gtk_paint_box, gtk_paint_focus and gtk_paint_slider.
41         * platform/gtk/WidgetRenderingContextGtk2.cpp:
42         (WebCore::WidgetRenderingContext::gtkPaintBox): Added.
43         (WebCore::WidgetRenderingContext::gtkPaintFocus): Ditto.
44         (WebCore::WidgetRenderingContext::gtkPaintSlider): Ditto.
45         * platform/gtk/WidgetRenderingContextGtk3.cpp:
46         (WebCore::WidgetRenderingContext::gtkPaintBox): Ditto.
47         (WebCore::WidgetRenderingContext::gtkPaintFocus): Ditto.
48         (WebCore::WidgetRenderingContext::gtkPaintSlider): Ditto.
49         * platform/gtk/gtk2drawing.c: Removed defunct code!
50         (moz_gtk_get_widget_border):
51         (moz_gtk_widget_paint):
52         * platform/gtk/gtk3drawing.c: Ditto.
53         (moz_gtk_get_widget_border):
54         (moz_gtk_widget_paint):
55         * platform/gtk/gtkdrawing.h:
56
57 2010-12-15  Sheriff Bot  <webkit.review.bot@gmail.com>
58
59         Unreviewed, rolling out r74117.
60         http://trac.webkit.org/changeset/74117
61         https://bugs.webkit.org/show_bug.cgi?id=51113
62
63         This broke the GTK1 build. (Requested by mrobinson on
64         #webkit).
65
66         * GNUmakefile.am:
67         * platform/network/soup/cache/webkit/soup-cache.h:
68
69 2010-12-15  Jian Li  <jianli@chromium.org>
70
71         Unreviewed. Fixed a clang compiling error by making the forward
72         declaration of MediaPlayerFactory be consistent with the definition.
73
74         * platform/graphics/MediaPlayer.h:
75
76 2010-12-15  David Hyatt  <hyatt@apple.com>
77
78         Reviewed by Simon Fraser.
79
80         Rename pageY to pageLogicalOffset, since for vertical writing modes it is an x-position rather than a
81         y-position.
82
83         * rendering/LayoutState.cpp:
84         (WebCore::LayoutState::pageLogicalOffset):
85         (WebCore::LayoutState::addForcedColumnBreak):
86         * rendering/LayoutState.h:
87         * rendering/RenderBlock.cpp:
88         (WebCore::RenderBlock::layoutBlock):
89         (WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
90         (WebCore::RenderBlock::layoutColumns):
91         (WebCore::RenderBlock::setPageLogicalOffset):
92         * rendering/RenderBlock.h:
93         (WebCore::RenderBlock::pageLogicalOffset):
94         (WebCore::RenderBlock::RenderBlockRareData::RenderBlockRareData):
95         * rendering/RenderFlexibleBox.cpp:
96         (WebCore::RenderFlexibleBox::layoutBlock):
97         * rendering/RenderTable.cpp:
98         (WebCore::RenderTable::layout):
99         * rendering/RenderTableRow.cpp:
100         (WebCore::RenderTableRow::layout):
101         * rendering/RenderTableSection.cpp:
102         (WebCore::RenderTableSection::layoutRows):
103
104 2010-12-13  Pavel Podivilov  <podivilov@chromium.org>
105
106         Reviewed by Pavel Feldman.
107
108         Web Inspector: move scripts storage from ScriptsPanel to DebuggerModel.
109         https://bugs.webkit.org/show_bug.cgi?id=50908
110
111         * inspector/front-end/BreakpointManager.js:
112         (WebInspector.BreakpointManager):
113         (WebInspector.BreakpointManager.prototype._debuggerPaused):
114         * inspector/front-end/CallStackSidebarPane.js:
115         (WebInspector.CallStackSidebarPane):
116         (WebInspector.CallStackSidebarPane.prototype.update):
117         * inspector/front-end/DebuggerModel.js:
118         (WebInspector.DebuggerModel):
119         (WebInspector.DebuggerModel.prototype.setBreakpoint):
120         (WebInspector.DebuggerModel.prototype._setBreakpoint):
121         (WebInspector.DebuggerModel.prototype.scriptForSourceID):
122         (WebInspector.DebuggerModel.prototype.scriptsForURL):
123         (WebInspector.DebuggerModel.prototype.queryScripts):
124         (WebInspector.DebuggerModel.prototype.parsedScriptSource):
125         (WebInspector.DebuggerModel.prototype.failedToParseScriptSource):
126         (WebInspector.DebuggerModel.prototype.breakpointRestored):
127         (WebInspector.DebuggerModel.prototype.debuggerPaused):
128         (WebInspector.DebuggerModel.prototype.debuggerResumed):
129         * inspector/front-end/Resource.js:
130         * inspector/front-end/ScriptsPanel.js:
131         (WebInspector.ScriptsPanel): eliminate sourceIDMap
132         * inspector/front-end/SourceFrame.js:
133         (WebInspector.SourceFrame.prototype._createViewerIfNeeded):
134         (WebInspector.SourceFrame.prototype._setBreakpoint):
135         * inspector/front-end/SourceView.js:
136         (WebInspector.SourceView):
137         * inspector/front-end/inspector.js:
138         (WebInspector.createJSBreakpointsSidebarPane):
139         (WebInspector.parsedScriptSource):
140         (WebInspector.failedToParseScriptSource):
141
142 2010-12-15  Eric Carlson  <eric.carlson@apple.com>
143
144         Reviewed by Darin Adler.
145
146         MediaPlayer should try all installed media engines
147         https://bugs.webkit.org/show_bug.cgi?id=50209
148
149         * platform/graphics/MediaPlayer.cpp:
150         (WebCore::bestMediaEngineForTypeAndCodecs): Rename from chooseBestEngineForTypeAndCodecs. Take optional
151         parameter for current engine. 
152         (WebCore::nextMediaEngine): New, return the next media engine in the list.
153         (WebCore::MediaPlayer::MediaPlayer): Initialize reload timer.
154         (WebCore::MediaPlayer::load): Store url, mime type, and codecs parameter in member variables.
155         (WebCore::MediaPlayer::loadWithNextMediaEngine): New, initiate loading with the next media engine.
156         (WebCore::MediaPlayer::supportsType): Make contentType parameter const.
157         (WebCore::MediaPlayer::reloadTimerFired): New, call loadWithNextMediaEngine.
158         (WebCore::MediaPlayer::networkStateChanged): If network state signals a failure and the file's
159         metadata has not loaded, give the next installed engine a try.
160         * platform/graphics/MediaPlayer.h:
161
162 2010-12-15  Amruth Raj  <amruthraj@motorola.com> and Ravi Kasibhatla  <ravi.kasibhatla@motorola.com>
163
164         Reviewed by Martin Robinson.
165
166         Changes to enable building WebKit2 for Gtk port
167         (https://bugs.webkit.org/show_bug.cgi?id=37369)
168
169         No new functionality added or deleted. Only makefile change. Hence, no tests added.
170
171         * GNUmakefile.am: Removed bindings/gobject from webcore_sources & webcore_cppflags and added them to WebKit/gtk/GNUmakefile.am
172         * platform/network/soup/cache/webkit/soup-cache.h: Remove include <webkit/webkitdefines.h> and declare WEBKIT_API directly
173
174 2010-12-15  Jarred Nicholls  <jarred@sencha.com>
175
176         Reviewed by Andreas Kling.
177
178         [Qt] Implement the File API spec
179         https://bugs.webkit.org/show_bug.cgi?id=49839
180
181         No new tests. fast/files tests work when manually operated.
182         They do not automatically work due to Qt's inability to handle multi-file
183         inputs (https://bugs.webkit.org/show_bug.cgi?id=22048) as well as Qt's DRT
184         is missing an eventSender.beginDragWithFiles implementation.
185
186         * WebCore.pri:
187         * WebCore.pro:
188         * features.pri:
189         * platform/qt/FileSystemQt.cpp:
190         (WebCore::directoryName):
191         (WebCore::readFromFile):
192         (WebCore::seekFile):
193
194 2010-12-14  Antti Koivisto  <antti@apple.com>
195
196         Reviewed by Alexey Proskuryakov.
197
198         https://bugs.webkit.org/show_bug.cgi?id=49548
199         WebCore cache stores duplicate copies of subresources with URL fragments
200         
201         - Strip fragment identifiers from HTTP and file URLs for the memory cache.
202         - Changed some CachedResourceLoader and MemoryCache interfaces to use KURLs
203           instead of strings to reduce repeated URL parsing.
204
205         Test: http/tests/cache/subresource-fragment-identifier.html
206
207         * inspector/InspectorResourceAgent.cpp:
208         (WebCore::InspectorResourceAgent::cachedResource):
209         * loader/FrameLoader.cpp:
210         (WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads):
211         * loader/cache/CachedResource.cpp:
212         (WebCore::CachedResource::~CachedResource):
213         * loader/cache/CachedResourceLoader.cpp:
214         (WebCore::CachedResourceLoader::cachedResource):
215         (WebCore::CachedResourceLoader::checkForReload):
216         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
217         (WebCore::CachedResourceLoader::requestResource):
218         * loader/cache/CachedResourceLoader.h:
219         * loader/cache/MemoryCache.cpp:
220         (WebCore::MemoryCache::requestResource):
221         (WebCore::MemoryCache::requestUserCSSStyleSheet):
222         (WebCore::MemoryCache::removeFragmentIdentifierIfNeeded):
223         (WebCore::MemoryCache::resourceForURL):
224         * loader/cache/MemoryCache.h:
225
226 2010-12-15  Anton Muhin  <antonm@chromium.org>
227
228         Reviewed by David Levin.
229
230         [v8] Next round of CSS GC story: proper grouping of CSSStyleDeclarations
231         https://bugs.webkit.org/show_bug.cgi?id=50965
232
233         * bindings/v8/V8GCController.cpp:
234         (WebCore::DOMObjectGrouperVisitor::visitDOMWrapper):
235         (WebCore::DOMObjectGrouperVisitor::addAllItems):
236
237 2010-12-13  Pavel Podivilov  <podivilov@chromium.org>
238
239         Reviewed by Yury Semikhatsky.
240
241         Web Inspector: push persistent breakpoints into backend state cookie so they hit on navigation.
242         https://bugs.webkit.org/show_bug.cgi?id=48858
243
244         BreakpointManager pushes all persistent breakpoints to backend when loaded.
245         InspectorController restores sticky breakpoints from cookie on navigation.
246
247         * inspector/Inspector.idl:
248         * inspector/InspectorController.cpp:
249         (WebCore::InspectorController::InspectorController):
250         (WebCore::InspectorController::disconnectFrontend):
251         (WebCore::InspectorController::didCommitLoad):
252         (WebCore::InspectorController::setStickyBreakpoints):
253         (WebCore::InspectorController::restoreStickyBreakpoints):
254         (WebCore::InspectorController::restoreStickyBreakpoint):
255         * inspector/InspectorController.h:
256         * inspector/InspectorState.cpp:
257         (WebCore::InspectorState::InspectorState):
258         (WebCore::InspectorState::getObject):
259         (WebCore::InspectorState::setObject):
260         (WebCore::InspectorState::registerObject):
261         * inspector/InspectorState.h:
262         * inspector/front-end/BreakpointManager.js:
263         (WebInspector.BreakpointManager):
264         * inspector/front-end/BreakpointsSidebarPane.js:
265         (WebInspector.BreakpointsSidebarPane):
266         (WebInspector.BreakpointsSidebarPane.prototype._removeListElement):
267         (WebInspector.BreakpointsSidebarPane.prototype._projectChanged):
268         (WebInspector.EventListenerBreakpointsSidebarPane):
269         (WebInspector.EventListenerBreakpointsSidebarPane.prototype._createCategory):
270         (WebInspector.EventListenerBreakpointsSidebarPane.prototype._breakpointAdded):
271         (WebInspector.EventListenerBreakpointsSidebarPane.prototype._projectChanged):
272         * inspector/front-end/CallStackSidebarPane.js:
273         (WebInspector.CallStackSidebarPane):
274         * inspector/front-end/ElementsPanel.js:
275         (WebInspector.ElementsPanel.prototype.reset):
276         * inspector/front-end/ScriptsPanel.js:
277         (WebInspector.ScriptsPanel.prototype.reset):
278         * inspector/front-end/Settings.js:
279         (WebInspector.Settings.prototype.inspectedURLChanged):
280         (WebInspector.Settings.prototype.get projectId):
281         (WebInspector.Settings.prototype.findSettingForAllProjects):
282         (WebInspector.Settings.prototype._formatProjectKey):
283         * inspector/front-end/inspector.js:
284         (WebInspector.createDOMBreakpointsSidebarPane):
285         (WebInspector.createXHRBreakpointsSidebarPane):
286         (WebInspector.reset):
287         (WebInspector.inspectedURLChanged):
288
289 2010-12-15  Mario Sanchez Prada  <msanchez@igalia.com>
290
291         Unreviewed, fix compilation warnings after r74066.
292
293         * rendering/RenderBox.cpp:
294         (WebCore::layersUseImage): Place this static function between the
295         same if-def region used in the only place where it's called from.
296
297 2010-12-15  Emil Eklund  <eae@chromium.org>
298
299         Reviewed by Adam Barth.
300
301         Change ContainerNode::willRemoveChildren to not fire mutation events for children
302         added as a result of a mutation event, thereby avoiding an infinite loop.
303         https://bugs.webkit.org/show_bug.cgi?id=51079
304
305         Test: fast/dom/containerNode.html
306
307         * dom/ContainerNode.cpp:
308         (WebCore::willRemoveChildren): Don't fire mutation events for children added during a mutation event.
309
310 2010-12-14  Dan Bernstein  <mitz@apple.com>
311
312         Reviewed by Maciej Stachowiak.
313
314         <rdar://problem/8767193> REGRESSION (r60822): caps-lock-indicator is accepted as a -webkit-appearance value
315         https://bugs.webkit.org/show_bug.cgi?id=51096
316
317         Test: fast/css/appearance-caps-lock-indicator.html
318
319         * css/CSSValueKeywords.in: Moved caps-lock-indicator outside the range of values that should be
320         accepted by the parser, and added comments about maintaining the list of appearance values.
321         * platform/ThemeTypes.h: Moved CapsLockIndicatorPart to the end of the ControlPart enum.
322
323 2010-12-14  takano takumi  <takano@apple.com>
324
325         Reviewed by Dan Bernstein.
326
327         text-combine value names have been changed in the css3 proposal.
328         https://bugs.webkit.org/show_bug.cgi?id=51089
329
330         Changed text-combine's value names from "none|cluster|upright" to "none|horizontal".
331
332         * css/CSSParser.cpp: Changed value name.
333         (WebCore::CSSParser::parseValue):
334         * css/CSSPrimitiveValueMappings.h: Changed value name.
335         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
336         (WebCore::CSSPrimitiveValue::operator TextCombine):
337         * css/CSSValueKeywords.in: No more text-combine specific values needed since
338         "horizontal" is already there.
339         * rendering/style/RenderStyleConstants.h: Changed value name.
340         * rendering/style/StyleRareNonInheritedData.h: Changed textCombine field size.
341
342 2010-12-14  Koan-Sin Tan  <koansin.tan@gmail.com>
343
344         Reviewed by Alexey Proskuryakov.
345
346         Kana should be part of CJK Ideographs in WebCore/platform/graphics/Font.cpp
347         https://bugs.webkit.org/show_bug.cgi?id=51012
348
349         Kana should be displayed correctly in vertical text with broken font.
350
351         Test: fast/blockflow/japanese-rl-text-with-broken-font.html
352
353         * platform/graphics/Font.cpp:
354         (WebCore::Font::isCJKIdeographOrSymbol): add katakana, hiraganna, and Halfwidth and Fullwidth Forms
355
356 2010-12-14  Dan Bernstein  <mitz@apple.com>
357
358         Reviewed by Sam Weinig.
359
360         Additional RenderStyle support for the text-emphasis CSS property
361         Part of <rdar://problem/7720300> Support the CSS3 text-emphasis property
362         https://bugs.webkit.org/show_bug.cgi?id=48539
363
364         No test possible, since this is just adding a function to be used by upcoming patches.
365
366         * platform/text/CharacterNames.h: Added characters used as emphasis marks.
367         * rendering/style/RenderStyle.cpp:
368         (WebCore::RenderStyle::textEmphasisMarkString): Added. Returns a string containing the
369         emphasis mark, or the null AtomicString if there is none.
370         * rendering/style/RenderStyle.h:
371
372 2010-12-14  Anton D'Auria  <adauria@apple.com>
373
374         Reviewed by Darin Adler.
375
376         Do not allow access to existing HTML5 databases in private browsing
377         mode https://bugs.webkit.org/show_bug.cgi?id=49332
378
379         Test: storage/private-browsing-noread-nowrite.html
380
381         Previously, read-only transactions and private browsing mode were
382         represented by the same SQLStatement and DatabaseAuthorizer states.
383         This patch removes the m_readOnly member variable from SQLStatement and
384         DatabaseAuthorizer, and replaces it with m_permissions whose bit fields
385         are initialized by a DatabaseAuthorizer enum Permissions (ReadWrite,
386         ReadOnly, NoAccess). A read-only transaction sets permissions to
387         ReadOnly, and if !m_database->scriptExecutionContext()->allowDatabaseAccess(),
388         then permissions also set to NoAccess.
389
390         * dom/Document.cpp:
391         (WebCore::Document::allowDatabaseAccess): this method was previously
392         called isDatabaseReadOnly. It checks if private browsing preference is
393         set. This method is renamed because it is used to check if private
394         browsing restricts access to databases.
395         * dom/Document.h:
396         * dom/ScriptExecutionContext.h:
397         * storage/AbstractDatabase.cpp:
398         (WebCore::AbstractDatabase::setAuthorizerPermissions):
399         * storage/AbstractDatabase.h:
400         * storage/DatabaseAuthorizer.cpp:
401         (WebCore::DatabaseAuthorizer::reset):
402         (WebCore::DatabaseAuthorizer::createTable):
403         (WebCore::DatabaseAuthorizer::createTempTable):
404         (WebCore::DatabaseAuthorizer::dropTable):
405         (WebCore::DatabaseAuthorizer::dropTempTable):
406         (WebCore::DatabaseAuthorizer::allowAlterTable):
407         (WebCore::DatabaseAuthorizer::createIndex):
408         (WebCore::DatabaseAuthorizer::createTempIndex):
409         (WebCore::DatabaseAuthorizer::dropIndex):
410         (WebCore::DatabaseAuthorizer::dropTempIndex):
411         (WebCore::DatabaseAuthorizer::createTrigger):
412         (WebCore::DatabaseAuthorizer::createTempTrigger):
413         (WebCore::DatabaseAuthorizer::dropTrigger):
414         (WebCore::DatabaseAuthorizer::dropTempTrigger):
415         (WebCore::DatabaseAuthorizer::createView):
416         (WebCore::DatabaseAuthorizer::createTempView):
417         (WebCore::DatabaseAuthorizer::dropView):
418         (WebCore::DatabaseAuthorizer::dropTempView):
419         (WebCore::DatabaseAuthorizer::createVTable):
420         (WebCore::DatabaseAuthorizer::dropVTable):
421         (WebCore::DatabaseAuthorizer::allowDelete):
422         (WebCore::DatabaseAuthorizer::allowInsert):
423         (WebCore::DatabaseAuthorizer::allowUpdate):
424         (WebCore::DatabaseAuthorizer::allowRead):
425         (WebCore::DatabaseAuthorizer::allowReindex):
426         (WebCore::DatabaseAuthorizer::allowWrite): a new private method that
427         checks if DatabaseAuthorizer is enabled and if it is in ReadOnly or
428         NoAccess mode.
429         (WebCore::DatabaseAuthorizer::setReadOnly):
430         (WebCore::DatabaseAuthorizer::setPermissions):
431         * storage/DatabaseAuthorizer.h:
432         * storage/SQLStatement.cpp:
433         (WebCore::SQLStatement::create):
434         (WebCore::SQLStatement::SQLStatement):
435         (WebCore::SQLStatement::execute):
436         * storage/SQLStatement.h:
437         * storage/SQLStatementSync.cpp:
438         (WebCore::SQLStatementSync::SQLStatementSync):
439         (WebCore::SQLStatementSync::execute):
440         * storage/SQLStatementSync.h:
441         * storage/SQLTransaction.cpp:
442         (WebCore::SQLTransaction::executeSQL):
443         * storage/SQLTransactionSync.cpp:
444         (WebCore::SQLTransactionSync::executeSQL):
445         * workers/WorkerContext.h:
446         (WebCore::WorkerContext::allowDatabaseAccess):
447
448 2010-12-02  MORITA Hajime  <morrita@google.com>
449
450         Reviewed by Dimitri Glazkov.
451
452         [chromium] Fix drawing of inset box shadows
453         https://bugs.webkit.org/show_bug.cgi?id=41576
454
455         When clearing outside clipped path, the context contains unexpected transform.
456         Fixed to restore original state before the clear.
457
458         * platform/graphics/skia/PlatformContextSkia.cpp:
459         (WebCore::PlatformContextSkia::clipPathAntiAliased):
460         (WebCore::PlatformContextSkia::applyAntiAliasedClipPaths):
461
462 2010-12-14  Anders Carlsson  <andersca@apple.com>
463
464         Reviewed by Sam Weinig.
465
466         Mouse Events Not Received in Run Applet in their Own Process Mode
467         https://bugs.webkit.org/show_bug.cgi?id=51078
468         <rdar://problem/8333491>
469
470         Make sure that Widget::handleEvent is called for applets as well.
471
472         * html/HTMLAppletElement.cpp:
473         (WebCore::HTMLAppletElement::defaultEventHandler):
474         * html/HTMLAppletElement.h:
475
476 2010-12-14  Simon Fraser  <simon.fraser@apple.com>
477
478         Reviewed by Chris Marrin.
479
480         Parts of page disappear
481         https://bugs.webkit.org/show_bug.cgi?id=41701
482         
483         The page has text-indent: -1000000px on an element that becomes
484         compositing, causing a huge tiled layer to get created.
485         
486         r63452 aimed to fix this by clamping layer bounds to the viewport,
487         but did not do so for pages running accelerated animations (since
488         we don't want to clamp for transform animations). However, this
489         page only has an opacity animation.
490         
491         So refine the logic added for r63452 to only call setCompositingConsultsOverlap(false)
492         for transform animations.
493
494         Test: compositing/geometry/limit-layer-bounds-opacity-transition.html
495
496         * rendering/RenderLayerBacking.cpp:
497         (WebCore::RenderLayerBacking::startAnimation): call didStartAcceleratedAnimation()
498         with the appropriate properties, and clean up confusing logic that was used to
499         compute the return value. We want to return true if either property is accelerated.
500
501         (WebCore::RenderLayerBacking::startTransition): Call didStartAcceleratedAnimation()
502         with the appropriate property.
503         
504         * rendering/RenderLayerCompositor.h:
505         * rendering/RenderLayerCompositor.cpp:
506         (WebCore::RenderLayerCompositor::didStartAcceleratedAnimation): Pass the property in,
507         and only turn off overlap testing if we see a transform animation.
508
509 2010-12-14  Brady Eidson  <beidson@apple.com>
510
511         Reviewed by Alexey Proskuryakov.
512
513         <rdar://problem/8225016> and https://bugs.webkit.org/show_bug.cgi?id=40138
514         Authorization header is sent from an HTTP Auth protected site on redirect
515         Test: http/tests/misc/authentication-sent-to-redirect.html
516
517         Add helper to clear the Auth headers from a resource request:
518         * platform/network/ResourceRequestBase.cpp:
519         (WebCore::ResourceRequestBase::clearHTTPAuthorization):
520         * platform/network/ResourceRequestBase.h:
521
522         Only Mac and Windows CFNetwork ports seem to have this problem, so plug it for them:
523         * platform/network/cf/ResourceHandleCFNet.cpp:
524         (WebCore::ResourceHandle::willSendRequest):
525         * platform/network/mac/ResourceHandleMac.mm:
526         (WebCore::ResourceHandle::willSendRequest):
527
528 2010-12-14  Simon Fraser  <simon.fraser@apple.com>
529
530         Reviewed by Chris Marrin.
531
532         Crash in WebCore::GraphicsLayer::paintGraphicsLayerContents() loading this URL
533         https://bugs.webkit.org/show_bug.cgi?id=51072
534
535         Fix a crash when painting a layer whose PlatformCALayer has been deleted,
536         by clearing the PlatformCALayer value on the CALayer when the PlatformCALayer
537         is destroyed.
538         
539         I was not able to reduce the page to a simple testcase.
540
541         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
542         (PlatformCALayer::~PlatformCALayer):
543
544 2010-12-14  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
545
546         Unreviewed, build fix.
547
548         [Qt] Fix the list of header files in WebCore.pro after r74049.
549
550         No new tests as there is no new functionality.
551
552         * WebCore.pro:
553
554 2010-12-14  Yael Aharon  <yael.aharon@nokia.com>
555
556         Reviewed by Andreas Kling.
557
558         [Qt] Focus rings are ugly, rects should be united instead of drawn individually
559         https://bugs.webkit.org/show_bug.cgi?id=49953
560
561         Create a QPainterPath and add to it the focus rects, one at a time.
562         Combine the 2 drawFocusRing functions into one function drawFocusRingForPath.
563
564         Tests: fast/css/focus-ring-detached.html
565                fast/css/focus-ring-multiline.html
566
567         * platform/graphics/qt/GraphicsContextQt.cpp:
568         (WebCore::drawFocusRingForPath):
569         (WebCore::GraphicsContext::drawFocusRing):
570
571 2010-12-14  Mark Rowe  <mrowe@apple.com>
572
573         Fix the Qt build.
574
575         * xml/XSLTProcessorQt.cpp:
576         (WebCore::XSLTProcessor::transformToString): Make the conversion to QString explicit
577         since QVariant can be constructed from either a QString or a bool.
578
579 2010-12-14  Simon Fraser  <simon.fraser@apple.com>
580
581         Reviewed by Dan Bernstein.
582
583         compositing/masks/simple-composited-mask.html failure
584         https://bugs.webkit.org/show_bug.cgi?id=49746
585
586         Geometry of composited layers with a mask depends on the loading
587         of the mask image, since maskClipRect() is used for the layer bounds.
588         
589         So when RenderBox::imageChanged() is called for an image used by
590         a mask on a layer with a composited mask, call the newly-renamed
591         layer->contentsChanged() method. This percolates down into RenderLayerBacking,
592         ending in a layer geometry update.
593         
594         Renamed RenderLayer::rendereContentsChanged() to contentsChanged() and added
595         an enum to say what changed, for somewhat more efficient updating.
596         
597         Also, when the mask layer gets resized, make sure we mark it as needing
598         display.
599         
600         Tested by pixel result of compositing/masks/simple-composited-mask.html
601
602         * html/canvas/CanvasRenderingContext2D.cpp:
603         (WebCore::CanvasRenderingContext2D::didDraw):
604         * html/canvas/WebGLRenderingContext.cpp:
605         (WebCore::WebGLRenderingContext::markContextChanged):
606         (WebCore::WebGLRenderingContext::reshape):
607         * rendering/RenderBox.cpp:
608         (WebCore::layersUseImage):
609         (WebCore::RenderBox::imageChanged):
610         * rendering/RenderImage.cpp:
611         (WebCore::RenderImage::imageDimensionsChanged):
612         (WebCore::RenderImage::notifyFinished):
613         * rendering/RenderLayer.cpp:
614         (WebCore::RenderLayer::contentChanged):
615         * rendering/RenderLayer.h:
616         * rendering/RenderLayerBacking.cpp:
617         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
618         (WebCore::RenderLayerBacking::contentChanged):
619         * rendering/RenderLayerBacking.h:
620         * rendering/RenderVideo.cpp:
621         (WebCore::RenderVideo::updatePlayer):
622
623 2010-12-14  Mark Rowe  <mrowe@apple.com>
624
625         Reviewed by Sam Weinig.
626
627         <http://webkit.org/b/51064> Reproducible crash inside WebCore::MediaPlayerPrivateQTKit::createQTMovie when loading <video>
628
629         We were crashing inside MediaPlayerPrivateQTKit::createQTMovie as we were passing a null URL in
630         to CFNetworkCopyProxiesForURL. This happened because we were null-checking the URL incorrectly.
631
632         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
633         (WebCore::MediaPlayerPrivateQTKit::resumeLoad): Explicitly test for a null string.
634
635 2010-12-14  David Hyatt  <hyatt@apple.com>
636
637         Reviewed by Dan Bernstein.
638
639         https://bugs.webkit.org/show_bug.cgi?id=50970
640         
641         It's arguably a bug, but we don't let inline flow layers paint floating
642         descendants.  The containing block of the inline flow paints them instead.
643         However our shouldPaint logic has always been flawed and has turned off propagation
644         of painting when an inline flow layer is enclosing the float.
645         
646         Change enclosingSelfPaintingLayer to enclosingFloatPaintingLayer to be more precise
647         and for now limit it to RenderBoxes. 
648         
649         Added fast/block/float/floatstack.html
650
651         * rendering/RenderBlock.cpp:
652         (WebCore::RenderBlock::addOverhangingFloats):
653         * rendering/RenderBox.cpp:
654         (WebCore::RenderBox::enclosingFloatPaintingLayer):
655         * rendering/RenderBox.h:
656         * rendering/RenderObject.cpp:
657         * rendering/RenderObject.h:
658
659 2010-12-14  Mihai Parparita  <mihaip@chromium.org>
660
661         Reviewed by Dimitri Glazkov.
662
663         Move asynchronous event dispatching out of Document
664         https://bugs.webkit.org/show_bug.cgi?id=49785
665         
666         Move asynchonous event code out of Document and into a standalone
667         EventQueue class (which supports async events for both regular nodes
668         and the window object).
669
670         No new tests necessary, since no new functionality is exposed (existing
671         layout tests pass).
672
673         * Android.mk:
674         * CMakeLists.txt:
675         * GNUmakefile.am:
676         * WebCore.gypi:
677         * WebCore.pro:
678         * WebCore.vcproj/WebCore.vcproj:
679         * WebCore.xcodeproj/project.pbxproj:
680         * dom/Document.cpp:
681         (WebCore::Document::Document):
682         (WebCore::Document::enqueueWindowEvent):
683         (WebCore::Document::enqueueHashchangeEvent):
684         * dom/DOMAllInOne.cpp:
685         (WebCore::Document::eventQueue):
686         * dom/Document.h:
687         * dom/EventQueue.cpp: Added.
688         (WebCore::EventQueue::EventQueue):
689         (WebCore::EventQueue::enqueueEvent):
690         (WebCore::EventQueue::pendingEventTimerFired):
691         (WebCore::EventQueue::dispatchEvent):
692         * dom/EventQueue.h: Added.
693         * storage/StorageEventDispatcher.cpp:
694         (WebCore::StorageEventDispatcher::dispatch):
695
696 2010-12-14  Kyounga Ra  <kyounga.ra@gmail.com>
697
698         Reviewed by Adam Barth.
699
700         <noscript> is rendered with enabled XHTMLMP.
701         https://bugs.webkit.org/show_bug.cgi?id=48493
702
703         * html/HTMLElement.cpp:
704         (WebCore::HTMLElement::rendererIsNeeded):
705
706 2010-12-14  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
707
708         Reviewed by Eric Seidel.
709
710         [Qt] [Symbian] Do not use pkg-config on Symbian as it is not supported
711         https://bugs.webkit.org/show_bug.cgi?id=50231
712
713         No new tests as there is no new functionality.
714
715         Guard CONFIG+=link_pkgconfig with !symbian.
716
717         * WebCore.pro:
718
719 2010-12-14  Sheriff Bot  <webkit.review.bot@gmail.com>
720
721         Unreviewed, rolling out r74040.
722         http://trac.webkit.org/changeset/74040
723         https://bugs.webkit.org/show_bug.cgi?id=51050
724
725         Breaks 2d.shadow.canvas.transparent.2 and
726         2d.shadow.image.transparent.2 (Requested by helder on
727         #webkit).
728
729         * platform/graphics/ContextShadow.cpp:
730         (WebCore::ContextShadow::ContextShadow):
731         (WebCore::ContextShadow::calculateLayerBoundingRect):
732         * platform/graphics/ContextShadow.h:
733         (WebCore::ContextShadow::offset):
734         * platform/graphics/qt/ContextShadowQt.cpp:
735         (WebCore::ContextShadow::beginShadowLayer):
736         (WebCore::ContextShadow::endShadowLayer):
737         * platform/graphics/qt/GraphicsContextQt.cpp:
738         (WebCore::GraphicsContext::fillPath):
739         (WebCore::GraphicsContext::strokePath):
740         (WebCore::GraphicsContext::fillRect):
741         (WebCore::GraphicsContext::fillRoundedRect):
742         (WebCore::GraphicsContext::setPlatformShadow):
743
744 2010-12-14  Nate Chapin  <japhet@chromium.org>
745
746         Unreviewed, fixing qt (hopefully for real this time).
747
748         Remove a couple more references to loader.h.
749
750         * xml/XSLStyleSheetQt.cpp:
751         * xml/XSLTProcessorQt.cpp:
752
753 2010-12-14  Nate Chapin  <japhet@chromium.org>
754
755         Unreviewed, fix mac and qt builds.
756
757         Missed a couple of references to loader.h and
758         improperly added CachedResourceRequest.h to
759         WebCore.xcodeproj.
760
761         * WebCore.xcodeproj/project.pbxproj:
762         * platform/android/TemporaryLinkStubs.cpp:
763         * platform/qt/TemporaryLinkStubsQt.cpp:
764
765 2010-12-14  Nate Chapin  <japhet@chromium.org>
766
767         Reviewed by Adam Barth.
768
769         Rename Loader to CachedResourceRequest.
770         https://bugs.webkit.org/show_bug.cgi?id=50848
771
772         No new tests, rename only.
773
774         * Android.mk:
775         * CMakeLists.txt:
776         * GNUmakefile.am:
777         * WebCore.gypi:
778         * WebCore.pro:
779         * WebCore.vcproj/WebCore.vcproj:
780         * WebCore.xcodeproj/project.pbxproj:
781         * css/CSSStyleSelector.cpp:
782         * loader/cache/CachedCSSStyleSheet.cpp:
783         * loader/cache/CachedFont.cpp:
784         * loader/cache/CachedResource.cpp:
785         (WebCore::CachedResource::setRequest):
786         * loader/cache/CachedResource.h:
787         * loader/cache/CachedResourceLoader.cpp:
788         (WebCore::CachedResourceLoader::load):
789         (WebCore::CachedResourceLoader::loadDone):
790         (WebCore::CachedResourceLoader::cancelRequests):
791         * loader/cache/CachedResourceLoader.h:
792         * loader/cache/CachedResourceRequest.cpp: Copied from WebCore/loader/loader.cpp.
793         * loader/cache/CachedResourceRequest.h: Copied from WebCore/loader/loader.h.
794         * loader/loader.cpp: Removed.
795         * loader/loader.h: Removed.
796         * xml/XSLStyleSheetLibxslt.cpp:
797         * xml/XSLTProcessor.cpp:
798         * xml/XSLTProcessorLibxslt.cpp:
799
800 2010-12-14  David Hyatt  <hyatt@apple.com>
801
802         Reviewed by Tim Hatcher.
803
804         https://bugs.webkit.org/show_bug.cgi?id=46422
805
806         Rename pageHeight variables and members in WebCore to pageLogicalHeight in preparation for
807         making printing and pagination work with vertical writing modes.
808
809         * page/FrameView.cpp:
810         (WebCore::FrameView::forceLayoutForPagination):
811         * rendering/LayoutState.cpp:
812         (WebCore::LayoutState::LayoutState):
813         (WebCore::LayoutState::clearPaginationInformation):
814         * rendering/LayoutState.h:
815         (WebCore::LayoutState::LayoutState):
816         (WebCore::LayoutState::isPaginated):
817         (WebCore::LayoutState::pageLogicalHeight):
818         (WebCore::LayoutState::pageLogicalHeightChanged):
819         * rendering/RenderBlock.cpp:
820         (WebCore::RenderBlock::layoutBlock):
821         (WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
822         (WebCore::RenderBlock::insertFloatingObject):
823         (WebCore::RenderBlock::layoutColumns):
824         (WebCore::RenderBlock::nextPageTop):
825         (WebCore::RenderBlock::applyBeforeBreak):
826         (WebCore::RenderBlock::applyAfterBreak):
827         (WebCore::RenderBlock::adjustForUnsplittableChild):
828         (WebCore::RenderBlock::adjustLinePositionForPagination):
829         * rendering/RenderBlock.h:
830         * rendering/RenderBox.cpp:
831         (WebCore::RenderBox::computeLogicalHeight):
832         * rendering/RenderFlexibleBox.cpp:
833         (WebCore::RenderFlexibleBox::layoutBlock):
834         * rendering/RenderTable.cpp:
835         (WebCore::RenderTable::layout):
836         * rendering/RenderTableRow.cpp:
837         (WebCore::RenderTableRow::layout):
838         * rendering/RenderTableSection.cpp:
839         (WebCore::RenderTableSection::layoutRows):
840         * rendering/RenderView.cpp:
841         (WebCore::RenderView::RenderView):
842         (WebCore::RenderView::layout):
843         * rendering/RenderView.h:
844         (WebCore::RenderView::pageLogicalHeight):
845         (WebCore::RenderView::setPageLogicalHeight):
846
847 2010-12-14  Dimitri Glazkov  <dglazkov@chromium.org>
848
849         Fix GTK build by adding source files that were accidentally skipped in
850         r74044. Sorry!
851
852         * GNUmakefile.am: Added SliderThumbElement.
853
854 2010-12-14  Beth Dakin  <bdakin@apple.com>
855
856         Reviewed by Darin Adler.
857
858         Fix for https://bugs.webkit.org/show_bug.cgi?id=50974 
859         getComputedStyle() returns wrong values for zoomed elements when 
860         display is none
861         -and corresponding-
862         <rdar://problem/8522731>
863
864         If there is no renderer but the RenderStyle's value is a fixed 
865         length, send it through zoomAdjustedPixelValue(). There's not much 
866         we can do for other length types without a renderer.
867         * css/CSSComputedStyleDeclaration.cpp:
868         (WebCore::zoomAdjustedPixelValueForLength):
869         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
870
871 2010-12-13  Dimitri Glazkov  <dglazkov@chromium.org>
872
873         Reviewed by David Levin.
874
875         Move SliderThumbElement into its own file.
876         https://bugs.webkit.org/show_bug.cgi?id=50973
877
878         No change in behavior, so no tests.
879
880         * Android.mk: Added SliderThumbElement.
881         * CMakeLists.txt: Ditto.
882         * WebCore.gyp/WebCore.gyp: Ditto.
883         * WebCore.gypi: Ditto.
884         * WebCore.pro: Ditto.
885         * WebCore.vcproj/WebCore.vcproj: Ditto.
886         * WebCore.xcodeproj/project.pbxproj: Ditto,
887         * html/shadow/SliderThumbElement.cpp: Added.
888         * html/shadow/SliderThumbElement.h: Added.
889         * rendering/RenderSlider.cpp: Removed code that was moved into
890             SliderThumbElement.
891
892 2010-12-13  Alexey Proskuryakov  <ap@apple.com>
893
894         Reviewed by Adam Barth.
895
896         https://bugs.webkit.org/show_bug.cgi?id=50953
897         DNS Prefetch should be an opt-in feature
898
899         No new tests, can't test DNS.
900
901         * dom/Document.h: Made initDNSPrefetch public, since Page now calls it.
902
903         * page/Page.cpp: (WebCore::Page::dnsPrefetchingStateChanged):
904         * page/Page.h:
905         Documents cache the value of this setting, so they need to be notified of changes. In particular,
906         the first document in a page is created before settings are applied.
907
908         * page/Settings.cpp:
909         (WebCore::Settings::Settings): Changed default to false.
910         (WebCore::Settings::setDNSPrefetchingEnabled): Notify the page about the change.
911
912 2010-12-14  Helder Correia  <helder@sencha.com>
913
914         Reviewed by Ariya Hidayat.
915
916         [Qt] Canvas shadow offset should not be affected by any transformation
917         https://bugs.webkit.org/show_bug.cgi?id=50422
918
919         On a canvas context, shadows are currently affected by all
920         transformations except scaling. According to the spec:
921         http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#shadows
922
923         "The shadowOffsetX and shadowOffsetY attributes specify the distance
924         that the shadow will be offset in the positive horizontal and positive
925         vertical distance respectively. Their values are in coordinate space
926         units. They are not affected by the current transformation matrix."
927
928         NOTE: this applies only to canvas, not to box shadows.
929
930         Test: fast/canvas/canvas-transforms-fillRect-shadow.html
931
932         * platform/graphics/ContextShadow.cpp:
933         (WebCore::ContextShadow::ContextShadow):
934         (WebCore::ContextShadow::calculateLayerBoundingRect):
935         * platform/graphics/ContextShadow.h:
936         (WebCore::ContextShadow::setShadowsIgnoreTransforms):
937         (WebCore::ContextShadow::shadowsIgnoreTransforms):
938         (WebCore::ContextShadow::offset):
939         * platform/graphics/qt/ContextShadowQt.cpp:
940         (WebCore::ContextShadow::beginShadowLayer):
941         (WebCore::ContextShadow::endShadowLayer):
942         * platform/graphics/qt/GraphicsContextQt.cpp:
943         (WebCore::mustUseContextShadow):
944         (WebCore::GraphicsContext::fillPath):
945         (WebCore::GraphicsContext::strokePath):
946         (WebCore::GraphicsContext::fillRect):
947         (WebCore::GraphicsContext::fillRoundedRect):
948         (WebCore::GraphicsContext::setPlatformShadow):
949
950 2010-12-14  Alexander Pavlov  <apavlov@chromium.org>
951
952         Reviewed by Yury Semikhatsky.
953
954         Web Inspector: Rule data not updated in Styles pane after stylesheet gets reverted
955         https://bugs.webkit.org/show_bug.cgi?id=51034
956
957         * inspector/front-end/CSSStyleModel.js:
958         (WebInspector.CSSStyleModel.prototype._onRevert):
959         * inspector/front-end/ElementsPanel.js:
960         (WebInspector.ElementsPanel):
961         (WebInspector.ElementsPanel.prototype._metricsPaneEdited):
962         (WebInspector.ElementsPanel.prototype._stylesPaneEdited):
963         (WebInspector.ElementsPanel.prototype._styleSheetChanged):
964
965 2010-12-14  Andreas Kling  <andreas.kling@nokia.com>
966
967         Reviewed by Kenneth Rohde Christiansen.
968
969         [Qt] Avoid GraphicsContext save/restore in Image::drawPattern()
970         https://bugs.webkit.org/show_bug.cgi?id=51037
971
972         It's enough to restore the CompositeOperator after drawing.
973
974         * platform/graphics/qt/ImageQt.cpp:
975         (WebCore::Image::drawPattern):
976
977 2010-12-14  Eric Carlson  <eric.carlson@apple.com>
978
979         Reviewed by Dan Bernstein.
980
981         <rdar://problem/8763862>
982         r72017 used incorrect compiler conditional.
983
984         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
985         (WebCore::MediaPlayerPrivateQTKit::createQTMovie):
986
987 2010-12-14  Carlos Garcia Campos  <cgarcia@igalia.com>
988
989         Reviewed by Martin Robinson.
990
991         [GTK] Simplify context-menu handling code
992         https://bugs.webkit.org/show_bug.cgi?id=49658
993
994         * platform/ContextMenuItem.h:
995         * platform/gtk/ContextMenuGtk.cpp:
996         (WebCore::ContextMenu::appendItem):
997         * platform/gtk/ContextMenuItemGtk.cpp:
998         (WebCore::ContextMenuItem::ContextMenuItem):
999         (WebCore::ContextMenuItem::~ContextMenuItem):
1000         (WebCore::ContextMenuItem::releasePlatformDescription):
1001         (WebCore::ContextMenuItem::type):
1002         (WebCore::ContextMenuItem::setType):
1003         (WebCore::ContextMenuItem::action):
1004         (WebCore::ContextMenuItem::setAction):
1005         (WebCore::ContextMenuItem::title):
1006         (WebCore::ContextMenuItem::setTitle):
1007         (WebCore::ContextMenuItem::platformSubMenu):
1008         (WebCore::ContextMenuItem::setSubMenu):
1009         (WebCore::ContextMenuItem::setChecked):
1010         (WebCore::ContextMenuItem::setEnabled):
1011
1012 2010-12-14  Mario Sanchez Prada  <msanchez@igalia.com>
1013
1014         Reviewed by Xan Lopez.
1015
1016         [Gtk] Implement STATE_FOCUSED, STATE_FOCUSABLE, and corresponding events for text objects
1017         https://bugs.webkit.org/show_bug.cgi?id=27048
1018
1019         Handle focus change for text objects based in caret changes.
1020
1021         As text objects (such as paragraphs) seem not to accept focus in
1022         WebCore in the same way other objects (text controls) do, a
1023         Gtk-specific workaround is needed to expose this states and the
1024         related events to ATK-based assistive technologies.
1025
1026         Test: platform/gtk/accessibility/caret-browsing-text-focus.html
1027
1028         Ensure that text objects are exposed with the ATK_STATE_FOCUSABLE
1029         state, and that the ATK_STATE_FOCUSED state is added to those
1030         text objects containing the currently active caret selection.
1031
1032         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
1033         (selectionBelongsToObject): Moved upwards to use it from
1034         the new isTextWithCaret() function.
1035         (isTextWithCaret): New, checks whether an accessibility object
1036         represents a text object with the current caret selection on it.
1037         (setAtkStateSetFromCoreObject): Add the ATK_STATE_FOCUSED state
1038         when also when isTextWithCaret(coreObject) returns true.
1039         (webkit_accessible_ref_state_set): Add the ATK_STATE_FOCUSABLE
1040         state to text objects and those with the ATK_ROLE_PARAGRAPH role.
1041         (webkit_accessible_text_get_n_selections): Optimize return expression.
1042
1043         Make sure the proper events associated to a change of focus are
1044         emitted, based on caret changes across different accessibility
1045         objects. Also, refactored the code in more manageable and
1046         understandable helper functions.
1047
1048         * editing/gtk/SelectionControllerGtk.cpp:
1049         (WebCore::emitTextSelectionChange): New, includes the specific
1050         code formerly placed in notifyAccessibilityForSelectionChange() to
1051         emit the 'text-caret-moved' and 'text-selection-change' signals.
1052         (WebCore::maybeEmitTextFocusChange): New, takes care of emitting
1053         the 'focus-event' and 'state-changed::focused' signals when
1054         needed, that is, when a change in the selection happens across
1055         different accessible objects.
1056         (WebCore::SelectionController::notifyAccessibilityForSelectionChange):
1057         Refactored some code here, by using the new helper functions.
1058
1059 2010-12-14  Ilya Tikhonovsky  <loislo@chromium.org>
1060
1061         Reviewed by Pavel Feldman.
1062
1063         Web Inspector: regroup Inspector.idl entries.
1064         Just for better visibility.
1065
1066         https://bugs.webkit.org/show_bug.cgi?id=51025
1067
1068         * inspector/Inspector.idl:
1069
1070 2010-12-14  Alexander Pavlov  <apavlov@chromium.org>
1071
1072         Reviewed by Yury Semikhatsky.
1073
1074         Web Inspector: Reverted stylesheet breaks style data
1075         https://bugs.webkit.org/show_bug.cgi?id=51030
1076
1077         * inspector/InspectorStyleSheet.cpp:
1078         (WebCore::InspectorStyleSheet::reparseStyleSheet):
1079
1080 2010-12-14  Mads Ager  <ager@chromium.org>
1081
1082         Reviewed by Pavel Feldman.
1083
1084         [V8] Reflected unsigned attributes should be in the range [0, 2^31)
1085         https://bugs.webkit.org/show_bug.cgi?id=51023
1086
1087         Follow the changes made to CodeGeneratorJS.pm to return 0 for
1088         reflected unsigned attributes that are outside the allowed range.
1089         See https://bugs.webkit.org/show_bug.cgi?id=50472
1090
1091         * bindings/scripts/CodeGeneratorV8.pm:
1092
1093 2010-12-14  Charlie Reis  <creis@chromium.org>
1094
1095         Reviewed by Darin Adler.
1096
1097         Remove stale include of Document.h in V8DOMWrapper.h
1098         https://bugs.webkit.org/show_bug.cgi?id=50607
1099
1100         We no longer need to include Document.h or V8DOMMap.h in
1101         V8DOMWrapper.  Removing them to avoid dependencies.
1102
1103         * bindings/v8/V8DOMWrapper.h:
1104
1105 2010-12-14  Julien Chaffraix  <jchaffraix@codeaurora.org>
1106
1107         Reviewed by Darin Adler.
1108
1109         Test for: EventSource fails to connect if Content-Type header has a charset attribute
1110         https://bugs.webkit.org/show_bug.cgi?id=45372
1111
1112         Tests: http/tests/eventsource/eventsource-content-type-charset.html
1113                http/tests/eventsource/eventsource-content-type-text-event-stream-foobar.html
1114
1115         * page/EventSource.cpp:
1116         (WebCore::EventSource::didReceiveResponse): Use the mimeType instead of the Content-Type
1117         header directly. This makes the detection of the "text/stream" mimeType more accurate.
1118
1119 2010-12-14  Pieter Senster  <psenster@google.com>
1120
1121         Reviewed by Dirk Schulze.
1122
1123         Incorporate the channel offsets from the ColorMatrix filter in the filter calculation
1124         https://bugs.webkit.org/show_bug.cgi?id=50682
1125
1126         Test: svg/filters/feColorMatrix-offset.svg
1127
1128         * platform/graphics/filters/FEColorMatrix.cpp:
1129         (WebCore::matrix):
1130
1131 2010-12-14  Jarred Nicholls  <jarred@sencha.com>
1132
1133         Reviewed by Kenneth Rohde Christiansen.
1134
1135         Qt's Clipboard::files() implementation for HTML5 Drag/Drop (DataTransfer)
1136
1137         No new tests. Run tests manually until DRT is updated w/ beginDragWithFiles.
1138
1139         * platform/qt/ClipboardQt.cpp:
1140         (WebCore::ClipboardQt::files):
1141
1142 2010-12-13  Antonio Gomes  <agomes@rim.com>
1143
1144         Rubber stamped by Daniel Bates.
1145
1146         Spatial Navigation: code clean up (part V)
1147         https://bugs.webkit.org/show_bug.cgi?id=50666
1148
1149         No new tests needed.
1150
1151         * page/SpatialNavigation.cpp:
1152         (WebCore::distanceDataForNode): Made 'FocusCandidate current' const since it is not
1153         supposed to change within this function.
1154         * page/SpatialNavigation.h: Ditto.
1155
1156 2010-12-13  takano takumi  <takano@apple.com>
1157
1158         Reviewed by Dan Bernstein.
1159
1160         GlyphPage::fill() is slow on vertical writing (Mac)
1161         https://bugs.webkit.org/show_bug.cgi?id=50865
1162
1163         No test. Just a performance improvement.
1164
1165         * platform/graphics/Font.cpp:
1166         (WebCore::Font::isCJKIdeograph): Now this only checks pure ideographs (Hanji).
1167         (WebCore::Font::isCJKIdeographOrSymbol): Added this for Hanji and Hanji related symbols.
1168         * platform/graphics/Font.h:
1169         * platform/graphics/FontFastPath.cpp:
1170         (WebCore::Font::glyphDataForCharacter): Changed to call isCJKIdeographOrSymbol() instead of isCJKIdeograph().
1171         * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
1172         (WebCore::shouldUseCoreText): This tests if GlyphPage::fill() should use CoreText or not.
1173         For vertical writing, if the current page contains only ideographs, we go CG path.
1174         (WebCore::GlyphPage::fill): Made to call shouldUseCoreText() and switch code path.
1175
1176 2010-12-13  Antonio Gomes  <agomes@rim.com>
1177
1178         Reviewed by Daniel Bates.
1179
1180         Spatial Navigation: code clean up (part IV)
1181         https://bugs.webkit.org/show_bug.cgi?id=50666
1182
1183         Avoid calling canScrollInDirection more than necessary.
1184
1185         No new tests needed.
1186
1187         * page/FocusController.cpp:
1188         (WebCore::FocusController::advanceFocusDirectionallyInContainer): Moved the call to canScrollInDirection()
1189         to within the scrollInDirection().
1190         * page/SpatialNavigation.cpp: Removed the assertion to canScrollingDirection function.
1191         (WebCore::scrollInDirection):
1192
1193 2010-12-13  Antonio Gomes  <agomes@rim.com>
1194
1195         Reviewed by Daniel Bates.
1196
1197         Spatial Navigation: code clean up (part III)
1198         https://bugs.webkit.org/show_bug.cgi?id=50666
1199
1200         No new tests needed.
1201
1202         * page/SpatialNavigation.h: Added FocusCandidate::isFrameOwnerElement and
1203         WebCore::frameOwnerElement helper functions.
1204         (WebCore::FocusCandidate::isFrameOwnerElement): Returns true if the Node pointer
1205         wrapped by FocusCandidate is an instance of HTMLFrameOwnerElement. Returns false
1206         otherwise.
1207         * page/SpatialNavigation.cpp:
1208         (WebCore::frameOwnerElement): Returns the HTMLFrameOwnerElement associated with
1209         the FocusCandidate if appropriate.
1210         * page/FocusController.cpp:
1211         (WebCore::updateFocusCandidateIfNeeded): Make use of newly added frameOwnerElement() helper.
1212         (WebCore::FocusController::advanceFocusDirectionallyInContainer): Ditto.
1213
1214 2010-12-13  Mike Lawther  <mikelawther@chromium.org>
1215
1216         Reviewed by Daniel Bates.
1217
1218         [skia] ignore transform for canvas shadows
1219         https://bugs.webkit.org/show_bug.cgi?id=50437
1220
1221         * platform/graphics/skia/GraphicsContextSkia.cpp:
1222         (WebCore::GraphicsContext::setPlatformShadow):
1223
1224 2010-12-13  Dai Mikurube  <dmikurube@google.com>
1225
1226         Reviewed by Kent Tamura.
1227
1228         ValidityState's exposed functions should check if willValidate() is true before all
1229         https://bugs.webkit.org/show_bug.cgi?id=50617
1230
1231         Added checking willValidate() to exposed functions. And modified willValidate() behavior
1232         for <button type="submit"> and <input type="submit"> to return true if not disabled and
1233         not readonly.
1234
1235         * html/HTMLButtonElement.cpp:
1236         (WebCore::HTMLButtonElement::parseMappedAttribute): Added calling setNeedsWillValidateCheck() to refresh willValidate() after changing its type.
1237         (WebCore::HTMLButtonElement::recalcWillValidate): Added to return true if not disabled and not readonly when type="submit". It's to be compliant to the spec.
1238         * html/HTMLButtonElement.h:
1239         * html/SubmitInputType.cpp:
1240         (WebCore::SubmitInputType::supportsValidation): Removed it to enable willValidate() for <input> when type="submit". It's to be compliant to the spec.
1241         (WebCore::SubmitInputType::supportsRequired): Added it to reject required attributes though validation is available.
1242         * html/SubmitInputType.h:
1243         * html/ValidityState.cpp: Added checking willValidate().
1244         (WebCore::ValidityState::typeMismatch):
1245         (WebCore::ValidityState::patternMismatch):
1246         (WebCore::ValidityState::tooLong):
1247         (WebCore::ValidityState::rangeUnderflow):
1248         (WebCore::ValidityState::rangeOverflow):
1249         (WebCore::ValidityState::stepMismatch):
1250         (WebCore::ValidityState::customError):
1251         * html/ValidityState.h:
1252
1253 2010-12-13  Noel Gordon  <noel.gordon@gmail.com>
1254
1255         Reviewed by David Levin.
1256
1257         [chromium] Upstream skia/ImageBuffer.cpp routine mulDiv255Ceil()
1258         https://bugs.webkit.org/show_bug.cgi?id=50545
1259
1260         Skia has rolled, replace uses of mulDiv255Ceil with SkMulDiv255Ceiling.
1261
1262         No new tests, no change in behaviour.
1263
1264         * platform/graphics/skia/ImageBufferSkia.cpp:
1265         (WebCore::putImageData):
1266
1267 2010-12-13  Gavin Peters  <gavinp@chromium.org>
1268
1269         Reviewed by Adam Barth.
1270
1271         Re land Purpose after bad merge
1272         https://bugs.webkit.org/show_bug.cgi?id=51000
1273
1274         * loader/loader.cpp:
1275         (WebCore::Loader::load):
1276
1277 2010-12-13  Dan Bernstein  <mitz@apple.com>
1278
1279         Reviewed by Simon Fraser.
1280
1281         <rdar://problem/8763696> REGRESSION (r72173): Fallback fonts’ vertical metrics aren’t accounted for even when line-height is unspecified
1282         https://bugs.webkit.org/show_bug.cgi?id=50979
1283
1284         Many test results updated.
1285
1286         * rendering/InlineFlowBox.cpp: Reinstated the code that updates affectsAscent and
1287         affectsDescent in the used-fonts code path. Renamed variables for clarity. Added
1288         a check whether usedFonts is empty (which it might be if there is glyph overflow
1289         but no fallback) as an optimization.
1290
1291 2010-12-13  Mark Rowe  <mrowe@apple.com>
1292
1293         Rubber-stamped by Jon Honeycutt.
1294
1295         Remove unnecessary include of Switch module.
1296
1297         There are no switch statements in this file.
1298
1299         * dom/make_names.pl:
1300
1301 2010-12-13  Emil Eklund  <eae@chromium.org>
1302
1303         Reviewed by Dimitri Glazkov.
1304
1305         Change SelectionController::setFocusedNodeIfNeeded to traverse the DOM
1306         tree instead of the render tree.
1307         https://bugs.webkit.org/show_bug.cgi?id=50989
1308
1309         * editing/SelectionController.cpp:
1310         (WebCore::SelectionController::setFocusedNodeIfNeeded):
1311         Walk up DOM/hosted tree rather than render tree and remove FIXME comment
1312         that does't apply (SelectionController and EventHandler needs different
1313         checks).
1314
1315 2010-12-13  Chris Fleizach  <cfleizach@apple.com>
1316
1317         Reviewed by Beth Dakin.
1318
1319         AX: aria-invalid should be supported.
1320         https://bugs.webkit.org/show_bug.cgi?id=50573
1321
1322         Test: platform/mac/accessibility/aria-invalid.html
1323
1324         * accessibility/AXObjectCache.h:
1325         * accessibility/AccessibilityObject.cpp:
1326         (WebCore::AccessibilityObject::invalidStatus):
1327         * accessibility/AccessibilityObject.h:
1328         * accessibility/chromium/AXObjectCacheChromium.cpp
1329         (WebCore::AXObjectCache::postPlatformNotification):
1330         * accessibility/mac/AXObjectCacheMac.mm:
1331         (WebCore::AXObjectCache::postPlatformNotification):
1332         * accessibility/mac/AccessibilityObjectWrapper.mm:
1333         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
1334         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
1335         * dom/Element.cpp:
1336         (WebCore::Element::updateAfterAttributeChanged):
1337         * html/HTMLAttributeNames.in:
1338
1339 2010-12-13  Joone Hur  <joone@kldp.org>
1340
1341         Reviewed by Eric Seidel.
1342
1343         WebKit fails to compile when building with WML support enabled
1344         https://bugs.webkit.org/show_bug.cgi?id=42943
1345
1346         Use TextPosition instead of lineNumber() and columNumber().
1347
1348         No new tests are added, because this is just a build fix.
1349
1350         * dom/XMLDocumentParser.h: Make lineNumber() private.
1351         * wml/WMLErrorHandling.cpp:
1352         (WebCore::reportWMLError): Use TextPosition instead of lineNumber() and columnNumber().
1353
1354 2010-12-13  Chris Fleizach  <cfleizach@apple.com>
1355
1356         Reviewed by Beth Dakin.
1357
1358         AX: lists and list boxes need different attributes
1359         https://bugs.webkit.org/show_bug.cgi?id=50978
1360
1361         Separate out the attributes being returned for lists (<ul>) and listboxes (<select multiple>).
1362
1363         * accessibility/mac/AccessibilityObjectWrapper.mm:
1364         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
1365
1366 2010-12-13  David Hyatt  <hyatt@apple.com>
1367
1368         Reviewed by Sam Weinig.
1369
1370         https://bugs.webkit.org/show_bug.cgi?id=50963
1371
1372         REGRESSION: Scrolling nested iframes is messed up on platforms that use the cross-platform ScrollView.
1373        
1374         The selfClipRect and childrenClipRect methods of RenderLayer were incorrectly relying on the bounding box
1375         of the root layer.  This bounding box was only coincidentally incorporating overflow as part of the 
1376         RenderLayer's bounds.  Since I fixed the RenderLayer bounds to not include layout overflow any longer,
1377         this check is now exposed as incorrect.  Use the entire document size  when computing layer clip
1378         rects.
1379
1380         * rendering/RenderLayer.cpp:
1381         (WebCore::RenderLayer::childrenClipRect):
1382         (WebCore::RenderLayer::selfClipRect):
1383         * rendering/RenderView.h:
1384         (WebCore::RenderView::documentRect):
1385
1386 2010-12-13  Simon Fraser  <simon.fraser@apple.com>
1387
1388         GraphicsContextPrivate.h was removed. Nuke it from the project.
1389         
1390         * WebCore.xcodeproj/project.pbxproj:
1391
1392 2010-12-13  Eric Carlson  <eric.carlson@apple.com>
1393
1394         Reviewed by Antti Koivisto.
1395
1396         HTMLMediaElement::endedPlayback should not return true if duration is zero
1397         https://bugs.webkit.org/show_bug.cgi?id=50962
1398
1399         (WebCore::HTMLMediaElement::endedPlayback): Don't return true when duration is zero because a 
1400         media file can't play if it has no duration, therefore it can't have ended playback.
1401
1402 2010-12-13  Brent Fulgham  <bfulgham@webkit.org>
1403
1404         Unreviewed build fix after r73840.
1405
1406         * WebCore.vcproj/WebCoreGeneratedCairo.vsprops: Update property file
1407         to pass three arguments to build-generated-files.sh, just like
1408         the official Apple port.
1409
1410 2010-12-13  David Hyatt  <hyatt@apple.com>
1411
1412         Reviewed by Adam Roben.
1413
1414         Make sure the defaultSpaceEventHandler does logical scrolling.
1415
1416         * page/EventHandler.cpp:
1417         (WebCore::EventHandler::defaultSpaceEventHandler):
1418
1419 2010-12-13  Matthew Delaney  <mdelaney@apple.com>
1420
1421         Reviewed by Simon Fraser.
1422
1423         https://bugs.webkit.org/show_bug.cgi?id=50591 Adopt new CG API for canvas
1424
1425         No new tests necessary.
1426
1427         * Configurations/WebCore.xcconfig: Added IOSurface framework link.
1428         * html/canvas/CanvasRenderingContext2D.cpp: Used IOSurface def. instead.
1429         * platform/graphics/ImageBuffer.h: Pushed renderingMode down into ctor.
1430         * platform/graphics/cairo/ImageBufferCairo.cpp:
1431         * platform/graphics/cg/ImageBufferCG.cpp:
1432         * platform/graphics/haiku/ImageBufferHaiku.cpp:
1433         * platform/graphics/qt/ImageBufferQt.cpp:
1434         * platform/graphics/skia/ImageBufferSkia.cpp:
1435         * platform/graphics/wince/ImageBufferWinCE.cpp:
1436         * platform/graphics/wx/ImageBufferWx.cpp:
1437
1438 2010-12-13  Sheriff Bot  <webkit.review.bot@gmail.com>
1439
1440         Unreviewed, rolling out r73923.
1441         http://trac.webkit.org/changeset/73923
1442         https://bugs.webkit.org/show_bug.cgi?id=50944
1443
1444         Broke editing/selection/extend-selection-home-end.html on non-
1445         mac platforms. Looks like a real bug. (Requested by ojan on
1446         #webkit).
1447
1448         * editing/SelectionController.cpp:
1449         (WebCore::SelectionController::positionForPlatform):
1450         (WebCore::SelectionController::modifyExtendingForward):
1451
1452 2010-12-13  David Hyatt  <hyatt@apple.com>
1453
1454         Reviewed by Sam Weinig.
1455
1456         https://bugs.webkit.org/show_bug.cgi?id=48545, Home/End, PageUp/PageDwn should respect writing-mode. 
1457
1458         Add logical scrolling to WebCore.  It basically mirrors physical scrolling but works in abstract logical
1459         directions and only converts to physical when it's time to attempt the scroll.
1460         
1461         Also fixed bugs in scrollRecursively and logicalScrollRecursively where overflow sections in containing
1462         frames got skipped over.
1463         
1464         Made the resetting of the inline axis scroll position on Home/End Mac-specific for overflow sections.
1465         
1466         * WebCore.exp.in:
1467         * page/EventHandler.cpp:
1468         (WebCore::EventHandler::logicalScrollOverflow):
1469         (WebCore::EventHandler::scrollRecursively):
1470         (WebCore::EventHandler::logicalScrollRecursively):
1471         * page/EventHandler.h:
1472         * page/FrameView.cpp:
1473         (WebCore::FrameView::isVerticalDocument):
1474         (WebCore::FrameView::isFlippedDocument):
1475         * page/FrameView.h:
1476         * platform/ScrollTypes.h:
1477         (WebCore::logicalToPhysical):
1478         * platform/ScrollView.cpp:
1479         (WebCore::ScrollView::scroll):
1480         (WebCore::ScrollView::logicalScroll):
1481         * platform/ScrollView.h:
1482         (WebCore::ScrollView::isVerticalDocument):
1483         (WebCore::ScrollView::isFlippedDocument):
1484         * rendering/RenderBox.cpp:
1485         (WebCore::RenderBox::logicalScroll):
1486         * rendering/RenderBox.h:
1487         * rendering/RenderLayer.cpp:
1488         (WebCore::RenderLayer::scroll):
1489         * rendering/RenderListBox.cpp:
1490         (WebCore::RenderListBox::logicalScroll):
1491         * rendering/RenderListBox.h:
1492         * rendering/RenderTextControlSingleLine.cpp:
1493         (WebCore::RenderTextControlSingleLine::logicalScroll):
1494         * rendering/RenderTextControlSingleLine.h:
1495
1496 2010-12-13  Yury Semikhatsky  <yurys@chromium.org>
1497
1498         Unreviewed. Rollout 73914, 73915, 73917, 73920 and 73921.
1499
1500         REGRESSION(r73914): "Chromium page_cycler_morejs fails" (Requested by yurys on #webkit).
1501         https://bugs.webkit.org/show_bug.cgi?id=50950
1502
1503         * Android.jscbindings.mk:
1504         * CMakeLists.txt:
1505         * GNUmakefile.am:
1506         * WebCore.gypi:
1507         * WebCore.order:
1508         * WebCore.pro:
1509         * WebCore.vcproj/WebCore.vcproj:
1510         * WebCore.xcodeproj/project.pbxproj:
1511         * bindings/js/JSBindingsAllInOne.cpp:
1512         * bindings/js/JSDOMBinding.cpp:
1513         (WebCore::reportException):
1514         * bindings/js/JSWorkerContextErrorHandler.cpp: Renamed from WebCore/bindings/js/JSErrorHandler.cpp.
1515         (WebCore::JSWorkerContextErrorHandler::JSWorkerContextErrorHandler):
1516         (WebCore::JSWorkerContextErrorHandler::~JSWorkerContextErrorHandler):
1517         (WebCore::JSWorkerContextErrorHandler::handleEvent):
1518         * bindings/js/JSWorkerContextErrorHandler.h: Renamed from WebCore/bindings/js/JSErrorHandler.h.
1519         (WebCore::JSWorkerContextErrorHandler::create):
1520         (WebCore::createJSWorkerContextErrorHandler):
1521         * bindings/scripts/CodeGeneratorJS.pm:
1522         * bindings/scripts/CodeGeneratorV8.pm:
1523         * bindings/v8/V8ConsoleMessage.cpp:
1524         (WebCore::V8ConsoleMessage::dispatchNow):
1525         (WebCore::V8ConsoleMessage::handler):
1526         * bindings/v8/V8ConsoleMessage.h:
1527         * bindings/v8/V8WindowErrorHandler.cpp: Removed.
1528         * bindings/v8/V8WindowErrorHandler.h: Removed.
1529         * bindings/v8/WorkerContextExecutionProxy.cpp:
1530         (WebCore::v8MessageHandler):
1531         * bindings/v8/WorkerScriptController.cpp:
1532         (WebCore::WorkerScriptController::evaluate):
1533         * dom/Document.cpp:
1534         (WebCore::Document::reportException):
1535         (WebCore::Document::addMessage):
1536         * dom/Document.h:
1537         * dom/ErrorEvent.cpp:
1538         * dom/ErrorEvent.h:
1539         * dom/Event.cpp:
1540         * dom/Event.h:
1541         * dom/ScriptExecutionContext.cpp:
1542         (WebCore::ScriptExecutionContext::ScriptExecutionContext):
1543         * dom/ScriptExecutionContext.h:
1544         * websockets/WebSocket.cpp:
1545         (WebCore::WebSocket::connect):
1546         * websockets/WebSocketChannel.cpp:
1547         (WebCore::WebSocketChannel::didOpen):
1548         (WebCore::WebSocketChannel::appendToBuffer):
1549         * websockets/WebSocketHandshake.cpp:
1550         (WebCore::WebSocketHandshake::readServerHandshake):
1551         (WebCore::WebSocketHandshake::readStatusLine):
1552         (WebCore::WebSocketHandshake::readHTTPHeaders):
1553         (WebCore::WebSocketHandshake::checkResponseHeaders):
1554         * workers/DefaultSharedWorkerRepository.cpp:
1555         (WebCore::postExceptionTask):
1556         (WebCore::postConsoleMessageTask):
1557         * workers/WorkerContext.cpp:
1558         (WebCore::WorkerContext::WorkerContext):
1559         (WebCore::WorkerContext::reportException):
1560         (WebCore::WorkerContext::addMessage):
1561         * workers/WorkerContext.h:
1562         * workers/WorkerMessagingProxy.cpp:
1563         (WebCore::WorkerExceptionTask::performTask):
1564         (WebCore::postConsoleMessageTask):
1565         * xml/XMLHttpRequest.cpp:
1566         (WebCore::reportUnsafeUsage):
1567
1568 2010-12-13  Antti Koivisto  <antti@apple.com>
1569
1570         Reviewed by Alexey Proskuryakov.
1571
1572         https://bugs.webkit.org/show_bug.cgi?id=50758
1573         <rdar://problem/8722094> 
1574         Defer loading print stylesheets
1575         
1576         - Make preload scanner skip stylesheets with non-screen media types.
1577         - Make it possible to specify non-default load priority from the client.
1578         - Use this mechanism to load print stylesheets using very low priority so they get loaded after everything else.
1579         - Move default priority code from Loader to CachedResource.
1580         - Move ResourceLoadScheduler::Priority enum to a separate file (as ResourceLoadPriority).
1581         - Add a way to make ResourceLoadScheduler load resources one at the time so the above functionality can be tested reliably.
1582
1583         Tests: http/tests/local/link-stylesheet-load-order-preload.html
1584                http/tests/local/link-stylesheet-load-order.html
1585
1586         * WebCore.exp.in:
1587         * WebCore.gypi:
1588         * WebCore.pro:
1589         * WebCore.vcproj/WebCore.vcproj:
1590         * WebCore.xcodeproj/project.pbxproj:
1591         * css/CSSImageValue.cpp:
1592         (WebCore::CSSImageValue::cachedImage):
1593         * html/HTMLLinkElement.cpp:
1594         (WebCore::HTMLLinkElement::process):
1595         * html/parser/HTMLPreloadScanner.cpp:
1596         (WebCore::HTMLNames::PreloadTask::PreloadTask):
1597         (WebCore::HTMLNames::PreloadTask::processAttributes):
1598         (WebCore::HTMLNames::PreloadTask::relAttributeIsStyleSheet):
1599         (WebCore::HTMLNames::PreloadTask::linkMediaAttributeIsScreen):
1600         (WebCore::HTMLNames::PreloadTask::preload):
1601         * loader/DocumentThreadableLoader.cpp:
1602         (WebCore::DocumentThreadableLoader::loadRequest):
1603         * loader/ResourceLoadPriority.h: Added.
1604         * loader/ResourceLoadScheduler.cpp:
1605         (WebCore::ResourceLoadScheduler::ResourceLoadScheduler):
1606         (WebCore::ResourceLoadScheduler::scheduleSubresourceLoad):
1607         (WebCore::ResourceLoadScheduler::schedulePluginStreamLoad):
1608         (WebCore::ResourceLoadScheduler::scheduleLoad):
1609         (WebCore::ResourceLoadScheduler::servePendingRequests):
1610         (WebCore::ResourceLoadScheduler::HostInformation::~HostInformation):
1611         (WebCore::ResourceLoadScheduler::HostInformation::schedule):
1612         (WebCore::ResourceLoadScheduler::HostInformation::remove):
1613         (WebCore::ResourceLoadScheduler::HostInformation::hasRequests):
1614         (WebCore::ResourceLoadScheduler::HostInformation::limitRequests):
1615         * loader/ResourceLoadScheduler.h:
1616         (WebCore::ResourceLoadScheduler::isSerialLoadingEnabled):
1617         (WebCore::ResourceLoadScheduler::setSerialLoadingEnabled):
1618         (WebCore::ResourceLoadScheduler::HostInformation::requestsPending):
1619         * loader/cache/CachedResource.cpp:
1620         (WebCore::defaultPriorityForResourceType):
1621         (WebCore::CachedResource::CachedResource):
1622         * loader/cache/CachedResource.h:
1623         (WebCore::CachedResource::loadPriority):
1624         (WebCore::CachedResource::setLoadPriority):
1625         * loader/cache/CachedResourceLoader.cpp:
1626         (WebCore::CachedResourceLoader::requestCSSStyleSheet):
1627         (WebCore::CachedResourceLoader::requestResource):
1628         (WebCore::CachedResourceLoader::requestPreload):
1629         * loader/cache/CachedResourceLoader.h:
1630         * loader/cache/MemoryCache.cpp:
1631         (WebCore::MemoryCache::requestResource):
1632         * loader/cache/MemoryCache.h:
1633         * loader/loader.cpp:
1634         (WebCore::Loader::load):
1635
1636 2010-12-13  Justin Schuh  <jschuh@chromium.org>
1637
1638         Reviewed by Dimitri Glazkov.
1639
1640         Build fix for r73927
1641         https://bugs.webkit.org/show_bug.cgi?id=50946
1642
1643         Reverting CSSCanvasValue::canvasDestroyed to its code before r73927
1644         because it's breaking the build and I changed it only because it
1645         appeared redunudant after r73927.
1646
1647         No behavior changed so no new tests needed.
1648
1649         * css/CSSCanvasValue.cpp:
1650         (WebCore::CSSCanvasValue::canvasDestroyed):
1651
1652 2010-12-13  Matthew Delaney  <mdelaney@apple.com>
1653
1654         Reviewed by nobody, build fix.
1655
1656         Unlinking IOSurface framework from xcodeproj.
1657
1658         * WebCore.xcodeproj/project.pbxproj:
1659
1660 2010-12-13  Justin Schuh  <jschuh@chromium.org>
1661
1662         Reviewed by Dimitri Glazkov.
1663
1664         HTMLCanvasElement should handle multiple observers.
1665         https://bugs.webkit.org/show_bug.cgi?id=50899
1666
1667         Test: fast/canvas/canvas-bg-multiple-removal.html
1668
1669         * css/CSSCanvasValue.cpp:
1670         (WebCore::CSSCanvasValue::~CSSCanvasValue):
1671         (WebCore::CSSCanvasValue::canvasDestroyed):
1672         (WebCore::CSSCanvasValue::element):
1673         * html/HTMLCanvasElement.cpp:
1674         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
1675         (WebCore::HTMLCanvasElement::~HTMLCanvasElement):
1676         (WebCore::HTMLCanvasElement::addObserver):
1677         (WebCore::HTMLCanvasElement::removeObserver):
1678         (WebCore::HTMLCanvasElement::didDraw):
1679         (WebCore::HTMLCanvasElement::reset):
1680         * html/HTMLCanvasElement.h:
1681
1682 2010-12-13  Mihai Parparita  <mihaip@chromium.org>
1683
1684         Reviewed by Adam Barth.
1685
1686         [Chromium] canvas/philip/tests/2d.missingargs.html hangs on Snow Leopard
1687         https://bugs.webkit.org/show_bug.cgi?id=50841
1688
1689         Test: fast/canvas/strokeText-missing-args.html
1690         
1691         We didn't have isfinite checks for the x and y coordinates that are
1692         passed to strokeText/drawTextInternal (unlike all the other methods,
1693         which got checks in r50910 and r59447).
1694
1695         * html/canvas/CanvasRenderingContext2D.cpp:
1696         (WebCore::CanvasRenderingContext2D::drawTextInternal):
1697
1698 2010-12-09  Matthew Delaney  <mdelaney@apple.com>
1699
1700         Reviewed by Simon Fraser.
1701
1702         Adopt new CG API for canvas
1703         https://bugs.webkit.org/show_bug.cgi?id=50591
1704
1705         No new tests. All current layout tests are sufficient.
1706
1707         * html/HTMLCanvasElement.cpp: Add in accelerateRendering flag for imagebuffer creation.
1708         * html/canvas/CanvasRenderingContext2D.cpp:
1709         (WebCore::CanvasRenderingContext2D::isAccelerated): Always return true if using CA on new platforms.
1710         (WebCore::CanvasRenderingContext2D::drawTextInternal): Use accelerateRendering for imagebuffer.
1711         * platform/graphics/ImageBuffer.h:
1712         (WebCore::ImageBuffer::create): Plumb through new flag.
1713         * platform/graphics/cairo/ImageBufferCairo.cpp: Update method sig.
1714         * platform/graphics/cg/ImageBufferCG.cpp: Switch off of accelerateRendering flag for new accelerated paths.
1715         * platform/graphics/cg/ImageBufferData.h: Add in surface ref
1716         * platform/graphics/haiku/ImageBufferHaiku.cpp: Update method sig.
1717         * platform/graphics/qt/ImageBufferQt.cpp: ^^
1718         * platform/graphics/skia/ImageBufferSkia.cpp: ^^
1719         * platform/graphics/wince/ImageBufferWinCE.cpp: ^^
1720         * platform/graphics/wx/ImageBufferWx.cpp: ^^
1721         * platform/mac/WebCoreSystemInterface.h: Add new method sigs
1722         * platform/mac/WebCoreSystemInterface.mm: ^^
1723         * rendering/RenderLayerBacking.cpp:
1724         * rendering/RenderLayerCompositor.cpp: Set acceleratesDrawing for canvas backings.
1725
1726 2010-12-13  Benjamin Kalman  <kalman@chromium.org>
1727
1728         Reviewed by Ojan Vafai.
1729
1730         Shift-End does not select to the end of the line
1731         https://bugs.webkit.org/show_bug.cgi?id=50610
1732
1733         Test: editing/selection/extend-to-line-boundary.html
1734
1735         * editing/SelectionController.cpp:
1736         (WebCore::SelectionController::positionForPlatform): Use visibleStart/visibleEnd rather than
1737         start/end.
1738         (WebCore::SelectionController::modifyExtendingForward):
1739
1740 2010-12-13  Adam Roben  <aroben@apple.com>
1741
1742         Windows build fix after r73914
1743
1744         * WebCore.vcproj/WebCore.vcproj: Fix malformed XML.
1745
1746 2010-12-13  Yury Semikhatsky  <yurys@chromium.org>
1747
1748         Unreviewed. Qt build fix.
1749
1750         * dom/ScriptExecutionContext.cpp:
1751         (WebCore::ScriptExecutionContext::ScriptExecutionContext):
1752         * dom/ScriptExecutionContext.h:
1753
1754 2010-12-13  Mario Sanchez Prada  <msanchez@igalia.com>
1755
1756         Reviewed by Xan Lopez.
1757
1758         [Gtk] Additional support is needed for caret browsing
1759         https://bugs.webkit.org/show_bug.cgi?id=25526
1760
1761         Enable "MoveTo{Beginninng|End}OfDocument" commands when caret
1762         browsing is enabled.
1763
1764         This change impacts the GTK-port only as caret browsing is a
1765         feature only used in that platform so far.
1766
1767         Test: platform/gtk/editing/selection/caret-mode-document-begin-end.html
1768
1769         * editing/EditorCommand.cpp:
1770         (WebCore::createCommandMap): Enable the commads when in caret browsing.
1771
1772 2010-12-13  Yury Semikhatsky  <yurys@chromium.org>
1773
1774         Unreviewed. Qt build fix.
1775
1776         * dom/Event.cpp:
1777         (WebCore::Event::isErrorEvent):
1778         * dom/Event.h: remove ENABLE(WORKERS) guard since ErrorEvent is now used not
1779         only in workers.
1780
1781 2010-12-13  Ilya Tikhonovsky  <loislo@chromium.org>
1782
1783         Reviewed by Yury Semikhatsky.
1784
1785         Web Inspector: Protocol cleanup task. Assign domain attribute to Resources and Debugger specific functions.
1786
1787         Debugger and Resources related notification functions of Inspector.idl were
1788         marked as such with help of "domain" attribute. The other changes in js files
1789         are reflecting this change. Some wrappers in WebInspector namespace were dropped,
1790         the others were moved to DebuggerModel class.
1791
1792         https://bugs.webkit.org/show_bug.cgi?id=50906
1793
1794         * inspector/Inspector.idl:
1795         * inspector/InspectorDebuggerAgent.cpp:
1796         (WebCore::InspectorDebuggerAgent::didParseSource):
1797         * inspector/InspectorProfilerAgent.cpp:
1798         (WebCore::InspectorProfilerAgent::resetState):
1799         * inspector/front-end/DOMAgent.js:
1800         (WebInspector.DOMAgent.prototype.didCommitLoad):
1801         * inspector/front-end/Database.js:
1802         * inspector/front-end/DebuggerModel.js:
1803         (WebInspector.DebuggerModel):
1804         (WebInspector.DebuggerModel.prototype.pausedScript):
1805         (WebInspector.DebuggerModel.prototype.resumedScript):
1806         (WebInspector.DebuggerModel.prototype.attachDebuggerWhenShown):
1807         (WebInspector.DebuggerModel.prototype.debuggerWasEnabled):
1808         (WebInspector.DebuggerModel.prototype.debuggerWasDisabled):
1809         (WebInspector.DebuggerModel.prototype.parsedScriptSource):
1810         (WebInspector.DebuggerModel.prototype.failedToParseScriptSource):
1811         (WebInspector.DebuggerModel.prototype.didCreateWorker):
1812         (WebInspector.DebuggerModel.prototype.didDestroyWorker):
1813         * inspector/front-end/ProfilesPanel.js:
1814         (WebInspector.ProfilesPanel):
1815         (WebInspector.ProfilesPanel.prototype.updateMainViewWidth):
1816         (WebInspector.ProfilesPanel.prototype.setRecordingProfile):
1817         * inspector/front-end/ResourceManager.js:
1818         (WebInspector.ResourceManager):
1819         (WebInspector.ResourceManager.prototype._unbindResourceURL):
1820         (WebInspector.ResourceManager.prototype.updateDOMStorage):
1821         (WebInspector.ResourceManager.prototype.updateApplicationCacheStatus):
1822         (WebInspector.ResourceManager.prototype.didGetFileSystemPath):
1823         (WebInspector.ResourceManager.prototype.didGetFileSystemError):
1824         (WebInspector.ResourceManager.prototype.didGetFileSystemDisabled):
1825         (WebInspector.ResourceManager.prototype.updateNetworkState):
1826         (WebInspector.ResourceManager.prototype.addDOMStorage):
1827         (WebInspector.ResourceManager.prototype.selectDOMStorage):
1828         (WebInspector.ResourceManager.prototype.addDatabase):
1829         (WebInspector.ResourceManager.prototype.selectDatabase):
1830         (WebInspector.ResourceManager.prototype.sqlTransactionSucceeded):
1831         (WebInspector.ResourceManager.prototype.sqlTransactionFailed):
1832         * inspector/front-end/WorkersSidebarPane.js:
1833         (WebInspector.Worker):
1834         * inspector/front-end/inspector.js:
1835
1836 2010-12-13  Yury Semikhatsky  <yurys@chromium.org>
1837
1838         Unreviewed. Qt build fix. 
1839
1840         * dom/ErrorEvent.cpp:
1841         * dom/ErrorEvent.h: remove ENABLE(WORKERS) guard since ErrorEvent is now used not
1842         only in workers.
1843
1844 2010-12-13  Yury Semikhatsky  <yurys@chromium.org>
1845
1846         Reviewed by Adam Barth.
1847
1848         WebCore doesn't fire window.onerror event when uncaught JavaScript exceptions are thrown
1849         https://bugs.webkit.org/show_bug.cgi?id=8519
1850
1851         Uncaught exceptions are propagated to window.onerror hander if one is present.
1852         The handler is expected to be a function accepting three arguments: error message,
1853         resource url and line number where the exception occured.
1854
1855         It was decided to dispatch ErrorEvent to all listeners/handlers no matter if they
1856         were created in the same isolated world where the exception occured or not.
1857
1858         Tests: fast/events/window-onerror1.html
1859                fast/events/window-onerror10.html
1860                fast/events/window-onerror11.html
1861                fast/events/window-onerror2.html
1862                fast/events/window-onerror3.html
1863                fast/events/window-onerror4.html
1864                fast/events/window-onerror5.html
1865                fast/events/window-onerror6.html
1866                fast/events/window-onerror7.html
1867                fast/events/window-onerror8.html
1868                fast/events/window-onerror9.html
1869                http/tests/security/window-onerror-exception-in-iframe.html
1870                userscripts/window-onerror-for-isolated-world-1.html
1871                userscripts/window-onerror-for-isolated-world-2.html
1872
1873         * Android.jscbindings.mk:
1874         * CMakeLists.txt:
1875         * GNUmakefile.am:
1876         * WebCore.gypi:
1877         * WebCore.order:
1878         * WebCore.pro:
1879         * WebCore.vcproj/WebCore.vcproj:
1880         * WebCore.xcodeproj/project.pbxproj:
1881         * bindings/js/JSBindingsAllInOne.cpp:
1882         * bindings/js/JSDOMBinding.cpp:
1883         (WebCore::reportException):
1884         * bindings/js/JSErrorHandler.cpp: Renamed from WebCore/bindings/js/JSWorkerContextErrorHandler.cpp.
1885         (WebCore::JSErrorHandler::JSErrorHandler):
1886         (WebCore::JSErrorHandler::~JSErrorHandler):
1887         (WebCore::JSErrorHandler::handleEvent):
1888         * bindings/js/JSErrorHandler.h: Copied from WebCore/bindings/js/JSWorkerContextErrorHandler.h.
1889         (WebCore::JSErrorHandler::create):
1890         (WebCore::createJSErrorHandler):
1891         * bindings/scripts/CodeGeneratorJS.pm:
1892         * bindings/scripts/CodeGeneratorV8.pm:
1893         * bindings/v8/V8ConsoleMessage.cpp:
1894         (WebCore::V8ConsoleMessage::dispatchNow):
1895         (WebCore::V8ConsoleMessage::handler): the method was changed to use generic WebCore exception
1896         reporting mechanism which is also used by JSC bindings.
1897         * bindings/v8/V8ConsoleMessage.h:
1898         * bindings/v8/V8WindowErrorHandler.cpp: Copied from WebCore/bindings/js/JSWorkerContextErrorHandler.h.
1899         (WebCore::V8WindowErrorHandler::V8WindowErrorHandler):
1900         (WebCore::V8WindowErrorHandler::callListenerFunction):
1901         * bindings/v8/V8WindowErrorHandler.h: Renamed from WebCore/bindings/js/JSWorkerContextErrorHandler.h.
1902         (WebCore::V8WindowErrorHandler::create):
1903         * bindings/v8/WorkerContextExecutionProxy.cpp:
1904         (WebCore::v8MessageHandler):
1905         * bindings/v8/WorkerScriptController.cpp:
1906         (WebCore::WorkerScriptController::evaluate):
1907         * dom/Document.cpp:
1908         (WebCore::Document::errorEventTarget):
1909         (WebCore::Document::logExceptionToConsole):
1910         * dom/Document.h:
1911         * dom/ScriptExecutionContext.cpp:
1912         (WebCore::ScriptExecutionContext::PendingException::PendingException):
1913         (WebCore::ScriptExecutionContext::ScriptExecutionContext):
1914         (WebCore::ScriptExecutionContext::reportException): this method is not virtual anymore to
1915         ensure that error event dispatching algorithm is the same in WorkerContext and in Document.
1916         (WebCore::ScriptExecutionContext::dispatchErrorEvent):
1917         * dom/ScriptExecutionContext.h:
1918         * workers/DefaultSharedWorkerRepository.cpp:
1919         (WebCore::postExceptionTask):
1920         * workers/WorkerContext.cpp:
1921         (WebCore::WorkerContext::WorkerContext):
1922         (WebCore::WorkerContext::errorEventTarget):
1923         (WebCore::WorkerContext::logExceptionToConsole):
1924         * workers/WorkerContext.h:
1925         * workers/WorkerMessagingProxy.cpp:
1926         (WebCore::WorkerExceptionTask::performTask):
1927
1928 2010-12-08  Alexander Pavlov  <apavlov@chromium.org>
1929
1930         Reviewed by Joseph Pecoraro.
1931
1932         Web Inspector: Enable CSS property editing name/value-wise (like Firebug does)
1933         https://bugs.webkit.org/show_bug.cgi?id=50565
1934
1935         For CSS property editing, the property name and value have become two fields separated
1936         by a colon (rather than one field containing the full property text.) A user can tab
1937         between the name and value fields forward and backward. A colon typed in the name field
1938         and a semicolon in the value field (unless found inside a string) act as a Tab and focus
1939         the next editable field (while applying the entire property value.)
1940
1941         Now a user can tab through all editable styles for an element, even across rule boundaries.
1942
1943         * inspector/front-end/BreakpointsSidebarPane.js:
1944         (WebInspector.XHRBreakpointsSidebarPane.prototype._startEditingBreakpoint):
1945         * inspector/front-end/DataGrid.js:
1946         (WebInspector.DataGrid.prototype._startEditingColumnOfDataGridNode):
1947         (WebInspector.DataGrid.prototype._startEditing):
1948         * inspector/front-end/ElementsTreeOutline.js:
1949         (WebInspector.ElementsTreeElement.prototype._startEditingAttribute):
1950         (WebInspector.ElementsTreeElement.prototype._startEditingTextNode):
1951         (WebInspector.ElementsTreeElement.prototype._startEditingTagName):
1952         (WebInspector.ElementsTreeElement.prototype._startEditingAsHTML):
1953         * inspector/front-end/MetricsSidebarPane.js:
1954         (WebInspector.MetricsSidebarPane.prototype.startEditing):
1955         * inspector/front-end/ObjectPropertiesSection.js:
1956         (WebInspector.ObjectPropertyTreeElement.prototype.startEditing):
1957         * inspector/front-end/Section.js:
1958         (WebInspector.Section):
1959         (WebInspector.Section.prototype.get subtitleAsTextForTest):
1960         (WebInspector.Section.prototype.get nextSibling):
1961         (WebInspector.Section.prototype.get previousSibling):
1962         * inspector/front-end/SourceFrame.js:
1963         (WebInspector.SourceFrame.prototype._editBreakpointCondition):
1964         * inspector/front-end/StylesSidebarPane.js:
1965         (WebInspector.StylePropertiesSection.prototype.nextEditableSibling):
1966         (WebInspector.StylePropertiesSection.prototype.previousEditableSibling):
1967         (WebInspector.StylePropertiesSection.prototype.addNewBlankProperty):
1968         (WebInspector.StylePropertiesSection.prototype.startEditingSelector):
1969         (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted):
1970         (WebInspector.StylePropertyTreeElement.prototype.):
1971         (WebInspector.StylePropertyTreeElement.prototype):
1972         * inspector/front-end/TextViewer.js:
1973         (WebInspector.TextViewer.prototype._handleDoubleClick):
1974         * inspector/front-end/WatchExpressionsSidebarPane.js:
1975         (WebInspector.WatchExpressionTreeElement.prototype.startEditing):
1976         * inspector/front-end/inspector.css:
1977         (.child-editing):
1978         * inspector/front-end/inspector.js:
1979         (WebInspector.startEditing.defaultFinishHandler):
1980         (WebInspector.startEditing):
1981         * inspector/front-end/treeoutline.js:
1982         (TreeElement.prototype.select):
1983
1984 2010-12-13  Yael Aharon  <yael.aharon@nokia.com>
1985
1986         Unreviewed.
1987
1988         Added svn propery eol-style. Patches to this file fail to apply on Windows EWS bot.
1989
1990         * accessibility/AccessibilityAllInOne.cpp: Added property svn:eol-style.
1991
1992 2010-12-13  Sheriff Bot  <webkit.review.bot@gmail.com>
1993
1994         Unreviewed, rolling out r73898.
1995         http://trac.webkit.org/changeset/73898
1996         https://bugs.webkit.org/show_bug.cgi?id=50919
1997
1998         FileSystem and Database API's were broken (Requested by loislo
1999         on #webkit).
2000
2001         * inspector/Inspector.idl:
2002         * inspector/InspectorDebuggerAgent.cpp:
2003         (WebCore::InspectorDebuggerAgent::didParseSource):
2004         * inspector/InspectorProfilerAgent.cpp:
2005         (WebCore::InspectorProfilerAgent::resetState):
2006         * inspector/front-end/DOMAgent.js:
2007         * inspector/front-end/DebuggerModel.js:
2008         (WebInspector.DebuggerModel):
2009         (WebInspector.DebuggerModel.prototype.debuggerPaused):
2010         (WebInspector.DebuggerModel.prototype.debuggerResumed):
2011         * inspector/front-end/ProfilesPanel.js:
2012         (WebInspector.ProfilesPanel):
2013         (WebInspector.ProfilesPanel.prototype.updateMainViewWidth):
2014         * inspector/front-end/ResourceManager.js:
2015         (WebInspector.ResourceManager):
2016         (WebInspector.ResourceManager.prototype._registerNotifyHandlers):
2017         (WebInspector.ResourceManager.prototype._unbindResourceURL):
2018         * inspector/front-end/inspector.js:
2019         (WebInspector.addDatabase):
2020         (WebInspector.addDOMStorage):
2021         (WebInspector.updateDOMStorage):
2022         (WebInspector.updateApplicationCacheStatus):
2023         (WebInspector.didGetFileSystemPath):
2024         (WebInspector.didGetFileSystemError):
2025         (WebInspector.didGetFileSystemDisabled):
2026         (WebInspector.updateNetworkState):
2027         (WebInspector.attachDebuggerWhenShown):
2028         (WebInspector.debuggerWasEnabled):
2029         (WebInspector.debuggerWasDisabled):
2030         (WebInspector.profilerWasEnabled):
2031         (WebInspector.profilerWasDisabled):
2032         (WebInspector.parsedScriptSource):
2033         (WebInspector.restoredBreakpoint):
2034         (WebInspector.failedToParseScriptSource):
2035         (WebInspector.pausedScript):
2036         (WebInspector.resumedScript):
2037         (WebInspector.resetProfilesPanel):
2038         (WebInspector.didCommitLoad):
2039         (WebInspector.addProfileHeader):
2040         (WebInspector.setRecordingProfile):
2041         (WebInspector.addHeapSnapshotChunk):
2042         (WebInspector.finishHeapSnapshot):
2043
2044 2010-12-13  Anton Muhin  <antonm@chromium.org>
2045
2046         Reviewed by Pavel Feldman.
2047
2048         [v8] More CSS wrappers GC work: keep document's style sheets, style sheet and css rule lists' items in proper object groups
2049         https://bugs.webkit.org/show_bug.cgi?id=50828
2050
2051         * bindings/v8/DOMData.h:
2052         (WebCore::DOMData::WrapperMapObjectRemover::visitDOMWrapper):
2053         (WebCore::DOMData::removeObjectsFromWrapperMap):
2054         * bindings/v8/DOMDataStore.h:
2055         (WebCore::ChunkedTable::visit):
2056         (WebCore::ChunkedTable::visitEntries):
2057         (WebCore::DOMDataStore::IntrusiveDOMWrapperMap::visit):
2058         (WebCore::DOMDataStore::IntrusiveDOMWrapperMap::ChunkedTableTraits::visit):
2059         * bindings/v8/V8DOMMap.cpp:
2060         (WebCore::removeAllDOMObjectsInCurrentThread):
2061         (WebCore::visitDOMNodesInCurrentThread):
2062         (WebCore::visitDOMObjectsInCurrentThread):
2063         (WebCore::visitActiveDOMObjectsInCurrentThread):
2064         (WebCore::visitDOMSVGElementInstancesInCurrentThread):
2065         * bindings/v8/V8DOMMap.h:
2066         (WebCore::WeakReferenceMap::visit):
2067         * bindings/v8/V8GCController.cpp:
2068         (WebCore::DOMObjectVisitor::visitDOMWrapper):
2069         (WebCore::EnsureWeakDOMNodeVisitor::visitDOMWrapper):
2070         (WebCore::GCPrologueVisitor::visitDOMWrapper):
2071         (WebCore::NodeGrouperVisitor::visitDOMWrapper):
2072         (WebCore::NodeGrouperVisitor::applyGrouping):
2073         (WebCore::DOMObjectGrouperVisitor::visitDOMWrapper):
2074         (WebCore::GCEpilogueVisitor::visitDOMWrapper):
2075
2076 2010-12-13  Zoltan Herczeg  <zherczeg@webkit.org>
2077
2078         Unreviewed build fix for r73894.
2079
2080         SVGFEImage should also check its hasResult() in its apply().
2081
2082         * svg/graphics/filters/SVGFEImage.cpp:
2083         (WebCore::FEImage::apply):
2084
2085 2010-12-13  Ilya Tikhonovsky  <loislo@chromium.org>
2086
2087         Reviewed by Yury Semikhatsky.
2088
2089         Web Inspector: Protocol cleanup task. Assign domain attribute to Resources and Debugger specific functions.
2090
2091         Debugger and Resources related notification functions of Inspector.idl were
2092         marked as such with help of "domain" attribute. The other changes in js files
2093         are reflecting this change. Some wrappers in WebInspector namespace were dropped,
2094         the others were moved to DebuggerModel class.
2095
2096         https://bugs.webkit.org/show_bug.cgi?id=50906
2097
2098         * inspector/Inspector.idl:
2099         * inspector/InspectorDebuggerAgent.cpp:
2100         (WebCore::InspectorDebuggerAgent::didParseSource):
2101         * inspector/InspectorProfilerAgent.cpp:
2102         (WebCore::InspectorProfilerAgent::resetState):
2103         * inspector/front-end/DOMAgent.js:
2104         (WebInspector.DOMAgent.prototype.didCommitLoad):
2105         * inspector/front-end/DebuggerModel.js:
2106         (WebInspector.DebuggerModel):
2107         (WebInspector.DebuggerModel.prototype.pausedScript):
2108         (WebInspector.DebuggerModel.prototype.resumedScript):
2109         (WebInspector.DebuggerModel.prototype.attachDebuggerWhenShown):
2110         (WebInspector.DebuggerModel.prototype.debuggerWasEnabled):
2111         (WebInspector.DebuggerModel.prototype.debuggerWasDisabled):
2112         (WebInspector.DebuggerModel.prototype.parsedScriptSource):
2113         (WebInspector.DebuggerModel.prototype.failedToParseScriptSource):
2114         * inspector/front-end/ProfilesPanel.js:
2115         (WebInspector.ProfilesPanel):
2116         (WebInspector.ProfilesPanel.prototype.addHeapSnapshots):
2117         (WebInspector.ProfilesPanel.prototype.updateMainViewWidth):
2118         (WebInspector.ProfilesPanel.prototype.setRecordingProfile):
2119         * inspector/front-end/ResourceManager.js:
2120         (WebInspector.ResourceManager):
2121         (WebInspector.ResourceManager.prototype._unbindResourceURL):
2122         (WebInspector.ResourceManager.prototype.updateDOMStorage):
2123         (WebInspector.ResourceManager.prototype.updateApplicationCacheStatus):
2124         (WebInspector.ResourceManager.prototype.didGetFileSystemPath):
2125         (WebInspector.ResourceManager.prototype.didGetFileSystemError):
2126         (WebInspector.ResourceManager.prototype.didGetFileSystemDisabled):
2127         (WebInspector.ResourceManager.prototype.updateNetworkState):
2128         (WebInspector.ResourceManager.prototype.addDatabase):
2129         (WebInspector.ResourceManager.prototype.addDOMStorage):
2130         * inspector/front-end/inspector.js:
2131
2132 2010-12-13  Zoltan Herczeg  <zherczeg@webkit.org>
2133
2134         Reviewed by Dirk Schulze.
2135
2136         Better result passing in filter primitives
2137         https://bugs.webkit.org/show_bug.cgi?id=49907
2138
2139         SVG filter primitives can use the output of other filters. The
2140         input and output format of a filter can be a premultiplied or
2141         unmultiplied RGBA array, or an image buffer. All filter
2142         primitive results were converted to image buffers before, which
2143         could be an unecessary (and really costly) operation, if
2144         a filter expects its input in the same format as the output
2145         of the input filter primitive. This overhead is removed by
2146         this patch. All apply() methods are updated according to this
2147         new filter primitive interface.
2148
2149         Filters do not generate their results twice (or more) anymore,
2150         when their apply() called multiple times.
2151
2152         The existing tests cover this feature.
2153
2154         * manual-tests/svg-filter-animation.svg: Added.
2155         * platform/graphics/filters/FEBlend.cpp:
2156         (WebCore::FEBlend::apply):
2157         * platform/graphics/filters/FEColorMatrix.cpp:
2158         (WebCore::FEColorMatrix::apply):
2159         * platform/graphics/filters/FEComponentTransfer.cpp:
2160         (WebCore::FEComponentTransfer::apply):
2161         * platform/graphics/filters/FEComposite.cpp:
2162         (WebCore::FEComposite::apply):
2163         * platform/graphics/filters/FEConvolveMatrix.cpp:
2164         (WebCore::FEConvolveMatrix::apply):
2165         * platform/graphics/filters/FEDisplacementMap.cpp:
2166         (WebCore::FEDisplacementMap::apply):
2167         * platform/graphics/filters/FEFlood.cpp:
2168         (WebCore::FEFlood::apply):
2169         * platform/graphics/filters/FEGaussianBlur.cpp:
2170         (WebCore::FEGaussianBlur::apply):
2171         * platform/graphics/filters/FELighting.cpp:
2172         (WebCore::FELighting::apply):
2173         * platform/graphics/filters/FEMerge.cpp:
2174         (WebCore::FEMerge::apply):
2175         * platform/graphics/filters/FEMerge.h:
2176         * platform/graphics/filters/FEMorphology.cpp:
2177         (WebCore::FEMorphology::apply):
2178         * platform/graphics/filters/FEOffset.cpp:
2179         (WebCore::FEOffset::apply):
2180         * platform/graphics/filters/FETile.cpp:
2181         (WebCore::FETile::apply):
2182         * platform/graphics/filters/FETurbulence.cpp:
2183         (WebCore::FETurbulence::apply):
2184         * platform/graphics/filters/FilterEffect.cpp:
2185         (WebCore::FilterEffect::requestedRegionOfInputImageData):
2186         (WebCore::FilterEffect::asImageBuffer):
2187         (WebCore::FilterEffect::asUnmultipliedImage):
2188         (WebCore::FilterEffect::asPremultipliedImage):
2189         (WebCore::FilterEffect::copyImageBytes):
2190         (WebCore::FilterEffect::copyUnmultipliedImage):
2191         (WebCore::FilterEffect::copyPremultipliedImage):
2192         (WebCore::FilterEffect::createImageBufferResult):
2193         (WebCore::FilterEffect::createUnmultipliedImageResult):
2194         (WebCore::FilterEffect::createPremultipliedImageResult):
2195         * platform/graphics/filters/FilterEffect.h:
2196         (WebCore::FilterEffect::hasResult):
2197         * platform/graphics/filters/SourceAlpha.cpp:
2198         (WebCore::SourceAlpha::apply):
2199         * platform/graphics/filters/SourceGraphic.cpp:
2200         (WebCore::SourceGraphic::apply):
2201         * platform/graphics/filters/SourceGraphic.h:
2202         * rendering/RenderSVGResourceFilter.cpp:
2203         (WebCore::RenderSVGResourceFilter::postApplyResource):
2204         * svg/graphics/filters/SVGFEImage.cpp:
2205         (WebCore::FEImage::apply):
2206
2207 2010-12-13  Csaba Osztrogonác  <ossy@webkit.org>
2208
2209         Unreviewed.
2210
2211         * WebCore.pro: Remove non-existant loader/Request.h from build system.
2212
2213 2010-12-13  Noel Gordon  <noel.gordon@gmail.com>
2214
2215         Reviewed by Eric Seidel.
2216
2217         [chromium] Reduce canvas.toDataURL("image/jpeg") run-time cost by 10%
2218         https://bugs.webkit.org/show_bug.cgi?id=50804
2219
2220         Follow on from r73173, unroll the SkUnPreMultiply::PMColorToColor() call
2221         viz., compute the unpremultiplatcion in-place. This reduces the run-time
2222         cost of jpeg encoding by 10-15% for my image test set.
2223
2224         No new tests: canvas.toDataURL() is covered by existing tests.
2225
2226         * platform/image-encoders/skia/JPEGImageEncoder.cpp:
2227         (WebCore::preMultipliedBGRAtoRGB):
2228
2229 2010-12-13  Helder Correia  <helder@sencha.com>
2230
2231         Reviewed by Eric Seidel.
2232
2233         [Qt] StillImage::draw() should use ContextShadow
2234         https://bugs.webkit.org/show_bug.cgi?id=50849
2235
2236         The branch that checks for a shadow requirement in StillImage::draw()
2237         is executed when drawing a canvas onto a canvas with
2238         ctx1.drawImage(canvas2, x, y). The current implementation supports
2239         solid shadows only. And if transformations are present, the offset gets
2240         transformed as well. Thus, ContextShadow must be used instead in order
2241         to support blur and correct offset transformations.
2242
2243         Test: fast/canvas/canvas-draw-canvas-on-canvas-shadow.html
2244
2245         * platform/graphics/qt/StillImageQt.cpp:
2246         (WebCore::StillImage::draw):
2247
2248 2010-12-12  Jon Honeycutt  <jhoneycutt@apple.com>
2249
2250         Unreviewed build fix.
2251
2252         * editing/EditingAllInOne.cpp:
2253         Add new file to the all-in-one.
2254
2255 2010-12-12  Jon Honeycutt  <jhoneycutt@apple.com>
2256
2257         Unreviewed build fix.
2258
2259         * WebCore.vcproj/WebCore.vcproj:
2260         Remove accidentally-committed conflict marker.
2261
2262 2010-10-28  MORITA Hajime  <morrita@google.com>
2263
2264         Reviewed by Ojan Vafai.
2265
2266         spellcheck does not check pasted text
2267         https://bugs.webkit.org/show_bug.cgi?id=40092
2268
2269         - Introduced SpellChecker class to encapsulate asynchronous spell
2270           checker state: sequence id, requesting text and target node.
2271           This is also the first step to decompose spell-check related
2272           code to a separate class.
2273         - Added EditorClient::isAsynchronousSpellCheckingEnabled() 
2274           to use async spellcheck API on the platform.
2275           These APIs are touched by SpellChecker.
2276         - Used SpellChecker to check a pasted test. Text to check is
2277           collected from the subtree under the editingRoot.
2278         - Added Setting::m_asynchronousSpellCheckingEnabled to control
2279           async spell checking.
2280
2281         Test: editing/spelling/spellcheck-paste.html
2282
2283         * CMakeLists.txt:
2284         * GNUmakefile.am:
2285         * WebCore.exp.in:
2286         * WebCore.gypi:
2287         * WebCore.pro:
2288         * WebCore.vcproj/WebCore.vcproj:
2289         * WebCore.xcodeproj/project.pbxproj:
2290         * dom/DocumentMarkerController.cpp:
2291         (WebCore::DocumentMarkerController::showMarkers):
2292         (showDocumentMarkers):
2293         * dom/DocumentMarkerController.h:
2294         * dom/PositionIterator.cpp:
2295         (WebCore::PositionIterator::setOffsetInLeafNode):
2296         * dom/PositionIterator.h:
2297         * editing/Editor.cpp:
2298         (WebCore::Editor::replaceSelectionWithFragment):
2299         (WebCore::Editor::Editor):
2300         (WebCore::findFirstMarkable):
2301         (WebCore::Editor::selectionStartHasSpellingMarkerFor):
2302         * editing/Editor.h:
2303         (WebCore::Editor::spellChecker):
2304         * editing/SpellChecker.cpp: Added.
2305         (WebCore::SpellChecker::SpellChecker):
2306         (WebCore::SpellChecker::~SpellChecker):
2307         (WebCore::SpellChecker::initRequest):
2308         (WebCore::SpellChecker::clearRequest):
2309         (WebCore::SpellChecker::isAsynchronousEnabled):
2310         (WebCore::SpellChecker::canCheckAsynchronously):
2311         (WebCore::SpellChecker::isBusy):
2312         (WebCore::SpellChecker::isValid):
2313         (WebCore::SpellChecker::isCheckable):
2314         (WebCore::SpellChecker::requestCheckingFor):
2315         (WebCore::forwardIterator):
2316         (WebCore::SpellChecker::didCheck):
2317         * editing/SpellChecker.h: Added.
2318         (WebCore::SpellCheckingResult::SpellCheckingResult):
2319         (WebCore::SpellCheckingResult::type):
2320         (WebCore::SpellCheckingResult::location):
2321         (WebCore::SpellCheckingResult::length):
2322         * loader/EmptyClients.h:
2323         (WebCore::EmptyEditorClient::requestCheckingOfString):
2324         * page/EditorClient.h:
2325         * page/Settings.cpp:
2326         (WebCore::Settings::Settings):
2327         * page/Settings.h:
2328         (WebCore::Settings::setAsynchronousSpellCheckingEnabled):
2329         (WebCore::Settings::asynchronousSpellCheckingEnabled):
2330
2331 2010-12-09  Antonio Gomes  <agomes@rim.com>
2332
2333         Reviewed by Daniel Bates.
2334
2335         Spatial Navigation: code clean up (part II)
2336         https://bugs.webkit.org/show_bug.cgi?id=50666
2337
2338         No new tests needed.
2339
2340         * page/FocusController.cpp: Removed static declaration of updateFocusCandidateIfNeeded() from
2341         the top of FocusController.cpp, and added the 'static' keyword where the function is implemented;
2342         * page/SpatialNavigation.cpp: In FocusCandidate constructor, renamed 'n' to 'node', and added an assert to it;
2343         (WebCore::FocusCandidate::FocusCandidate):
2344         (WebCore::virtualRectForAreaElementAndDirection): Added an assert to 'node';
2345         * page/SpatialNavigation.h:I reordered the declaration of some methods in order to group related ones;
2346         Removed isScrollableContainerNode() function declaration since it is not used outside SpatialNavigation.cpp;
2347         And removed the declaration of isNodeDeepDescendantOfDocument() since it does not exist anymore.
2348
2349 2010-12-12  Philippe Normand  <pnormand@igalia.com>
2350
2351         Reviewed by Xan Lopez.
2352
2353         build-webkit --gtk --minimal fails
2354         https://bugs.webkit.org/show_bug.cgi?id=46267
2355
2356         No new tests, build fix only.
2357
2358         * GNUmakefile.am: Include some JS bindings generated headers in
2359         the build even if their corresponding feature is disabled. They
2360         are needed to make the DOM bindings build.
2361
2362 2010-12-12  Sam Magnuson  <smagnuso@gmail.com>
2363
2364         Reviewed by Eric Seidel.
2365
2366         [Qt] Compile with QT_NO_QUUID_STRING.
2367         https://bugs.webkit.org/show_bug.cgi?id=49745
2368
2369         * platform/UUID.cpp:
2370         (WebCore::createCanonicalUUIDString):
2371
2372 2010-12-12  Ragner Magalhaes  <ragner.magalhaes@openbossa.org>
2373
2374         Reviewed by Eric Seidel.
2375
2376         [Qt] Missing style for date pickers on Qt Mobile theme
2377         https://bugs.webkit.org/show_bug.cgi?id=50628
2378
2379         * css/themeQtMobile.css:
2380
2381 2010-12-11  Alice Liu  <alice.liu@apple.com>
2382
2383         Mac build fix.
2384
2385         * platform/network/mac/ResourceResponseMac.mm:
2386         (WebCore::ResourceResponse::platformLazyInit):
2387         Resolve string[0] ambiguity by passing 0U.
2388
2389 2010-12-11  Adam Barth  <abarth@webkit.org>
2390
2391         Reviewed by Sam Weinig.
2392
2393         [V8] Move to DOMWindow::setLocation
2394         https://bugs.webkit.org/show_bug.cgi?id=50876
2395
2396         Recently, JavaScriptCore moved to implementing setLocation in WebCore.
2397         This patch change V8 to use that common code path.  I haven't removed
2398         the old code path because it's still used for other things (like
2399         assigning window.location.href), but I'll move the rest over in a
2400         future patch.
2401
2402         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2403         (WebCore::V8DOMWindow::locationAccessorSetter):
2404         * bindings/v8/specialization/V8BindingState.cpp:
2405         (WebCore::::getFirstWindow):
2406         * bindings/v8/specialization/V8BindingState.h:
2407
2408 2010-10-11  Diego Gonzalez  <diegohcg@webkit.org>
2409
2410         Reviewed by Kenneth Rohde Christiansen.
2411
2412         [Qt] Mock DeviceOrientation client for DRT
2413         https://bugs.webkit.org/show_bug.cgi?id=47490
2414
2415         * WebCore.pro:
2416
2417 2010-12-11  Joone Hur  <joone@kldp.org>
2418
2419         Reviewed by Alexey Proskuryakov.
2420
2421         enumeration value ‘ResponseTypeArrayBuffer’ not handled in switch
2422         https://bugs.webkit.org/show_bug.cgi?id=50871
2423
2424         Fix the warning which occurs when enumeration value is not handled in switch.
2425
2426         No new tests, no change in behavior.
2427
2428         * bindings/js/JSXMLHttpRequestCustom.cpp:
2429         (WebCore::JSXMLHttpRequest::response):
2430
2431 2010-12-11  Patrick Gansterer  <paroga@webkit.org>
2432
2433         Reviewed by Darin Adler.
2434
2435         Add an overload to makeString for Vector<char>
2436         https://bugs.webkit.org/show_bug.cgi?id=50123
2437
2438         This also contains a segfault fix for ImageBuffer::toDataURL of the Haiku port.
2439
2440         * platform/graphics/cg/ImageBufferCG.cpp:
2441         (WebCore::ImageBuffer::toDataURL):
2442         * platform/graphics/gtk/ImageBufferGtk.cpp:
2443         (WebCore::ImageBuffer::toDataURL):
2444         * platform/graphics/haiku/ImageBufferHaiku.cpp:
2445         (WebCore::ImageBuffer::toDataURL):
2446         * platform/graphics/skia/ImageBufferSkia.cpp:
2447         (WebCore::ImageBuffer::toDataURL):
2448
2449 2010-12-10  Alexey Proskuryakov  <ap@apple.com>
2450
2451         Mac build fix.
2452
2453         * platform/network/cf/ResourceResponseCFNet.cpp: (WebCore::ResourceResponse::platformLazyInit):
2454         Resolve string[0] ambiguity by passing 0U.
2455
2456 2010-12-10  Steve Falkenburg  <sfalken@apple.com>
2457
2458         Windows production build fix.
2459         
2460         Only the vsprops are indirected through WebKitVSPropsRedirectionDir, not the scripts in WebKitLibraries/win/tools/scripts.
2461
2462         * WebCore.vcproj/WebCoreGeneratedCommon.vsprops:
2463         * WebCore.vcproj/build-generated-files.sh:
2464
2465 2010-12-10  John Knottenbelt  <jknotten@chromium.org>
2466
2467         Reviewed by Eric Seidel.
2468
2469         Remove WebCore/platform/mac/GeolocationService.{h,mm}
2470         https://bugs.webkit.org/show_bug.cgi?id=50074
2471
2472         Remove unused non-client-based geolocation code.
2473
2474         * platform/mac/GeolocationServiceMac.h: Removed.
2475         * platform/mac/GeolocationServiceMac.mm: Removed.
2476
2477 2010-12-10  Alexey Proskuryakov  <ap@apple.com>
2478
2479         Reviewed by Darin Adler.
2480
2481         https://bugs.webkit.org/show_bug.cgi?id=46573
2482         <rdar://problem/8479389> REGRESSION: charset="utf-8" (with quotes) doesn't work
2483
2484         Test: http/tests/mime/quoted-charset.php
2485
2486         * platform/network/cf/ResourceResponseCFNet.cpp: (WebCore::ResourceResponse::platformLazyInit):
2487         * platform/network/mac/ResourceResponseMac.mm: (WebCore::ResourceResponse::platformLazyInit):
2488         Work around a CFNetwork issue, strip quotes if they are present.
2489
2490 2010-12-10  Vincent Scheib  <scheib@chromium.org>
2491
2492         Reviewed by James Robinson.
2493
2494         Shader::loadShader() must initialize variable passed to getShaderiv
2495         https://bugs.webkit.org/show_bug.cgi?id=50842
2496
2497         Test: fast/canvas/canvas-largedraws.html
2498
2499         * platform/graphics/gpu/Shader.cpp:
2500         (WebCore::Shader::loadShader):
2501
2502 2010-12-10  Vincent Scheib  <scheib@chromium.org>
2503
2504         Reviewed by James Robinson.
2505
2506         Texture::updateSubRect should pass IntRect by reference
2507         https://bugs.webkit.org/show_bug.cgi?id=50845
2508
2509         No test, changing to pass by ref.
2510
2511         * platform/graphics/gpu/Texture.cpp:
2512         (WebCore::Texture::updateSubRect):
2513         * platform/graphics/gpu/Texture.h:
2514
2515 2010-12-10  Darin Adler  <darin@apple.com>
2516
2517         Reviewed by Sam Weinig.
2518
2519         Move open and showModalDialog implementations from bindings into DOM class DOMWindow
2520         https://bugs.webkit.org/show_bug.cgi?id=50836
2521
2522         * bindings/js/JSDOMWindowCustom.cpp:
2523         (WebCore::JSDOMWindow::open): Removed most of the code and changed to call
2524         DOMWindow::open.
2525         (WebCore::DialogHandler::DialogHandler): Added. Object is used to handle the
2526         arguments and return value in showModalDialog.
2527         (WebCore::DialogHandler::dialogCreated): Ditto.
2528         (WebCore::DialogHandler::returnValue): Ditto.
2529         (WebCore::setUpDialog): Added. Function passed to showModalDialog that just
2530         casts pointer to DialogHandler can calls dialogCreated.
2531         (WebCore::JSDOMWindow::showModalDialog): Removed most of the code and changed
2532         to call DOMWindow::showModalDialog.
2533         (WebCore::JSDOMWindow::postMessage): Made style match the rest of the file by
2534         renaming local variables and getting rid of a needless ones.
2535
2536         * page/DOMWindow.cpp:
2537         (WebCore::DOMWindow::parseModalDialogFeatures): Moved body of this function
2538         to the WindowFeatures class.
2539         (WebCore::DOMWindow::allowPopUp): Renamed argument from activeFrame to firstFrame,
2540         because that's the frame we pass in here. Also added an overload so this can be
2541         called on a window rather than a frame.
2542         (WebCore::DOMWindow::setLocation): Renamed a couple variables so the names are
2543         the same as in open and showModalDialog. Factored the JavaScript security check
2544         into a new function named isInsecureScriptAccess.
2545         (WebCore::DOMWindow::isInsecureScriptAccess): Here is the new function.
2546         (WebCore::DOMWindow::createWindow): Added. Contains logic shared by open and
2547         showModalDialog just as the function named createWindow in JSDOMWindowCustom.cpp
2548         used to.
2549         (WebCore::DOMWindow::open): Added. Code from JSDOMWindowCustom without the
2550         JavaScript language binding part, and with a bit of refactoring to share code
2551         with the rest of the DOMWindow class.
2552         (WebCore::DOMWindow::showModalDialog): Ditto.
2553
2554         * page/DOMWindow.h: Moved conditional parts of the file into separate paragraphs
2555         in alphabetical order so they are not scattered thorugh the file. Removed redundant
2556         includes. Added some blank lines for clarity. Added an open function and a
2557         showModalDialog function. Added private createWindow and isInsecureScriptAccess
2558         functions.
2559
2560         * page/WindowFeatures.cpp:
2561         (WebCore::isWindowFeaturesSeparator): Renamed from isSeparator for clarity.
2562         (WebCore::WindowFeatures::WindowFeatures): Updated for name change. Used isEmpty
2563         instead of checking length. Added a new constructor for use when making dialogs,
2564         with code from the showModalDialog function.
2565         (WebCore::WindowFeatures::boolFeature): Use DialogFeaturesMap typedef.
2566         (WebCore::WindowFeatures::floatFeature): Use DialogFeaturesMap typedef.
2567         Renamed a local variable and tweaked the comments a bit.
2568         (WebCore::WindowFeatures::parseDialogFeatures): Added. Code moved here from
2569         DOMWindow::parseDialogFeatures and refactored a bit.
2570
2571         * page/WindowFeatures.h: Added new constructor, new parseDialogFeatures
2572         function, DialogFeaturesMap typedef, and made setWindowFeature function private.
2573
2574 2010-12-10  Chris Fleizach  <cfleizach@apple.com>
2575
2576         Reviewed by Darin Adler.
2577
2578         AX: refactor AccessibilityRenderObject::doAccessibilityHitTest
2579         https://bugs.webkit.org/show_bug.cgi?id=50574
2580
2581         Refactors accessibility hit testing to allow for a more flexible model when handling elements
2582         with fake sub-elements (like sliders or list boxes).
2583
2584         Renamed doAccessibilityHitTest -> accessibilityHitTest, which is called on the root
2585         accessibility render object. Then subclassers are able to override 
2586         elementAccessibilityHitTest to return their own specific elements.
2587
2588         * accessibility/AccessibilityListBox.cpp:
2589         (WebCore::AccessibilityListBox::elementAccessibilityHitTest):
2590         * accessibility/AccessibilityListBox.h:
2591         * accessibility/AccessibilityObject.h:
2592         (WebCore::AccessibilityObject::accessibilityHitTest):
2593         (WebCore::AccessibilityObject::elementAccessibilityHitTest):
2594         * accessibility/AccessibilityRenderObject.cpp:
2595         (WebCore::AccessibilityRenderObject::accessibilityHitTest):
2596         * accessibility/AccessibilityRenderObject.h:
2597         * accessibility/AccessibilitySlider.cpp:
2598         (WebCore::AccessibilitySlider::elementAccessibilityHitTest):
2599         * accessibility/AccessibilitySlider.h:
2600         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
2601         (webkit_accessible_component_ref_accessible_at_point):
2602         * accessibility/mac/AccessibilityObjectWrapper.mm:
2603         (-[AccessibilityObjectWrapper accessibilityHitTest:]):
2604
2605 2010-12-10  Kenneth Russell  <kbr@google.com>
2606
2607         Reviewed by Darin Adler.
2608
2609         Clean up assertion in Extensions3DOpenGL.cpp
2610         https://bugs.webkit.org/show_bug.cgi?id=50852
2611
2612         Built Release mode to test. No functionality change.
2613
2614         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
2615         (WebCore::Extensions3DOpenGL::ensureEnabled):
2616
2617 2010-12-10  Cosmin Truta  <ctruta@chromium.org>
2618
2619         Reviewed by Eric Seidel.
2620
2621         Crash while processing ill-formed <textPath> ouside of <text>
2622         https://bugs.webkit.org/show_bug.cgi?id=47759
2623
2624         Renderers within a <text> subtree are created only when their corresponding elements
2625         satisfy the content model.
2626
2627         Test: svg/custom/invalid-text-content.svg
2628
2629         * svg/SVGTRefElement.cpp:
2630         (WebCore::SVGTRefElement::childShouldCreateRenderer): Fixed to comply with the content model.
2631         (WebCore::SVGTRefElement::rendererIsNeeded): Added.
2632         * svg/SVGTRefElement.h:
2633         * svg/SVGTSpanElement.cpp:
2634         (WebCore::SVGTSpanElement::childShouldCreateRenderer): Fixed to comply with the content model.
2635         (WebCore::SVGTSpanElement::rendererIsNeeded): Added.
2636         * svg/SVGTSpanElement.h: Changed indentation.
2637         * svg/SVGTextElement.cpp:
2638         (WebCore::SVGTextElement::childShouldCreateRenderer): Reformatted.
2639         * svg/SVGTextPathElement.cpp:
2640         (WebCore::SVGTextPathElement::childShouldCreateRenderer): Fixed to comply with the content model.
2641         (WebCore::SVGTextPathElement::rendererIsNeeded): Added.
2642         * svg/SVGTextPathElement.h:
2643
2644 2010-12-10  Zhenyao Mo  <zmo@google.com>
2645
2646         Reviewed by Adam Barth.
2647
2648         Use enums instead of booleans in ImageSource/ImageDecoder constructors
2649         https://bugs.webkit.org/show_bug.cgi?id=50818
2650
2651         This patch basically defines two enum type in ImageSource: AlphaOption
2652         and GammaAndColorProfileOption and use them as ImageSource and ImageDecoder
2653         constructor parameters instead of boolean typs.
2654
2655         * platform/graphics/ImageSource.cpp:
2656         (WebCore::ImageSource::ImageSource):
2657         (WebCore::ImageSource::setData):
2658         * platform/graphics/ImageSource.h: Define the two enum types.
2659         * platform/graphics/cg/GraphicsContext3DCG.cpp:
2660         (WebCore::GraphicsContext3D::getImageData):
2661         * platform/graphics/cg/ImageSourceCG.cpp:
2662         (WebCore::ImageSource::ImageSource):
2663         * platform/graphics/qt/ImageDecoderQt.cpp:
2664         (WebCore::ImageDecoder::create):
2665         (WebCore::ImageDecoderQt::ImageDecoderQt):
2666         * platform/graphics/qt/ImageDecoderQt.h:
2667         * platform/graphics/skia/GraphicsContext3DSkia.cpp:
2668         (WebCore::GraphicsContext3D::getImageData):
2669         * platform/image-decoders/ImageDecoder.cpp:
2670         (WebCore::ImageDecoder::create):
2671         * platform/image-decoders/ImageDecoder.h:
2672         (WebCore::ImageDecoder::ImageDecoder):
2673         * platform/image-decoders/bmp/BMPImageDecoder.cpp:
2674         (WebCore::BMPImageDecoder::BMPImageDecoder):
2675         * platform/image-decoders/bmp/BMPImageDecoder.h:
2676         * platform/image-decoders/gif/GIFImageDecoder.cpp:
2677         (WebCore::GIFImageDecoder::GIFImageDecoder):
2678         * platform/image-decoders/gif/GIFImageDecoder.h:
2679         * platform/image-decoders/ico/ICOImageDecoder.cpp:
2680         (WebCore::ICOImageDecoder::ICOImageDecoder):
2681         (WebCore::ICOImageDecoder::decodeAtIndex):
2682         * platform/image-decoders/ico/ICOImageDecoder.h:
2683         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
2684         (WebCore::JPEGImageDecoder::JPEGImageDecoder):
2685         * platform/image-decoders/jpeg/JPEGImageDecoder.h:
2686         * platform/image-decoders/png/PNGImageDecoder.cpp:
2687         (WebCore::PNGImageDecoder::PNGImageDecoder):
2688         * platform/image-decoders/png/PNGImageDecoder.h:
2689         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
2690         (WebCore::WEBPImageDecoder::WEBPImageDecoder):
2691         * platform/image-decoders/webp/WEBPImageDecoder.h:
2692
2693 2010-12-10  Ryosuke Niwa  <rniwa@webkit.org>
2694
2695         Reviewed by Darin Adler.
2696
2697         REGRESSION(r73799): editing/execCommand/4920488.html fails
2698         https://bugs.webkit.org/show_bug.cgi?id=50854
2699
2700         The regression was caused by Range::processContents's not extracting
2701         m_end.container()->firstChild(). Fixed the bug by always adding the first child.
2702
2703         * dom/Range.cpp:
2704         (WebCore::Range::processContents):
2705
2706 2010-12-10  Adam Barth  <abarth@webkit.org>
2707
2708         Reviewed by Eric Seidel.
2709
2710         REGRESSION: Infinite redirect on developer.apple.com
2711         https://bugs.webkit.org/show_bug.cgi?id=45627
2712
2713         Tests: fast/loader/form-submit-aborts-parsing.html
2714                fast/loader/location-change-aborts-parsing.html
2715
2716         This patch is not pretty, but it fixes the bug.  I stole this approach
2717         from the old HTML parser (as suggested by Eric Seidel).  The other
2718         approaches that folks tried for this bug are better, but it's inclear
2719         how to get them to work correctly.  I've added a large FIXME comment.
2720
2721         * html/parser/HTMLDocumentParser.cpp:
2722         (WebCore::HTMLDocumentParser::pumpTokenizer):
2723         * html/parser/HTMLTreeBuilder.h:
2724         (WebCore::HTMLTreeBuilder::isParsingFragment):
2725
2726 2010-12-10  Brian Weinstein  <bweinstein@apple.com>
2727
2728         Reviewed by Ada Chan.
2729
2730         When we are creating a ContextMenuItem, only call setSubMenu if we have
2731         a subMenu to set.
2732
2733         * platform/ContextMenuItem.cpp:
2734         (WebCore::ContextMenuItem::ContextMenuItem):
2735
2736 2010-12-10  Kenneth Russell  <kbr@google.com>
2737
2738         Unreviewed, another build fix. #include <wtf/UnusedParam.h> needed
2739         for Release builds.
2740
2741         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
2742
2743 2010-12-10  Kenneth Russell  <kbr@google.com>
2744
2745         Unreviewed, build fix. Change #ifndef NDEBUG to #ifdef NDEBUG.
2746
2747         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
2748         (WebCore::Extensions3DOpenGL::ensureEnabled):
2749
2750 2010-12-10  Kenneth Russell  <kbr@google.com>
2751
2752         Reviewed by James Robinson.
2753
2754         Implement extension entry points and remove EXTENSIONS enum
2755         https://bugs.webkit.org/show_bug.cgi?id=40316
2756
2757         Implemented WebGLRenderingContext's getSupportedExtensions and
2758         getExtensions entry points, and, to verify them, added support for
2759         the first specified WebGL extension, OES_texture_float. This
2760         extension is now advertised in the Chromium and WebKit ports when
2761         the underlying hardware supports it.
2762
2763         The new OES_texture_float test in the WebGL conformance suite
2764         verifies the allocation and population of floating point textures,
2765         and their use as render targets. However, because this extension
2766         is optional, it is not easily testable with a layout test; there
2767         is only one set of expectations for a given test, and two would be
2768         needed, one when the extension is available and one when it is not.
2769
2770         Tested with the oes-texture-float.html WebGL conformance test in
2771         Chromium and WebKit on Mac OS X on hardware that supports the
2772         extension. Also verified with a configuration that does not
2773         advertise the extension that this same test passes.
2774
2775         * CMakeLists.txt:
2776         * DerivedSources.make:
2777         * GNUmakefile.am:
2778         * WebCore.gypi:
2779         * WebCore.pri:
2780         * WebCore.pro:
2781         * WebCore.xcodeproj/project.pbxproj:
2782         * bindings/js/JSWebGLRenderingContextCustom.cpp:
2783         (WebCore::toJS):
2784         (WebCore::JSWebGLRenderingContext::markChildren):
2785         (WebCore::JSWebGLRenderingContext::getExtension):
2786         (WebCore::JSWebGLRenderingContext::getSupportedExtensions):
2787         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
2788         (WebCore::toV8Object):
2789         (WebCore::V8WebGLRenderingContext::getExtensionCallback):
2790         (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallback):
2791         * html/canvas/OESTextureFloat.cpp: Added.
2792         (WebCore::OESTextureFloat::OESTextureFloat):
2793         (WebCore::OESTextureFloat::~OESTextureFloat):
2794         (WebCore::OESTextureFloat::getName):
2795         (WebCore::OESTextureFloat::create):
2796         * html/canvas/OESTextureFloat.h: Added.
2797         * html/canvas/OESTextureFloat.idl: Added.
2798         * html/canvas/WebGLExtension.cpp: Added.
2799         (WebCore::WebGLExtension::WebGLExtension):
2800         (WebCore::WebGLExtension::~WebGLExtension):
2801         * html/canvas/WebGLExtension.h: Added.
2802         * html/canvas/WebGLRenderingContext.cpp:
2803         (WebCore::WebGLRenderingContext::getExtension):
2804         (WebCore::WebGLRenderingContext::getSupportedExtensions):
2805         (WebCore::WebGLRenderingContext::validateTexFuncFormatAndType):
2806         (WebCore::WebGLRenderingContext::validateTexFuncData):
2807         (WebCore::WebGLRenderingContext::getNumberOfExtensions):
2808         (WebCore::WebGLRenderingContext::getExtensionNumber):
2809         * html/canvas/WebGLRenderingContext.h:
2810         * html/canvas/WebGLRenderingContext.idl:
2811         * platform/graphics/Extensions3D.h:
2812         * platform/graphics/GraphicsContext3D.cpp:
2813         (WebCore::GraphicsContext3D::computeFormatAndTypeParameters):
2814         (WebCore::GraphicsContext3D::extractTextureData):
2815         (WebCore::doUnpackingAndPacking):
2816         (WebCore::doPacking):
2817         (WebCore::doFloatingPointPacking):
2818         (WebCore::GraphicsContext3D::packPixels):
2819         * platform/graphics/GraphicsContext3D.h:
2820         * platform/graphics/chromium/Extensions3DChromium.h:
2821         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
2822         (WebCore::Extensions3DOpenGL::supports):
2823         (WebCore::Extensions3DOpenGL::ensureEnabled):
2824         * platform/graphics/opengl/Extensions3DOpenGL.h:
2825         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2826         (WebCore::GraphicsContext3D::texImage2D):
2827         * platform/graphics/qt/Extensions3DQt.cpp:
2828         (WebCore::Extensions3DQt::ensureEnabled):
2829         * platform/graphics/qt/Extensions3DQt.h:
2830
2831 2010-12-10  Darin Adler  <darin@apple.com>
2832
2833         Try to fix Windows build.
2834
2835         * dom/Range.cpp:
2836         (WebCore::Range::processContents): Put typedef of NodeVector inside the function
2837         instead of at the top of the file, since the use is restricted to this function.
2838         There's another NodeVector in ContainerNode.cpp.
2839
2840 2010-12-09  Brian Weinstein  <bweinstein@apple.com>
2841
2842         Reviewed by Adam Roben.
2843
2844         Prep for WebKit2: Context menu support on Windows
2845         https://bugs.webkit.org/show_bug.cgi?id=50514
2846         
2847         Before this patch ContextMenu on Windows were backed by HMENUs, and ContextMenuItems
2848         were backed by MENUITEMINFOs. This meant they couldn't be copied, and they needed to
2849         be to work in WebKit2.
2850         
2851         This patch adds a new USE flag - CROSS_PLATFORM_CONTEXT_MENUS that are for a cross-platform
2852         representation of context menus. This patch also has Windows adopt them.
2853         
2854         Cross-platform context menus change the API of context menus and the ContextMenuClient. There
2855         is no more idea of a PlatformMenuDescription or a PlatformMenuItemDescription. Menus are backed
2856         by a Vector of ContextMenuItems, and menu items are backed by the variables they need (enabled, checked
2857         title, action, type, and submenu).
2858         
2859         This patch also refactors the ContextMenuClient interface to use a variation on the getCustomMenuFromDefaultItems
2860         function to allow for customization of the context menu.
2861         
2862         For other ports to use CROSS_PLATFORM_CONTEXT_MENUS, all they need to do is write conversion functions from
2863         a ContextMenu <-> native menu type, and ContextMenuItem <-> native menu item type. For Windows, this is done
2864         in ContextMenuWin.cpp and ContextMenuItemWin.cpp.
2865
2866         No new tests, no change in behavior.
2867
2868         * WebCore.vcproj/WebCore.vcproj: Add new files (only needed on Windows for now).
2869         * loader/EmptyClients.h:
2870         (WebCore::EmptyContextMenuClient::customizeMenu): Define this function if CROSS_PLATFORM_CONTEXT_MENUS
2871             is on.
2872         * page/ContextMenuClient.h: Ditto. 
2873         * page/ContextMenuController.cpp:
2874         (WebCore::ContextMenuController::showContextMenu): Call customizeMenu instead of 
2875             getCustomMenuFromDefaultItems if CROSS_PLATFORM_CONTEXT_MENUS is on.
2876         * platform/ContextMenu.cpp: Added.
2877         (WebCore::ContextMenu::ContextMenu): Empty constructor.
2878         (WebCore::ContextMenu::setItems): Sets the items in the menu.
2879         (WebCore::ContextMenu::items): Returns the items in the menu.
2880         (WebCore::ContextMenu::itemAtIndex):
2881         (WebCore::itemWithActionInMenu): Returns the item with the correct action, recursively descending
2882             into submenus.
2883         (WebCore::ContextMenu::itemWithAction): Calls through to itemWithActionInMenu.
2884         * platform/ContextMenu.h: Added a new set of functions and member variables that are defined for
2885             CROSS_PLATFORM_CONTEXT_MENUS.
2886         (WebCore::ContextMenu::appendItem): Appends an item to the menu.
2887         * platform/ContextMenuItem.cpp: Added.
2888         (WebCore::ContextMenuItem::ContextMenuItem):
2889         (WebCore::ContextMenuItem::~ContextMenuItem):
2890         (WebCore::ContextMenuItem::setSubMenu):
2891         * platform/ContextMenuItem.h:
2892         (WebCore::ContextMenuItem::type): Returns the type.
2893         (WebCore::ContextMenuItem::setType): Sets the type.
2894         (WebCore::ContextMenuItem::action): Returns the action.
2895         (WebCore::ContextMenuItem::setAction): Sets the action.
2896         (WebCore::ContextMenuItem::title): Returns the title.
2897         (WebCore::ContextMenuItem::setTitle): Sets the title.
2898         (WebCore::ContextMenuItem::checked): Returns whether or not the menu item is checked.
2899         (WebCore::ContextMenuItem::setChecked): Sets whether ot not the menu item is checked.
2900         (WebCore::ContextMenuItem::enabled): Returns whether or not the menu item is enabled.
2901         (WebCore::ContextMenuItem::setEnabled): Sets whether or not the menu item is enabled.
2902         (WebCore::ContextMenuItem::submenu): Returns the submenu.
2903         * platform/PlatformMenuDescription.h: Remove the idea if a PlatformMenuDescription if 
2904             CROSS_PLATFORM_CONTEXT_MENUS is on.
2905         * platform/win/ContextMenuItemWin.cpp:
2906         (WebCore::ContextMenuItem::ContextMenuItem): Creates a ContextMenuItem from a MENUITEMINFO.
2907         (WebCore::ContextMenuItem::nativeMenuItem): Creates and returns a MENUITEMINFO.
2908         * platform/win/ContextMenuWin.cpp:
2909         (WebCore::ContextMenu::ContextMenu): Creates a ContextMenu from an HMENU.
2910         (WebCore::ContextMenu::nativeMenu): Creates and returns an HMENU.
2911
2912 2010-12-10  Emil Eklund  <eae@chromium.org>
2913
2914         Reviewed by Adam Barth.
2915
2916         Fix crash in ReplaceSelectionCommand::doApply when selection is modified
2917         during execution.
2918         https://bugs.webkit.org/show_bug.cgi?id=50840
2919
2920         Test: editing/execCommand/insertHTML-mutation-crash.html
2921
2922         * editing/ReplaceSelectionCommand.cpp:
2923         (WebCore::ReplaceSelectionCommand::copyStyleToChildren):
2924         Replaced raw node pointer with RefPtr.
2925         
2926         (WebCore::ReplaceSelectionCommand::doApply):
2927         Replaced raw node pointer with RefPtr and added null check.
2928
2929 2010-12-10  Emil Eklund  <eae@chromium.org>
2930
2931         Reviewed by Adam Barth.
2932
2933         Fix crash in Range::processContents when modified during mutation event.
2934         https://bugs.webkit.org/show_bug.cgi?id=50710
2935
2936         Test: fast/dom/Range/range-extractContents.html
2937
2938         * dom/Range.cpp:
2939         (WebCore::Range::processContents):
2940         Replace raw pointers with RefPtrs and add checks.
2941
2942 2010-12-09  Enrica Casucci  <enrica@apple.com>
2943
2944         Reviewed by Alexey Proskuryakov.
2945
2946         Implement IME support for Mac.
2947         <rdar://problem/7660589> WebKit2: Implement IME support for Mac.
2948         https://bugs.webkit.org/show_bug.cgi?id=50788
2949
2950         * dom/KeyboardEvent.h:
2951         (WebCore::KeypressCommand::KeypressCommand): Removed ASSERT in constructor,
2952         since it is now used for more than one command.
2953
2954 2010-12-10  Jessie Berlin  <jberlin@apple.com>
2955
2956         Windows build fix. Unreviewed.
2957
2958         * WebCore.vcproj/WebCore.vcproj:
2959         Remove duplicate </File> tag.
2960
2961 2010-12-09  Jenn Braithwaite  <jennb@chromium.org>
2962
2963         Reviewed by Adam Barth.
2964
2965         TextResourceDecoder::checkForHeadCharset can look way past the limit.
2966         https://bugs.webkit.org/show_bug.cgi?id=47397
2967
2968         Replaced charset detection algorithm with real parser.
2969         Added tests for parser bugs mentioned in the thread for this bug report.
2970         Converted hixie's encoding parsing tests to a layout test.
2971
2972         Tests: fast/encoding/bracket-in-script.html
2973                fast/encoding/bracket-in-tag.html
2974                fast/encoding/escaped-bracket.html
2975                fast/encoding/meta-in-body.html
2976                fast/encoding/meta-in-script.html
2977                fast/encoding/meta-in-title.html
2978                fast/encoding/mismatched-end-tag.html
2979                fast/encoding/namespace-meta.html
2980                fast/encoding/not-http-equiv-content.html
2981                fast/encoding/parser-tests.html
2982                fast/encoding/quotes-in-title.html
2983                fast/encoding/tag-name-digit.html
2984                http/tests/misc/charset-sniffer-end-sniffing.html
2985
2986         * Android.mk:
2987         * CMakeLists.txt:
2988         * GNUmakefile.am:
2989         * WebCore.gypi:
2990         * WebCore.pro:
2991         * WebCore.vcproj/WebCore.vcproj:
2992         * WebCore.xcodeproj/project.pbxproj:
2993         * html/parser/HTMLMetaCharsetParser.cpp: Added.
2994         (WebCore::HTMLMetaCharsetParser::HTMLMetaCharsetParser):
2995         (WebCore::HTMLMetaCharsetParser::~HTMLMetaCharsetParser):
2996         (WebCore::HTMLMetaCharsetParser::extractCharset):
2997         (WebCore::HTMLMetaCharsetParser::processMeta):
2998         (WebCore::HTMLMetaCharsetParser::checkForMetaCharset):
2999         * html/parser/HTMLMetaCharsetParser.h: Added.
3000         (WebCore::HTMLMetaCharsetParser::create):
3001         (WebCore::HTMLMetaCharsetParser::encoding):
3002         * loader/TextResourceDecoder.cpp:
3003         (WebCore::TextResourceDecoder::checkForHeadCharset):
3004         (WebCore::TextResourceDecoder::checkForMetaCharset):
3005         * loader/TextResourceDecoder.h:
3006
3007 2010-12-10 Nate Chapin  <japhet@chromium.org>
3008
3009         Reviewed by Antti Koivisto.
3010
3011         Merge Loader and Request. Currently, Loader is a singleton attached
3012         to MemoryCache. Our goal is to remove knowledge of the loading process
3013         from MemoryCache, so we should attach Loader to CachedResourceLoader instead.
3014         Once Loader is moved off of MemoryCache, there's no reason it needs to be a singleton,
3015         which removes the main reason for Request existing as a separate class (to store per-request
3016         state that Loader couldn't).
3017
3018         Loader will be given a more descriptive name in a later patch.
3019
3020         https://bugs.webkit.org/show_bug.cgi?id=49837
3021
3022         Refactor only, no new tests.
3023
3024         * Android.mk:
3025         * CMakeLists.txt:
3026         * GNUmakefile.am:
3027         * WebCore.gypi:
3028         * WebCore.pro:
3029         * loader/FrameLoader.cpp:
3030         * loader/Request.cpp:
3031         * loader/Request.h:
3032         * loader/cache/CachedFont.cpp:
3033         * loader/cache/CachedImage.cpp:
3034         * loader/cache/CachedResource.cpp:
3035         * loader/cache/CachedResource.h:
3036         * loader/cache/CachedResourceLoader.cpp:
3037         (WebCore::CachedResourceLoader::CachedResourceLoader):
3038         (WebCore::CachedResourceLoader::~CachedResourceLoader):
3039         (WebCore::CachedResourceLoader::requestImage):
3040         (WebCore::CachedResourceLoader::setAutoLoadImages):
3041         (WebCore::CachedResourceLoader::load):
3042         (WebCore::CachedResourceLoader::loadDone): Was setLoadInProgress(false),
3043             plus other CachedResourceLoader cleanup that had been handled in Loader.
3044         (WebCore::CachedResourceLoader::cancelRequests): Moved from Loader.
3045         (WebCore::CachedResourceLoader::requestCount):
3046         * loader/cache/CachedResourceLoader.h:
3047         (WebCore::CachedResourceLoader::loadFinishing): Was setLoadInProgress(true)
3048         * loader/cache/MemoryCache.h:
3049         * loader/loader.cpp:
3050         (WebCore::Loader::Loader):
3051         (WebCore::Loader::~Loader):
3052         (WebCore::Loader::load):
3053         (WebCore::Loader::willSendRequest):
3054         (WebCore::Loader::didFinishLoading):
3055         (WebCore::Loader::didFail):
3056         (WebCore::Loader::didReceiveResponse):
3057         (WebCore::Loader::didReceiveData):
3058         (WebCore::Loader::didReceiveCachedMetadata):
3059         * loader/loader.h:
3060         (WebCore::Loader::cachedResourceLoader):
3061
3062 2010-12-10  Martin Robinson  <mrobinson@igalia.com>
3063
3064         Unreviewed, rolling out r73703.
3065         http://trac.webkit.org/changeset/73703
3066         https://bugs.webkit.org/show_bug.cgi?id=49658
3067
3068         This patch is causing crashes on the GTK+ bots.
3069
3070         * platform/ContextMenuItem.h:
3071         (WebCore::PlatformMenuItemDescription::PlatformMenuItemDescription):
3072         * platform/gtk/ContextMenuGtk.cpp:
3073         (WebCore::ContextMenu::appendItem):
3074         * platform/gtk/ContextMenuItemGtk.cpp:
3075         (WebCore::ContextMenuItem::ContextMenuItem):
3076         (WebCore::ContextMenuItem::~ContextMenuItem):
3077         (WebCore::ContextMenuItem::createNativeMenuItem):
3078         (WebCore::ContextMenuItem::releasePlatformDescription):
3079         (WebCore::ContextMenuItem::type):
3080         (WebCore::ContextMenuItem::setType):
3081         (WebCore::ContextMenuItem::action):
3082         (WebCore::ContextMenuItem::setAction):
3083         (WebCore::ContextMenuItem::title):
3084         (WebCore::ContextMenuItem::setTitle):
3085         (WebCore::ContextMenuItem::platformSubMenu):
3086         (WebCore::ContextMenuItem::setSubMenu):
3087         (WebCore::ContextMenuItem::setChecked):
3088         (WebCore::ContextMenuItem::setEnabled):
3089
3090 2010-12-08  Mihai Parparita  <mihaip@chromium.org>
3091
3092         Reviewed by Darin Adler.
3093
3094         fast/canvas/canvas-getImageData-negative-source.html fails on Mac
3095         https://bugs.webkit.org/show_bug.cgi?id=47901
3096
3097         Test: fast/canvas/canvas-getImageData-rounding.html
3098         
3099         static_cast<unsigned> is generally not what we want in
3100         convertLogicalToDevice. It produces inconsistent results when compiling
3101         for 32-bit vs. 64-bit, and in any case we weren't getting correct
3102         rounding behavior for source rectangles (e.g. we should get a source rect
3103         of width 2 if the source X is 0.9 and the source width is 0.2, but we
3104         were getting only one of width 1).
3105
3106         * html/HTMLCanvasElement.cpp:
3107         (WebCore::HTMLCanvasElement::convertLogicalToDevice):
3108         (WebCore::HTMLCanvasElement::convertToValidDeviceSize):
3109         * html/HTMLCanvasElement.h:
3110
3111 2010-12-10  Hironori Bono  <hbono@chromium.org>
3112
3113         Reviewed by Ojan Vafai.
3114
3115         [Chromium] Use libjpeg-turbo instead of libjpeg
3116         https://bugs.webkit.org/show_bug.cgi?id=50054
3117
3118         This change replaces the hard-coded path to the GYP files of the JPEG
3119         library with a 'libjpeg_gyp_path' variable, which is added by Chromium
3120         r68453. (When building WebKit Chromium, this change sets its value to
3121         '<(chromium_src_dir)/third_party/libjpeg/libjpeg.gyp' to avoid changing
3122         the current behavior.)
3123
3124         No new tests since this does not change the code at all.
3125
3126         * WebCore.gyp/WebCore.gyp:
3127
3128 2010-12-10  Chris Marrin  <cmarrin@apple.com>
3129
3130         Reviewed by Simon Fraser.
3131
3132         Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
3133         https://bugs.webkit.org/show_bug.cgi?id=49388
3134
3135         Got rid of the NonZeroBeginTimeFlag. Functionality is now hidden inside
3136         the implementation.
3137
3138         * platform/graphics/ca/GraphicsLayerCA.cpp:
3139         (WebCore::GraphicsLayerCA::setAnimationOnLayer):
3140         * platform/graphics/ca/PlatformCAAnimation.h:
3141         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
3142         (hasNonZeroBeginTimeFlag):
3143         (setNonZeroBeginTimeFlag):
3144         (PlatformCAAnimation::PlatformCAAnimation):
3145         (PlatformCAAnimation::setBeginTime):
3146
3147 2010-12-10  Pavel Podivilov  <podivilov@chromium.org>
3148
3149         Reviewed by Pavel Feldman.
3150
3151         Web Inspector: eliminate SourceFrameDelegate by passing scripts to SourceFrame constructor.
3152         https://bugs.webkit.org/show_bug.cgi?id=50679
3153
3154         * inspector/front-end/Script.js:
3155         * inspector/front-end/ScriptView.js:
3156         (WebInspector.ScriptView):
3157         * inspector/front-end/ScriptsPanel.js:
3158         (WebInspector.ScriptsPanel.prototype.reset):
3159         * inspector/front-end/SourceFrame.js:
3160         (WebInspector.SourceFrame):
3161         (WebInspector.SourceFrame.prototype._createViewerIfNeeded):
3162         (WebInspector.SourceFrame.prototype._breakpointAdded):
3163         (WebInspector.SourceFrame.prototype._doEditLine):
3164         (WebInspector.SourceFrame.prototype._commitEditLine):
3165         (WebInspector.SourceFrame.prototype._breakpoints):
3166         (WebInspector.SourceFrame.prototype._sourceIDForLine):
3167         * inspector/front-end/SourceView.js:
3168         (WebInspector.SourceView):
3169
3170 2010-12-10  Andreas Kling  <kling@webkit.org>
3171
3172         Reviewed by Eric Seidel.
3173
3174         Don't do GraphicsContext save/restore just to preserve the CompositeOperator
3175         https://bugs.webkit.org/show_bug.cgi?id=50070
3176
3177         Add GraphicsContext::compositeOperation() so we don't have to do a full
3178         save/restore if the only context-tainting call is setCompositeOperation().
3179
3180         GraphicsContext::setCompositeOperation() now stores the op in its state
3181         and calls a port-specific setPlatformCompositeOperation().
3182
3183         No new tests, this is an optimization.
3184
3185         * platform/graphics/GraphicsContext.cpp:
3186         (WebCore::GraphicsContext::setCompositeOperation):
3187         (WebCore::GraphicsContext::compositeOperation):
3188         * platform/graphics/GraphicsContext.h:
3189         * platform/graphics/GraphicsContextPrivate.h:
3190         (WebCore::GraphicsContextState::GraphicsContextState):
3191         * platform/graphics/Image.cpp:
3192         (WebCore::Image::fillWithSolidColor):
3193         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3194         (WebCore::GraphicsContext::setPlatformCompositeOperation):
3195         * platform/graphics/cg/GraphicsContextCG.cpp:
3196         (WebCore::GraphicsContext::setPlatformCompositeOperation):
3197         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
3198         (WebCore::GraphicsContext::setPlatformCompositeOperation):
3199         * platform/graphics/mac/GraphicsContextMac.mm:
3200         (WebCore::GraphicsContext::setPlatformCompositeOperation):
3201         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
3202         (WebCore::GraphicsContext::setPlatformCompositeOperation):
3203         * platform/graphics/qt/GraphicsContextQt.cpp:
3204         (WebCore::GraphicsContext::setPlatformCompositeOperation):
3205         * platform/graphics/skia/GraphicsContextSkia.cpp:
3206         (WebCore::GraphicsContext::setPlatformCompositeOperation):
3207         * platform/graphics/skia/SkiaUtils.cpp:
3208         (WebCore::WebCoreCompositeToSkiaComposite):
3209         * platform/graphics/wince/GraphicsContextWinCE.cpp:
3210         (WebCore::GraphicsContext::setPlatformCompositeOperation):
3211         * platform/graphics/wx/GraphicsContextWx.cpp:
3212         (WebCore::GraphicsContext::setPlatformCompositeOperation):
3213         * rendering/RenderBoxModelObject.cpp:
3214         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3215         * rendering/RenderView.cpp:
3216         (WebCore::RenderView::paintBoxDecorations):
3217
3218 2010-12-10  Renata Hodovan  <reni@webkit.org>
3219
3220         Reviewed by Andreas Kling.
3221
3222         GraphicsContext: Merge m_common and m_data
3223         https://bugs.webkit.org/show_bug.cgi?id=49914
3224
3225         Move data members from GraphicsContextPrivate into GraphicsContext. So GraphicsContextPlatform.h
3226         and m_common became unnecessary. They are removed.
3227         Add two methods to GraphicsContext: platformInit() and platformDestroy(), which
3228         make the constructor of GraphicsContext clearer.
3229         Besides add a getter to the private GraphicsContext::m_state member, because some inline
3230         functions in cairo need it.
3231
3232         No new test is needed, because this is a refactoring.
3233
3234         * WebCore.xcodeproj/project.pbxproj:
3235         * platform/graphics/GraphicsContext.cpp:
3236         (WebCore::GraphicsContext::GraphicsContext):
3237         (WebCore::GraphicsContext::~GraphicsContext):
3238         (WebCore::GraphicsContext::save):
3239         (WebCore::GraphicsContext::restore):
3240         (WebCore::GraphicsContext::setStrokeThickness):
3241         (WebCore::GraphicsContext::setStrokeStyle):
3242         (WebCore::GraphicsContext::setStrokeColor):
3243         (WebCore::GraphicsContext::setShadow):
3244         (WebCore::GraphicsContext::clearShadow):
3245         (WebCore::GraphicsContext::getShadow):
3246         (WebCore::GraphicsContext::strokeThickness):
3247         (WebCore::GraphicsContext::strokeStyle):
3248         (WebCore::GraphicsContext::strokeColor):
3249         (WebCore::GraphicsContext::strokeColorSpace):
3250         (WebCore::GraphicsContext::fillRule):
3251         (WebCore::GraphicsContext::setFillRule):
3252         (WebCore::GraphicsContext::setFillColor):
3253         (WebCore::GraphicsContext::fillColor):
3254         (WebCore::GraphicsContext::fillColorSpace):
3255         (WebCore::GraphicsContext::setShouldAntialias):
3256         (WebCore::GraphicsContext::shouldAntialias):
3257         (WebCore::GraphicsContext::state):
3258         (WebCore::GraphicsContext::setStrokePattern):
3259         (WebCore::GraphicsContext::setFillPattern):
3260         (WebCore::GraphicsContext::setStrokeGradient):
3261         (WebCore::GraphicsContext::setFillGradient):
3262         (WebCore::GraphicsContext::fillGradient):
3263         (WebCore::GraphicsContext::strokeGradient):
3264         (WebCore::GraphicsContext::fillPattern):
3265         (WebCore::GraphicsContext::strokePattern):
3266         (WebCore::GraphicsContext::setShadowsIgnoreTransforms):
3267         (WebCore::GraphicsContext::updatingControlTints):
3268         (WebCore::GraphicsContext::setUpdatingControlTints):
3269         (WebCore::GraphicsContext::setPaintingDisabled):
3270         (WebCore::GraphicsContext::paintingDisabled):
3271         (WebCore::GraphicsContext::textDrawingMode):
3272         (WebCore::GraphicsContext::setTextDrawingMode):
3273         * platform/graphics/GraphicsContext.h:
3274         (WebCore::GraphicsContextState::GraphicsContextState):
3275         * platform/graphics/GraphicsContextPrivate.h: Removed.
3276         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3277         (WebCore::setPlatformFill):
3278         (WebCore::setPlatformStroke):
3279         (WebCore::drawPathShadow):
3280         (WebCore::fillCurrentCairoPath):
3281         (WebCore::strokeCurrentCairoPath):
3282         (WebCore::GraphicsContext::platformInit):
3283         (WebCore::GraphicsContext::platformDestroy):
3284         (WebCore::GraphicsContext::fillPath):
3285         (WebCore::GraphicsContext::strokePath):
3286         (WebCore::GraphicsContext::fillRect):
3287         (WebCore::GraphicsContext::setPlatformShadow):
3288         (WebCore::GraphicsContext::strokeRect):
3289         (WebCore::GraphicsContext::setAlpha):
3290         (WebCore::GraphicsContext::getAlpha):
3291         * platform/graphics/cg/GraphicsContextCG.cpp:
3292         (WebCore::GraphicsContext::platformInit):
3293         (WebCore::GraphicsContext::platformDestroy):
3294         (WebCore::GraphicsContext::applyStrokePattern):
3295         (WebCore::GraphicsContext::applyFillPattern):
3296         (WebCore::GraphicsContext::drawPath):
3297         (WebCore::GraphicsContext::fillPath):
3298         (WebCore::GraphicsContext::strokePath):
3299         (WebCore::GraphicsContext::fillRect):
3300         (WebCore::GraphicsContext::setPlatformShadow):
3301         (WebCore::GraphicsContext::strokeRect):
3302         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
3303         (WebCore::GraphicsContext::platformInit):
3304         (WebCore::GraphicsContext::platformDestroy):
3305         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
3306         (WebCore::GraphicsContext::platformInit):
3307         (WebCore::GraphicsContext::platformDestroy):
3308         (WebCore::GraphicsContext::fillPath):
3309         (WebCore::GraphicsContext::strokePath):
3310         (WebCore::GraphicsContext::clip):
3311         (WebCore::GraphicsContext::clipOut):
3312         (WebCore::GraphicsContext::addInnerRoundedRectClip):
3313         * platform/graphics/qt/GraphicsContextQt.cpp:
3314         (WebCore::GraphicsContext::platformInit):
3315         (WebCore::GraphicsContext::platformDestroy):
3316         (WebCore::GraphicsContext::fillPath):
3317         (WebCore::GraphicsContext::strokePath):
3318         (WebCore::GraphicsContext::fillRect):
3319         (WebCore::GraphicsContext::setPlatformShadow):
3320         * platform/graphics/skia/GraphicsContextSkia.cpp:
3321         (WebCore::GraphicsContext::platformInit):
3322         (WebCore::GraphicsContext::platformDestroy):
3323         (WebCore::GraphicsContext::fillPath):
3324         (WebCore::GraphicsContext::setPlatformShadow):
3325         * platform/graphics/win/GraphicsContextCGWin.cpp:
3326         (WebCore::GraphicsContext::GraphicsContext):
3327         (WebCore::GraphicsContext::platformInit):
3328         * platform/graphics/win/GraphicsContextCairoWin.cpp:
3329         (WebCore::GraphicsContext::GraphicsContext):
3330         (WebCore::GraphicsContext::platformInit):
3331         * platform/graphics/wince/GraphicsContextWinCE.cpp:
3332         (WebCore::GraphicsContext::platformInit):
3333         (WebCore::GraphicsContext::platformDestroy):
3334         (WebCore::GraphicsContext::fillPath):
3335         (WebCore::GraphicsContext::fillRect):
3336         * platform/graphics/wx/GraphicsContextWx.cpp:
3337         (WebCore::GraphicsContext::platformInit):
3338         (WebCore::GraphicsContext::platformDestroy):
3339
3340 2010-12-10  Pavel Podivilov  <podivilov@chromium.org>
3341
3342         Reviewed by Yury Semikhatsky.
3343
3344         Web Inspector: introduce a pair of set/remove methods for each breakpoint type.
3345         https://bugs.webkit.org/show_bug.cgi?id=50809
3346
3347         * inspector/Inspector.idl:
3348         * inspector/InspectorController.cpp:
3349         (WebCore::InspectorController::InspectorController):
3350         (WebCore::InspectorController::setEventListenerBreakpoint):
3351         (WebCore::InspectorController::removeEventListenerBreakpoint):
3352         (WebCore::InspectorController::hasEventListenerBreakpoint):
3353         (WebCore::InspectorController::setXHRBreakpoint):
3354         (WebCore::InspectorController::removeXHRBreakpoint):
3355         (WebCore::InspectorController::hasXHRBreakpoint):
3356         (WebCore::InspectorController::clearNativeBreakpoints):
3357         * inspector/InspectorController.h:
3358         * inspector/InspectorDOMAgent.cpp:
3359         (WebCore::InspectorDOMAgent::setDOMBreakpoint):
3360         (WebCore::InspectorDOMAgent::removeDOMBreakpoint):
3361         (WebCore::InspectorDOMAgent::shouldBreakOnNodeInsertion):
3362         (WebCore::InspectorDOMAgent::shouldBreakOnNodeRemoval):
3363         (WebCore::InspectorDOMAgent::shouldBreakOnAttributeModification):
3364         (WebCore::InspectorDOMAgent::descriptionForDOMEvent):
3365         (WebCore::InspectorDOMAgent::didRemoveDOMNode):
3366         * inspector/InspectorDOMAgent.h:
3367         * inspector/InspectorInstrumentation.cpp:
3368         (WebCore::InspectorInstrumentation::willInsertDOMNodeImpl):
3369         (WebCore::InspectorInstrumentation::willRemoveDOMNodeImpl):
3370         (WebCore::InspectorInstrumentation::willModifyDOMAttrImpl):
3371         (WebCore::InspectorInstrumentation::willSendXMLHttpRequestImpl):
3372         (WebCore::InspectorInstrumentation::pauseOnNativeEventIfNeeded):
3373         * inspector/front-end/BreakpointManager.js:
3374         (WebInspector.BreakpointManager):
3375         (WebInspector.NativeBreakpoint):
3376         (WebInspector.DOMBreakpoint):
3377         (WebInspector.EventListenerBreakpoint):
3378         (WebInspector.XHRBreakpoint):
3379         * inspector/front-end/CallStackSidebarPane.js:
3380         (WebInspector.CallStackSidebarPane):
3381         (WebInspector.CallStackSidebarPane.prototype._nativeBreakpointHit):
3382         * inspector/front-end/DebuggerModel.js:
3383         (WebInspector.DebuggerModel.prototype.debuggerPaused):
3384
3385 2010-12-10  Adam Roben  <aroben@apple.com>
3386
3387         Windows production build fix after r72555
3388
3389         * WebCore.vcproj/WebCoreGeneratedCommon.vsprops: Use
3390         "$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win" to find the
3391         .vsprops files, rather than $(WebKitLibrariesDir).
3392
3393 2010-12-10  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3394
3395         Reviewed by nobody, build fix.
3396
3397         [Qt] Second attempt to fix the build with Qt 4.6 broken in 73710.
3398
3399         * platform/network/qt/QtNAMThreadSafeProxy.cpp:
3400         (WebCore::QtNetworkReplyThreadSafeProxy::QtNetworkReplyThreadSafeProxy):
3401         (WebCore::QtNetworkReplyThreadSafeProxy::localCustomRequest):
3402         * platform/network/qt/QtNAMThreadSafeProxy.h:
3403
3404 2010-12-10  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3405
3406         Reviewed by nobody, build fix.
3407
3408         [Qt] Fix the build with Qt 4.6 broken in 73710.
3409
3410         * platform/network/qt/QtNAMThreadSafeProxy.cpp:
3411         (WebCore::QtNetworkReplyThreadSafeProxy::QtNetworkReplyThreadSafeProxy):
3412         * platform/network/qt/QtNAMThreadSafeProxy.h:
3413
3414 2010-12-10  Emil Eklund  <eae@chromium.org>
3415
3416         Reviewed by Eric Seidel.
3417
3418         Change EventHandler::dispatchMouseEvent code to use DOM traversal instead of render tree traversal
3419         https://bugs.webkit.org/show_bug.cgi?id=49982
3420
3421         * page/EventHandler.cpp:
3422         (WebCore::EventHandler::dispatchMouseEvent):
3423         Walk up DOM/hosted tree rather than render tree.
3424
3425 2010-12-10  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3426
3427         Reviewed by Kenneth Rohde Christiansen.
3428
3429         [Qt] Support a QNetworkAccessManager affined to a different thread.
3430         https://bugs.webkit.org/show_bug.cgi?id=50080
3431
3432         This patch introduce thread safe proxy classes for QNetworkAccessManager
3433         and QNetworkReply.
3434         If run in the same thread, these objects will forward the calls with
3435         Qt::DirectConnection bindings, while in the other case they will use
3436         Qt::QueuedConnection to carry requests accross threads.
3437
3438         This patch basically:
3439         - Makes sure that all access goes through these objects
3440         - Reorders signal connections to make sure we are connected when the
3441           signal comes
3442         - Makes sure that no QObject in the WebCore thread is a child of the
3443           reply which might be in a different thread.
3444         - Forward the data directly in QByteArrays in signals instead of collecting
3445           the data when the signal is handled.
3446
3447         New test: tst_QWebPage::networkAccessManagerOnDifferentThread
3448
3449         * WebCore.pro:
3450         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
3451         (WebCore::MediaPlayerPrivateQt::commitLoad):
3452         * platform/network/qt/QNetworkReplyHandler.cpp:
3453         (WebCore::FormDataIODevice::FormDataIODevice):
3454         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
3455         (WebCore::QNetworkReplyHandler::~QNetworkReplyHandler):
3456         (WebCore::QNetworkReplyHandler::setLoadMode):
3457         (WebCore::QNetworkReplyHandler::abort):
3458         (WebCore::QNetworkReplyHandler::release):
3459         (WebCore::ignoreHttpError):
3460         (WebCore::QNetworkReplyHandler::finish):
3461         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
3462         (WebCore::QNetworkReplyHandler::forwardData):
3463         (WebCore::QNetworkReplyHandler::start):
3464         (WebCore::QNetworkReplyHandler::sendQueuedItems):
3465         * platform/network/qt/QNetworkReplyHandler.h:
3466         * platform/network/qt/QtNAMThreadSafeProxy.cpp: Added.
3467         * platform/network/qt/QtNAMThreadSafeProxy.h: Added.
3468         * platform/network/qt/ResourceHandleQt.cpp:
3469         (WebCore::ResourceHandle::willLoadFromCache):
3470         * platform/qt/CookieJarQt.cpp:
3471         (WebCore::networkAccessManager):
3472         (WebCore::setCookies):
3473         (WebCore::cookies):
3474         (WebCore::cookieRequestHeaderFieldValue):
3475         (WebCore::cookiesEnabled):
3476
3477 2010-12-09  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3478
3479         Reviewed by Kenneth Rohde Christiansen.
3480
3481         [Qt] Refactor QNetworkReplyHandler::finish() to prevent crashes.
3482         https://bugs.webkit.org/show_bug.cgi?id=50761
3483
3484         This patch change the order to check if m_reply is null instead,
3485         explicitly deleting the reply before calling start() for a redirect,
3486         or after calling didFinishLoading()/didFail() in other cases.
3487
3488         * platform/network/qt/QNetworkReplyHandler.cpp:
3489         (WebCore::QNetworkReplyHandler::finish):
3490
3491 2010-12-09  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3492
3493         Reviewed by Kenneth Rohde Christiansen.
3494
3495         [Qt] Make sure we send the response before any data.
3496         https://bugs.webkit.org/show_bug.cgi?id=50760
3497
3498         This patch make sure the data available flag is set before
3499         we call sendResponseIfNeeded.
3500
3501         * platform/network/qt/QNetworkReplyHandler.cpp:
3502         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
3503         (WebCore::QNetworkReplyHandler::finish):
3504         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
3505         (WebCore::QNetworkReplyHandler::forwardData):
3506         (WebCore::QNetworkReplyHandler::resetState):
3507         * platform/network/qt/QNetworkReplyHandler.h:
3508
3509 2010-12-10  Koan-Sin Tan  <koansin.tan@gmail.com>
3510
3511         Reviewed by Dan Bernstein.
3512
3513         Bopomofo should be part of CJK Ideographs in WebCore/platform/graphics/Font.cpp
3514         https://bugs.webkit.org/show_bug.cgi?id=50668
3515
3516         No new tests. Note that, as said in the bug report discussion,
3517         I did have a test case for the bug. However, to show the test 
3518         case you need some "broken" Microsoft copyrighted fonts, such
3519         as DFKai-SB.
3520
3521         * platform/graphics/Font.cpp:
3522         (WebCore::Font::isCJKIdeograph):
3523
3524 2010-12-10  Carlos Garcia Campos  <cgarcia@igalia.com>
3525
3526         Reviewed by Martin Robinson.
3527
3528         [GTK] Simplify context-menu handling code
3529         https://bugs.webkit.org/show_bug.cgi?id=49658
3530
3531         * platform/ContextMenuItem.h:
3532         * platform/gtk/ContextMenuGtk.cpp:
3533         (WebCore::ContextMenu::appendItem):
3534         * platform/gtk/ContextMenuItemGtk.cpp:
3535         (WebCore::ContextMenuItem::ContextMenuItem):
3536         (WebCore::ContextMenuItem::~ContextMenuItem):
3537         (WebCore::ContextMenuItem::releasePlatformDescription):
3538         (WebCore::ContextMenuItem::type):
3539         (WebCore::ContextMenuItem::setType):
3540         (WebCore::ContextMenuItem::action):
3541         (WebCore::ContextMenuItem::setAction):
3542         (WebCore::ContextMenuItem::title):
3543         (WebCore::ContextMenuItem::setTitle):
3544         (WebCore::ContextMenuItem::platformSubMenu):
3545         (WebCore::ContextMenuItem::setSubMenu):
3546         (WebCore::ContextMenuItem::setChecked):
3547         (WebCore::ContextMenuItem::setEnabled):
3548
3549 2010-12-10  Philippe Normand  <pnormand@igalia.com>
3550
3551         Reviewed by Gustavo Noronha Silva.
3552
3553         [GStreamer] un-needed methods
3554         https://bugs.webkit.org/show_bug.cgi?id=50805
3555
3556         No new tests, code cleanup only.
3557
3558         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3559         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3560
3561 2010-12-10  Philippe Normand  <pnormand@igalia.com>
3562
3563         Reviewed by Gustavo Noronha Silva.
3564
3565         [GStreamer] data: source could also support non-base64 encoded URIs
3566         https://bugs.webkit.org/show_bug.cgi?id=30007
3567
3568         Removed our ancient implementation of dataurisrc. We should now
3569         use the one in gst-plugins-bad which is more mature.
3570
3571         * GNUmakefile.am:
3572         * platform/graphics/gstreamer/DataSourceGStreamer.cpp: Removed.
3573         * platform/graphics/gstreamer/DataSourceGStreamer.h: Removed.
3574         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3575         (WebCore::doGstInit):
3576
3577 2010-12-10  Zoltan Herczeg  <zherczeg@webkit.org>
3578
3579         Reviewed by Eric Seidel.
3580
3581         [Qt] Fix crashes in debug mode
3582         https://bugs.webkit.org/show_bug.cgi?id=49976
3583
3584         The m_methods hashmap of QtInstance contains InternalFunctions
3585         whose depend on the current RuntimeObject. When we recreate the
3586         RuntimeObject, we should also reset this hashmap.
3587
3588         * bridge/qt/qt_instance.cpp:
3589         (JSC::Bindings::QtInstance::newRuntimeObject):
3590
3591 2010-12-10  François Sausset  <sausset@gmail.com>
3592
3593         Reviewed by Eric Seidel.
3594
3595         MathML: update baselinePosition() call in RenderMathMLBlock.cpp 
3596         https://bugs.webkit.org/show_bug.cgi?id=50540
3597
3598         The call of baselinePosition() is outdated: new arguments added.
3599
3600         * mathml/RenderMathMLBlock.cpp:
3601         (WebCore::RenderMathMLBlock::paint):
3602
3603 2010-12-10  Hans Wennborg  <hans@chromium.org>
3604
3605         Reviewed by Jeremy Orlow.
3606
3607         IndexedDB: Numeric keys are floats.
3608         https://bugs.webkit.org/show_bug.cgi?id=50674
3609
3610         Use floating point to represent numeric keys,
3611         add version meta data to the SQLite db,
3612         and migrate object stores that use integers.
3613
3614         * bindings/v8/IDBBindingUtilities.cpp:
3615         (WebCore::createIDBKeyFromValue):
3616         * bindings/v8/custom/V8IDBKeyCustom.cpp:
3617         (WebCore::toV8):
3618         * storage/IDBFactoryBackendImpl.cpp:
3619         (WebCore::createTables):
3620         (WebCore::migrateDatabase):
3621         (WebCore::IDBFactoryBackendImpl::open):
3622         * storage/IDBKey.cpp:
3623         (WebCore::IDBKey::IDBKey):
3624         (WebCore::IDBKey::fromQuery):
3625         (WebCore::IDBKey::bind):
3626         (WebCore::IDBKey::bindWithNulls):
3627         * storage/IDBKey.h:
3628         (WebCore::IDBKey::create):
3629         (WebCore::IDBKey::number):
3630
3631 2010-12-10  Martin Robinson  <mrobinson@igalia.com>
3632
3633         Reviewed by Xan Lopez.
3634
3635         [Gtk] style="font-family: courier" makes text disappear
3636         https://bugs.webkit.org/show_bug.cgi?id=47452
3637
3638         Don't ever use fonts that do not have any of the three charmaps that
3639         Fontconfig supports (Unicode, Apple Roman and Symbol). If we select
3640         a font that doesn't have one of these charmaps, use the next font in
3641         the list.
3642
3643         Test: platform/gtk/fonts/font-with-no-valid-encoding.html
3644
3645         * platform/graphics/freetype/FontCacheFreeType.cpp:
3646         (WebCore::FontCache::createFontPlatformData): Check whether the
3647         font we selected has a valid Fontconfig charmap.
3648         * platform/graphics/freetype/FontPlatformData.h: Added new method definition.
3649         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
3650         (WebCore::FontPlatformData::hasCompatibleCharmap): Added this method which
3651         verifies that a font has a valid Fontconfig charmap.
3652
3653 2010-12-09  Ryosuke Niwa  <rniwa@webkit.org>
3654
3655         Reviewed by Ojan Vafai.
3656
3657         Make DOM Mutation Events Asynchronous
3658         https://bugs.webkit.org/show_bug.cgi?id=46936
3659
3660         Implemented DOM mutations events as scoped events. A scoped event is an event whose
3661         dispatch is done via ScopedEventQueue. The behavior of the queue is controlled by
3662         EventQueueScope objects (RAII idiom), which increments and decrements the scoping level
3663         on its constructor and destructor respectively.
3664
3665         When the scoping level is 0 (initial level), scoped events are dispatched as soon as
3666         they are enqueued and act like synchronous events. When the scoping level is greater than 0,
3667         however, events are queued in ScopedEventQueue and their dispatches are delayed until
3668         the scoping level goes back to 0 (by the destruction of EventQueueScope).
3669
3670         DOMSubtreeModified, DOMNodeInserted, DOMNodeRemoved, DOMNodeRemovedFromDocument,
3671         DOMNodeInsertedIntoDocument, DOMFocusIn, DOMFocusOut, focusin, and focusout are treated as
3672         scoped events, and a scope object is instantiated in EditCommand::apply to delay dispatches
3673         of the events until the completion of each call of EditCommand::doApply.
3674
3675         Test: fast/events/mutation/execCommands.html
3676
3677         * Android.mk: Added ScopedEventQueue.cpp.
3678         * CMakeLists.txt: Ditto.
3679         * WebCore.pro: Ditto.
3680         * GNUmakefile.am: Added ScopedEventQueue.cpp and ScopedEventQueue.h.
3681         * WebCore.gypi:  Ditto.
3682         * WebCore.vcproj/project.vcproj: Ditto.
3683         * WebCore.xcodeproj/project.pbxproj: Ditto.
3684         * dom/ContainerNode.cpp:
3685         (WebCore::dispatchChildInsertionEvents): Calls dispatchScopedEvent.
3686         (WebCore::dispatchChildRemovalEvents): Ditto.
3687         * dom/DOMAllInOne.cpp: Added ScopedEventQueue.cpp.
3688         * dom/Element.cpp:
3689         (WebCore::Element::dispatchAttrRemovalEvent): Ditto. 
3690         (WebCore::Element::dispatchAttrAdditionEvent): Ditto.
3691         * dom/Node.cpp:
3692         (WebCore::Node::dispatchScopedEvent): Added.
3693         (WebCore::Node::dispatchSubtreeModifiedEvent): Calls dispatchScopedEvent.
3694         * dom/Node.h:
3695         * dom/ScopedEventQueue.cpp: Added.
3696         (WebCore::ScopedEventQueue::initialize): Added.
3697         (WebCore::ScopedEventQueue::enqueueEvent): Added.
3698         (WebCore::ScopedEventQueue::dispatchAllEvents): Added.
3699         (WebCore::ScopedEventQueue::dispatchEvent): Added.
3700         (WebCore::ScopedEventQueue::instance): Added.
3701         (WebCore::ScopedEventQueue::incrementScopingLevel): Added.
3702         (WebCore::ScopedEventQueue::decrementScopingLevel): Added.
3703         * dom/ScopedEventQueue.h: Added.
3704         (WebCore::ScopedEventQueue::~ScopedEventQueue): Added.
3705         (WebCore::ScopedEventQueue::ScopedEventQueue): Added.
3706         (WebCore::EventQueueScope::EventQueueScope): Added.
3707         (WebCore::EventQueueScope::~EventQueueScope): Added.
3708         * editing/EditCommand.cpp:
3709         (WebCore::EditCommand::apply): Instantiates EventQueueScope.
3710
3711 2010-12-09  Sheriff Bot  <webkit.review.bot@gmail.com>
3712
3713         Unreviewed, rolling out r73684.
3714         http://trac.webkit.org/changeset/73684
3715         https://bugs.webkit.org/show_bug.cgi?id=50801
3716
3717         "missing bug number" (Requested by rniwa on #webkit).
3718
3719         * Android.mk:
3720         * CMakeLists.txt:
3721         * GNUmakefile.am:
3722         * WebCore.gypi:
3723         * WebCore.pro:
3724         * WebCore.vcproj/WebCore.vcproj:
3725         * WebCore.xcodeproj/project.pbxproj:
3726         * dom/ContainerNode.cpp:
3727         (WebCore::dispatchChildInsertionEvents):
3728         (WebCore::dispatchChildRemovalEvents):
3729         * dom/DOMAllInOne.cpp:
3730         * dom/Element.cpp:
3731         (WebCore::Element::dispatchAttrRemovalEvent):
3732         (WebCore::Element::dispatchAttrAdditionEvent):
3733         * dom/Node.cpp:
3734         (WebCore::Node::dispatchSubtreeModifiedEvent):
3735         (WebCore::Node::dispatchUIEvent):
3736         * dom/Node.h:
3737         * dom/ScopedEventQueue.cpp: Removed.
3738         * dom/ScopedEventQueue.h: Removed.
3739         * editing/EditCommand.cpp:
3740         (WebCore::EditCommand::apply):
3741
3742 2010-12-09  Qi Zhang  <qi.2.zhang@nokia.com>
3743
3744         Reviewed by Kenneth Rohde Christiansen.
3745
3746         [Qt] enable orientation flag when QtMobility available
3747         https://bugs.webkit.org/show_bug.cgi?id=50781
3748
3749         When QtMobility available, enable orientation flag by default.
3750
3751         * features.pri:
3752
3753 2010-12-09  Kenichi Ishibashi  <bashi@google.com>
3754
3755         Reviewed by Kent Tamura.
3756
3757         Improve validation API support of <object> and <keygen>
3758         https://bugs.webkit.org/show_bug.cgi?id=50663
3759
3760         Adds validation API to HTMLObjectElement class.
3761         Makes HTMLKeygenElement::willValidate() return false.
3762
3763         Test: fast/forms/setCustomValidity-existence.html
3764
3765         * html/HTMLKeygenElement.h:
3766         (WebCore::HTMLKeygenElement::willValidate): Added.
3767         * html/HTMLObjectElement.h:
3768         (WebCore::HTMLObjectElement::validationMessage): Added.
3769         (WebCore::HTMLObjectElement::checkValidity): Added.
3770         (WebCore::HTMLObjectElement::setCustomValidity): Added.
3771         * html/HTMLObjectElement.idl: Added validation API properties.
3772
3773 2010-12-09  Sadrul Habib Chowdhury  <sadrul@chromium.org>
3774
3775         Reviewed by Kent Tamura.
3776
3777         Make sure a non-zero value is used for tile-width to avoid a crash
3778         https://bugs.webkit.org/show_bug.cgi?id=50341
3779
3780         The scaled tile width can be very small at times (e.g. with 'style: font 1
3781         required'). So use a minimum width of 1 instead of using 0 (which leads to a
3782         crash).
3783
3784         Tests: fast/dom/HTMLProgressElement/progress-element-with-style-crash.html
3785
3786         * rendering/RenderThemeChromiumSkia.cpp:
3787         (WebCore::RenderThemeChromiumSkia::paintProgressBar):
3788
3789 2010-12-09  Ryosuke Niwa  <rniwa@webkit.org>
3790
3791         Reviewed by Ojan Vafai.
3792
3793         Implemented DOM mutations events as scoped events. A scoped event is an event whose
3794         dispatch is done via ScopedEventQueue. The behavior of the queue is controlled by
3795         EventQueueScope objects (RAII idiom), which increments and decrements the scoping level
3796         on its constructor and destructor respectively.
3797
3798         When the scoping level is 0 (initial level), scoped events are dispatched as soon as
3799         they are enqueued and act like synchronous events. When the scoping level is greater than 0,
3800         however, events are queued in ScopedEventQueue and their dispatches are delayed until
3801         the scoping level goes back to 0 (by the destruction of EventQueueScope).
3802
3803         DOMSubtreeModified, DOMNodeInserted, DOMNodeRemoved, DOMNodeRemovedFromDocument,
3804         DOMNodeInsertedIntoDocument, DOMFocusIn, DOMFocusOut, focusin, and focusout are treated as
3805         scoped events, and a scope object is instantiated in EditCommand::apply to delay dispatches
3806         of the events until the completion of each call of EditCommand::doApply.
3807
3808         Test: fast/events/mutation/execCommands.html
3809
3810         * Android.mk: Added ScopedEventQueue.cpp.
3811         * CMakeLists.txt: Ditto.
3812         * WebCore.pro: Ditto.
3813         * GNUmakefile.am: Added ScopedEventQueue.cpp and ScopedEventQueue.h.
3814         * WebCore.gypi:  Ditto.
3815         * WebCore.vcproj/project.vcproj: Ditto.
3816         * WebCore.xcodeproj/project.pbxproj: Ditto.
3817         * dom/ContainerNode.cpp:
3818         (WebCore::dispatchChildInsertionEvents): Calls dispatchScopedEvent.
3819         (WebCore::dispatchChildRemovalEvents): Ditto.
3820         * dom/DOMAllInOne.cpp: Added ScopedEventQueue.cpp.
3821         * dom/Element.cpp:
3822         (WebCore::Element::dispatchAttrRemovalEvent): Ditto. 
3823         (WebCore::Element::dispatchAttrAdditionEvent): Ditto.
3824         * dom/Node.cpp:
3825         (WebCore::Node::dispatchScopedEvent): Added.
3826         (WebCore::Node::dispatchSubtreeModifiedEvent): Calls dispatchScopedEvent.
3827         * dom/Node.h:
3828         * dom/ScopedEventQueue.cpp: Added.
3829         (WebCore::ScopedEventQueue::initialize): Added.
3830         (WebCore::ScopedEventQueue::enqueueEvent): Added.
3831         (WebCore::ScopedEventQueue::dispatchAllEvents): Added.
3832         (WebCore::ScopedEventQueue::dispatchEvent): Added.
3833         (WebCore::ScopedEventQueue::instance): Added.
3834         (WebCore::ScopedEventQueue::incrementScopingLevel): Added.
3835         (WebCore::ScopedEventQueue::decrementScopingLevel): Added.
3836         * dom/ScopedEventQueue.h: Added.
3837         (WebCore::ScopedEventQueue::~ScopedEventQueue): Added.
3838         (WebCore::ScopedEventQueue::ScopedEventQueue): Added.
3839         (WebCore::EventQueueScope::EventQueueScope): Added.
3840         (WebCore::EventQueueScope::~EventQueueScope): Added.
3841         * editing/EditCommand.cpp:
3842         (WebCore::EditCommand::apply): Instantiates EventQueueScope.
3843
3844 2010-12-09  Sam Weinig  <sam@webkit.org>
3845
3846         Reviewed by Gavin Barraclough.
3847
3848         Fix scrolling with mouse wheel in WebKit2 views.  Once
3849         we coalesce wheel events, we can re-enable this.
3850
3851         * platform/mac/ScrollAnimatorMac.mm:
3852         (WebCore::ScrollAnimatorMac::scroll):
3853
3854 2010-12-09  Abhishek Arya  <inferno@chromium.org>
3855
3856         Reviewed by James Robinson.
3857
3858         For details element, ensure that if we ended up being inline that we set out replaced
3859         flag so that we are treated like an inline block.
3860         https://bugs.webkit.org/show_bug.cgi?id=50671
3861
3862         Test: fast/html/details-element-render-inline-crash.html
3863
3864         * rendering/RenderDetails.cpp:
3865         (WebCore::RenderDetails::styleDidChange): setReplaced to true if we are set as inline.
3866         * rendering/RenderDetails.h: function definition.
3867
3868 2010-12-09  Jasmin Lapalme  <jlapalme@druide.com>
3869
3870         Reviewed by Alexey Proskuryakov.
3871
3872         Fix a faulty conversion from UTF-8 to UTF-16 in WebCore during an XSLT transformation.
3873         https://bugs.webkit.org/show_bug.cgi?id=50708
3874
3875         Test: fast/xsl/utf8-chunks.xml
3876
3877         * xml/XSLTProcessorLibxslt.cpp:
3878         (WebCore::writeToVector): now converts and returns the correct byte count when the end of the chunk is in the middle of a multibyte UTF-8 character.
3879
3880 2010-12-09  Vincent Scheib  <scheib@chromium.org>
3881
3882         Reviewed by James Robinson.
3883
3884         Clip update rectangle for Texture::updateSubRect to texture size
3885         https://bugs.webkit.org/show_bug.cgi?id=49929
3886
3887         Test: fast/canvas/canvas-largedraws.html
3888
3889         * platform/graphics/gpu/Texture.cpp:
3890         (WebCore::Texture::updateSubRect):
3891
3892 2010-12-09  Kenneth Russell  <kbr@google.com>
3893
3894         Unreviewed. Another speculative Gtk build fix after r73669. Add
3895         needed derived sources to GNUmakefile.am.
3896
3897         * GNUmakefile.am:
3898
3899 2010-12-09  Kenneth Russell  <kbr@google.com>
3900
3901         Unreviewed. Speculative Gtk build fix after
3902         https://bugs.webkit.org/show_bug.cgi?id=36512 / r73669. Process
3903         all of the WebGL classes' IDL files.
3904
3905         * CMakeLists.txt:
3906
3907 2010-12-09  Zhenyao Mo  <zmo@google.com>
3908
3909         Reviewed by Kenneth Russell.
3910
3911         Expose constructor functions for instanceof checks of WebGL objects
3912         https://bugs.webkit.org/show_bug.cgi?id=36512
3913
3914         Test: fast/canvas/webgl/instanceof-test.html
3915
3916         * bindings/generic/RuntimeEnabledFeatures.h:
3917         (WebCore::RuntimeEnabledFeatures::webGLActiveInfoEnabled):
3918         (WebCore::RuntimeEnabledFeatures::webGLBufferEnabled):
3919         (WebCore::RuntimeEnabledFeatures::webGLFramebufferEnabled):
3920         (WebCore::RuntimeEnabledFeatures::webGLProgramEnabled):
3921         (WebCore::RuntimeEnabledFeatures::webGLRenderbufferEnabled):
3922         (WebCore::RuntimeEnabledFeatures::webGLShaderEnabled):
3923         (WebCore::RuntimeEnabledFeatures::webGLTextureEnabled):
3924         (WebCore::RuntimeEnabledFeatures::webGLUniformLocationEnabled):
3925         * html/canvas/WebGLActiveInfo.idl: Remove OmitConstructor.
3926         * html/canvas/WebGLBuffer.idl: Ditto.
3927         * html/canvas/WebGLFramebuffer.idl: Ditto.
3928         * html/canvas/WebGLProgram.idl: Ditto.
3929         * html/canvas/WebGLRenderbuffer.idl: Ditto.
3930         * html/canvas/WebGLShader.idl: Ditto.
3931         * html/canvas/WebGLTexture.idl: Ditto.
3932         * html/canvas/WebGLUniformLocation.idl: Ditto.
3933         * page/DOMWindow.idl: Expose constructors for WebGL objects in DOMWindow.
3934
3935 2010-12-09  Timothy Hatcher  <timothy@apple.com>
3936
3937         Export Color::white and Color::transparent.
3938
3939         Reviewed by Anders Carlsson.
3940
3941         * WebCore.exp.in:
3942
3943 2010-12-09  Sam Weinig  <sam@webkit.org>
3944
3945         Fix failing Mac tests.
3946
3947         * platform/mac/ScrollAnimatorMac.mm:
3948         (WebCore::ScrollAnimatorMac::scroll): Don't smooth scroll if the default
3949         AppleScrollAnimationEnabled is false.
3950
3951 2010-12-09  James Robinson  <jamesr@chromium.org>
3952
3953         Reviewed by Kenneth Russell.
3954
3955         [chromium] Compositor needs to manage its VRAM use
3956         https://bugs.webkit.org/show_bug.cgi?id=49629
3957
3958         This adds a basic texture manager to the Chromium compositor to limit the amount of VRAM
3959         used by compositor textures and switches ContentLayerChromium, ImageLayerChromium, and
3960         RenderSurfaceChromium to use managed LayerTexture.  The other *LayerChromium classes (Canvas,
3961         Video, and WebGL) and the root layer are still unmanaged.
3962
3963         The TextureManager works by providing tokens to callers that want to use a managed texture.
3964         The token can be used to request a texture, see if the previously requested texture is still
3965         available, and to protect/unprotect textures when they cannot be collected.  Whenever a
3966         texture is created the manager attempts to free up the least recently used textures until the
3967         total memory use is below the provided threshhold.  If the manager cannot satisfy the memory
3968         limit it will not return any new textures until some old textures are released.
3969
3970         A LayerTexture wraps a TextureManager token, size, and format.  A LayerChromium can check if a
3971         previously requested texture is still available for use and reserve the LayerTexture's underlying
3972         storage between the updateContentsIfDirty() and the draw() call.
3973
3974         Also changes LayerChromium from having separate contentsDirty()/updateContents() calls to a single
3975         updateContentsIfDirty().
3976
3977         Tests: platform/chromium/compositing/lots-of-img-layers-with-opacity.html
3978                platform/chromium/compositing/lots-of-img-layers.html
3979
3980         * WebCore.gypi:
3981         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
3982         (WebCore::Canvas2DLayerChromium::updateContentsIfDirty):
3983         * platform/graphics/chromium/Canvas2DLayerChromium.h:
3984         * platform/graphics/chromium/ContentLayerChromium.cpp:
3985         (WebCore::ContentLayerChromium::cleanupResources):
3986         (WebCore::ContentLayerChromium::updateContentsIfDirty):
3987         (WebCore::ContentLayerChromium::updateTextureRect):
3988         (WebCore::ContentLayerChromium::draw):
3989         * platform/graphics/chromium/ContentLayerChromium.h:
3990         * platform/graphics/chromium/ImageLayerChromium.cpp:
3991         (WebCore::ImageLayerChromium::updateContentsIfDirty):
3992         * platform/graphics/chromium/ImageLayerChromium.h:
3993         * platform/graphics/chromium/LayerChromium.h:
3994         (WebCore::LayerChromium::updateContentsIfDirty):
3995         (WebCore::LayerChromium::draw):
3996         * platform/graphics/chromium/LayerRendererChromium.cpp:
3997         (WebCore::LayerRendererChromium::LayerRendererChromium):
3998         (WebCore::LayerRendererChromium::useShader):
3999         (WebCore::LayerRendererChromium::prepareToDrawLayers):
4000         (WebCore::LayerRendererChromium::updateRootLayerTextureRect):
4001         (WebCore::LayerRendererChromium::drawLayers):
4002         (WebCore::LayerRendererChromium::getFramebufferPixels):
4003         (WebCore::LayerRendererChromium::createLayerTexture):
4004         (WebCore::LayerRendererChromium::deleteLayerTexture):
4005         (WebCore::LayerRendererChromium::updateLayersRecursive):
4006         (WebCore::LayerRendererChromium::useRenderSurface):
4007         (WebCore::LayerRendererChromium::drawLayer):
4008         (WebCore::LayerRendererChromium::setScissorToRect):
4009         (WebCore::LayerRendererChromium::setDrawViewportRect):
4010         (WebCore::LayerRendererChromium::initializeSharedObjects):
4011         (WebCore::LayerRendererChromium::cleanupSharedObjects):
4012         * platform/graphics/chromium/LayerRendererChromium.h:
4013         (WebCore::LayerRendererChromium::renderSurfaceSharedValues):
4014         (WebCore::LayerRendererChromium::textureManager):
4015         * platform/graphics/chromium/LayerTexture.cpp: Added.
4016         (WebCore::LayerTexture::LayerTexture):
4017         (WebCore::LayerTexture::~LayerTexture):
4018         (WebCore::LayerTexture::isValid):
4019         (WebCore::LayerTexture::reserve):
4020         (WebCore::LayerTexture::unreserve):
4021         (WebCore::LayerTexture::bindTexture):
4022         (WebCore::LayerTexture::framebufferTexture2D):
4023         * platform/graphics/chromium/LayerTexture.h: Added.
4024         (WebCore::LayerTexture::create):
4025         * platform/graphics/chromium/PluginLayerChromium.cpp:
4026         (WebCore::PluginLayerChromium::updateContentsIfDirty):
4027         * platform/graphics/chromium/PluginLayerChromium.h:
4028         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
4029         (WebCore::RenderSurfaceChromium::SharedValues::SharedValues):
4030         (WebCore::RenderSurfaceChromium::SharedValues::~SharedValues):
4031         (WebCore::RenderSurfaceChromium::RenderSurfaceChromium):
4032         (WebCore::RenderSurfaceChromium::cleanupResources):
4033         (WebCore::RenderSurfaceChromium::prepareContentsTexture):
4034         (WebCore::RenderSurfaceChromium::draw):
4035         * platform/graphics/chromium/RenderSurfaceChromium.h:
4036         (WebCore::RenderSurfaceChromium::SharedValues::shaderProgram):
4037         (WebCore::RenderSurfaceChromium::SharedValues::shaderSamplerLocation):
4038         (WebCore::RenderSurfaceChromium::SharedValues::shaderMatrixLocation):
4039         (WebCore::RenderSurfaceChromium::SharedValues::shaderAlphaLocation):
4040         (WebCore::RenderSurfaceChromium::SharedValues::initialized):
4041         * platform/graphics/chromium/TextureManager.cpp: Added.
4042         (WebCore::memoryUseBytes):
4043         (WebCore::TextureManager::TextureManager):
4044         (WebCore::TextureManager::getToken):
4045         (WebCore::TextureManager::releaseToken):
4046         (WebCore::TextureManager::hasTexture):
4047         (WebCore::TextureManager::protectTexture):
4048         (WebCore::TextureManager::unprotectTexture):
4049         (WebCore::TextureManager::reduceMemoryToLimit):
4050         (WebCore::TextureManager::addTexture):
4051         (WebCore::TextureManager::removeTexture):
4052         (WebCore::TextureManager::requestTexture):
4053         * platform/graphics/chromium/TextureManager.h: Added.
4054         (WebCore::TextureManager::create):
4055         * platform/graphics/chromium/VideoLayerChromium.cpp:
4056         (WebCore::VideoLayerChromium::updateContentsIfDirty):
4057         * platform/graphics/chromium/VideoLayerChromium.h:
4058         * platform/graphics/chromium/WebGLLayerChromium.cpp:
4059         (WebCore::WebGLLayerChromium::updateContentsIfDirty):
4060         * platform/graphics/chromium/WebGLLayerChromium.h:
4061
4062 2010-12-09  Darin Adler  <darin@apple.com>
4063
4064         Reviewed by Sam Weinig.
4065
4066         Rework my recent setLocation refactoring to use DOMWindow instead of Frame.
4067         It's difficult to make correct security decisions based on Frame since a
4068         Frame can navigate to a new document.
4069
4070         Fixes some test failures that I somehow missed before the last check-in.
4071
4072         * bindings/js/JSDOMWindowBase.cpp:
4073         (WebCore::JSDOMWindowBase::crossDomainAccessErrorMessage): Call to the
4074         shell DOMWindow; not sure this one matters, but it's closer to the old
4075         code before my last patch. Also pass the DOMWindow rather than the
4076         frame to crossDomainAccessErrorMessage.
4077
4078         * bindings/js/JSDOMWindowCustom.cpp:
4079         (WebCore::JSDOMWindow::setLocation): Pass DOMWindow rather than Frame
4080         to the DOMWindow::setLocation function.
4081
4082         * page/DOMWindow.cpp:
4083         (WebCore::DOMWindow::setLocation): Take DOMWindow rather than Frame.
4084         (WebCore::DOMWindow::crossDomainAccessErrorMessage): Ditto.
4085
4086         * page/DOMWindow.h: Update new functions to take DOMWindow rather
4087         than Frame.
4088
4089 2010-12-09  Sam Weinig  <sam@webkit.org>
4090
4091         Try and fix the mac build.
4092
4093         * WebCore.exp.in:
4094
4095 2010-12-09  Dan Bernstein  <mitz@apple.com>
4096
4097         Reviewed by Dave Hyatt.
4098
4099         Removed an unused variable.
4100
4101         * rendering/InlineFlowBox.cpp:
4102         (WebCore::InlineFlowBox::computeLogicalBoxHeights): Removed parentLineHeight.
4103
4104 2010-12-09  Darin Adler  <darin@apple.com>
4105
4106         Reviewed by Geoffrey Garen.
4107
4108         Move DOMWindow::setLocation logic into DOMWindow class and out of JavaScript binding
4109         https://bugs.webkit.org/show_bug.cgi?id=50640
4110
4111         * bindings/js/JSDOMBinding.cpp:
4112         (WebCore::printErrorMessageForFrame): Removed body; just call through to
4113         DOMWindow::printErrorMessage.
4114
4115         * bindings/js/JSDOMWindowBase.cpp:
4116         (WebCore::JSDOMWindowBase::crossDomainAccessErrorMessage): Removed body;
4117         just call through to DOMWindow::crossDomainAccessErrorMessage.
4118
4119         * bindings/js/JSDOMWindowCustom.cpp:
4120         (WebCore::JSDOMWindow::setLocation): Changed terminology to use activeFrame and
4121         firstFrame, rather than the older lexicalFrame and dynamicFrame. Removed most
4122         of the body and moved it into DOMWindow::setLocation.
4123
4124         * page/DOMWindow.cpp:
4125         (WebCore::DOMWindow::setLocation): Added. Does all the same work that
4126         JSDOMWindow::setLocation used to do, but in a way that's not specific
4127         to JavaScript.
4128         (WebCore::DOMWindow::printErrorMessage): Added.
4129         (WebCore::DOMWindow::crossDomainAccessErrorMessage): Added.
4130
4131         * page/DOMWindow.h: Added setLocation, printErrorMessage, and
4132         crossDomainAccessErrorMessage.
4133
4134 2010-12-09  Sam Weinig  <sam@webkit.org>
4135
4136         Reviewed by Dan Bernstein.
4137
4138         WebKit2 needs smooth scrolling support on the mac
4139         <rdar://problem/8219402>
4140
4141         * WebCore.xcodeproj/project.pbxproj: Change ScrollAnimatorMac.cpp to ScrollAnimatorMac.mm.
4142         * platform/mac/ScrollAnimatorMac.cpp: Removed.
4143         * platform/mac/ScrollAnimatorMac.h:
4144         * platform/mac/ScrollAnimatorMac.mm: Copied from platform/mac/ScrollAnimatorMac.cpp.
4145         (-[ScrollAnimationHelperDelegate initWithScrollAnimator:WebCore::]):
4146         (-[ScrollAnimationHelperDelegate bounds]):
4147         (-[ScrollAnimationHelperDelegate _immediateScrollToPoint:]):
4148         (-[ScrollAnimationHelperDelegate convertSizeToBase:]):
4149         (-[ScrollAnimationHelperDelegate convertSizeFromBase:]):
4150         (-[ScrollAnimationHelperDelegate superview]):
4151         (-[ScrollAnimationHelperDelegate documentView]):
4152         (-[ScrollAnimationHelperDelegate window]):
4153         (-[ScrollAnimationHelperDelegate _recursiveRecomputeToolTips]):
4154         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
4155         (WebCore::ScrollAnimatorMac::scroll):
4156         (WebCore::ScrollAnimatorMac::setScrollPositionAndStopAnimation):
4157         (WebCore::ScrollAnimatorMac::currentPosition):
4158         (WebCore::ScrollAnimatorMac::immediateScrollToPoint):
4159         Add implementation of ScrollAnimator for the Mac.
4160
4161 2010-12-09  Brady Eidson  <beidson@apple.com>
4162
4163         Reviewed by Anders Carlsson.
4164
4165         <rdar://problem/8613779> and https://bugs.webkit.org/show_bug.cgi?id=50777
4166         WebKit2 ContextMenuClient support
4167
4168         Export some symbols and headers needed by WebKit2 Mac:
4169         * WebCore.exp.in:
4170         * WebCore.xcodeproj/project.pbxproj:
4171
4172 2010-12-09  Sheriff Bot  <webkit.review.bot@gmail.com>
4173
4174         Unreviewed, rolling out r73635.
4175         http://trac.webkit.org/changeset/73635
4176         https://bugs.webkit.org/show_bug.cgi?id=50778
4177
4178         'Side-effects on 3 css tests needs closer review' (Requested
4179         by mwenge on #webkit).
4180
4181         * platform/graphics/qt/ImageQt.cpp:
4182         (loadResourcePixmap):
4183         * platform/qt/RenderThemeQt.cpp:
4184         (WebCore::RenderThemeQt::computeSizeBasedOnStyle):
4185         (WebCore::RenderThemeQt::paintSearchField):
4186         (WebCore::RenderThemeQt::adjustSearchFieldStyle):
4187         (WebCore::RenderThemeQt::adjustSearchFieldCancelButtonStyle):
4188         (WebCore::RenderThemeQt::paintSearchFieldCancelButton):
4189         * platform/qt/RenderThemeQt.h:
4190
4191 2010-12-09  Robert Hogan  <robert@webkit.org>
4192
4193         Reviewed by Andreas Kling.
4194
4195         [Qt] Search input field doesn't have cancel button
4196
4197         Add a cancel button to t