2011-04-07 Adam Barth <abarth@webkit.org>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-04-07  Adam Barth  <abarth@webkit.org>
2
3         Reviewed by Eric Seidel.
4
5         Implement img-src style-src and font-src
6         https://bugs.webkit.org/show_bug.cgi?id=58018
7
8         These are pretty straight forward given the rest of the infrastructure
9         we've built so far.
10
11         Tests: http/tests/security/contentSecurityPolicy/image-allowed.html
12                http/tests/security/contentSecurityPolicy/image-blocked.html
13                http/tests/security/contentSecurityPolicy/style-allowed.html
14                http/tests/security/contentSecurityPolicy/style-blocked.html
15                http/tests/security/contentSecurityPolicy/xsl-allowed.php
16                http/tests/security/contentSecurityPolicy/xsl-blocked.php
17
18         * loader/cache/CachedResourceLoader.cpp:
19         (WebCore::CachedResourceLoader::canRequest):
20         * page/ContentSecurityPolicy.cpp:
21         (WebCore::ContentSecurityPolicy::allowImageFromSource):
22         (WebCore::ContentSecurityPolicy::allowStyleFromSource):
23         (WebCore::ContentSecurityPolicy::allowFontFromSource):
24         (WebCore::ContentSecurityPolicy::addDirective):
25         * page/ContentSecurityPolicy.h:
26
27 2011-04-07  David Levin  <levin@chromium.org>
28
29         Reviewed by Darin Adler.
30
31         Make IconSnapshot and PageURLRecord member variables private.
32         https://bugs.webkit.org/show_bug.cgi?id=58080
33
34         No change in functionality so no new tests.
35
36         * loader/icon/IconDatabase.cpp:
37         (WebCore::IconDatabase::writeToDatabase): Changed to used the accessor functions.
38         (WebCore::IconDatabase::writeIconSnapshotToSQLDatabase): Ditto.
39         * loader/icon/IconRecord.h:
40         (WebCore::IconSnapshot::IconSnapshot): Changed to use the new member variable names.
41         (WebCore::IconSnapshot::iconURL): Expose the property.
42         (WebCore::IconSnapshot::timestamp): Ditto.
43         (WebCore::IconSnapshot::data): Ditto.
44         * loader/icon/PageURLRecord.h:
45         (WebCore::PageURLSnapshot::PageURLSnapshot): Changed to use the new member variable names.
46         (WebCore::PageURLSnapshot::pageURL): Expose the property.
47         (WebCore::PageURLSnapshot::iconURL): Ditto.
48
49 2011-04-07  Dan Bernstein  <mitz@apple.com>
50
51         Build fix.
52
53         * platform/graphics/cairo/GraphicsContextCairo.cpp:
54         (WebCore::GraphicsContext::roundToDevicePixels):
55
56 2011-04-07  Eric Seidel  <eric@webkit.org>
57
58         Reviewed by Adam Barth.
59
60         Add stub support for generating Gtk build system from gyp
61         https://bugs.webkit.org/show_bug.cgi?id=58086
62
63         This does not produce a buildable WebCore, but it
64         does allow running gyp/configure --port=gtk and having
65         it generate a gtk.Makefile which we can use for testing
66         the rest of the plumbing.
67
68         * gyp/gtk.gyp: Added.
69
70 2011-04-07  David Hyatt  <hyatt@apple.com>
71
72         Reviewed by Dan Bernstein.
73
74         https://bugs.webkit.org/show_bug.cgi?id=57736
75         
76         Crash on openstreetmap.org while using the map. Fix a bad interaction between the positioned movement layout
77         optimization and the simplified layout optimization that could lead to blocks remaining marked as dirty when
78         layout finished. This would eventually lead to an inability to properly determine the correct layout root and
79         would cause a deleted root to be used later on.
80
81         Added fast/block/positioning/complex-positioned-movement.html.
82
83         * page/FrameView.cpp:
84         (WebCore::FrameView::scheduleRelayoutOfSubtree):
85         Add asserts to catch cases in the future where a layout root is set that has a dirty containing block.
86     
87         * rendering/RenderBlock.cpp:
88         (WebCore::RenderBlock::simplifiedLayout):
89         Change simplified layout so that the positioned movement optimization no longer clears the other layout
90         flags. This will ensure that we still lay out our descendants if they need it.
91         
92         (WebCore::RenderBlock::layoutPositionedObjects):
93         Changed to clear our layout flags now if the positioned movement is successful, since tryLayoutDoingPositionedMovementOnly
94         no longer does the clear.
95     
96         * rendering/RenderBox.h:
97         (WebCore::RenderBox::tryLayoutDoingPositionedMovementOnly):
98         tryLayoutDoingPositionedMovementOnly now returns a boolean indicating success or failure.  On success it no longer
99         does setNeedsLayout(false), but instead will let the caller take care of it. This way the caller can still look at
100         the other flags in case other kinds of layout are still needed.
101     
102         * rendering/RenderObject.h:
103         (WebCore::RenderObject::setNeedsPositionedMovementLayout):
104         (WebCore::RenderObject::setNeedsSimplifiedNormalFlowLayout):
105         Changed these methods to only set their respective flags and not to try to be clever about avoiding propagation.
106
107 2011-04-07  Andrew Scherkus  <scherkus@chromium.org>
108
109         Revert ENABLE_TRACK patch due to compile failures.
110
111         * CMakeLists.txt:
112         * Configurations/FeatureDefines.xcconfig:
113         * DerivedSources.make:
114         * GNUmakefile.am:
115         * WebCore.gypi:
116         * WebCore.xcodeproj/project.pbxproj:
117         * features.pri:
118         * html/HTMLAttributeNames.in:
119         * html/HTMLTagNames.in:
120         * html/HTMLTrackElement.cpp: Removed.
121         * html/HTMLTrackElement.h: Removed.
122         * html/HTMLTrackElement.idl: Removed.
123
124 2011-04-07  Dan Bernstein  <mitz@apple.com>
125
126         Reviewed by Simon Fraser.
127
128         <rdar://problem/9018212> Underline thickness is not uniform under non-integral scale factor
129         https://bugs.webkit.org/show_bug.cgi?id=58083
130
131         Test: fast/text/decorations-transformed.html
132
133         * platform/graphics/GraphicsContext.h: Added a RoundingMode enum with two values. RoundAllSides
134         is the existing rounding mode, where each side of the rectangle snaps to the nearest pixel
135         gridline. RoundOriginAndDimensions snaps the origin to the nearest pixel gridpoint and rounds
136         the width and the height. In this new mode, translating a rectangle in user space never changes
137         its dimensions in device pixels.
138         * platform/graphics/cg/GraphicsContextCG.cpp:
139         (WebCore::GraphicsContext::roundToDevicePixels): Implemented RoundOriginAndDimensions.
140         (WebCore::GraphicsContext::drawLineForText): Use RoundOriginAndDimensions, thus ensuring that
141         all underlines have the same thickness in device pixels.
142         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
143         (WebCore::GraphicsContext::roundToDevicePixels): Added RoundingMode parameter, but did not implement it.
144         * platform/graphics/qt/GraphicsContextQt.cpp:
145         (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
146         * platform/graphics/skia/GraphicsContextSkia.cpp:
147         (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
148         * platform/graphics/wince/GraphicsContextWinCE.cpp:
149         (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
150         * platform/graphics/wx/GraphicsContextWx.cpp:
151         (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
152         * rendering/InlineTextBox.cpp:
153         (WebCore::InlineTextBox::paintDecoration):
154
155 2011-04-06  Vitaly Repeshko  <vitalyr@chromium.org>
156
157         Reviewed by Nate Chapin.
158
159         [V8] Remove custom DOMImplementation getter on Document.
160         https://bugs.webkit.org/show_bug.cgi?id=57991
161
162         The custom getter is no longer required because DOMImplementation
163         objects are now created per document.
164
165         Test: fast/dom/DOMImplementation/implementation-identity.html
166
167         * bindings/scripts/CodeGeneratorV8.pm:
168         * bindings/v8/custom/V8DocumentCustom.cpp:
169         * dom/Document.idl:
170
171 2011-04-07  Sergey Glazunov  <serg.glazunov@gmail.com>
172
173         Reviewed by Dimitri Glazkov.
174
175         setHasID() is only called for styled elements
176         https://bugs.webkit.org/show_bug.cgi?id=57267
177
178         Test: fast/dom/non-styled-element-id-crash.html
179
180         * dom/Element.cpp:
181         (WebCore::Element::attributeChanged):
182         (WebCore::Element::idAttributeChanged):
183         * dom/Element.h:
184         * dom/StyledElement.cpp:
185         (WebCore::StyledElement::parseMappedAttribute):
186
187 2011-04-07  Jer Noble  <jer.noble@apple.com>
188
189         Reviewed by Eric Carlson.
190
191         HTMLVideoElement::webkitEnterFullscreen does not use new Full Screen API when available.
192         https://bugs.webkit.org/show_bug.cgi?id=58070
193
194         Make the HTMLMediaElement full screen functions call into the new Full Screen API when
195         FULLSCREEN_API is enabled.
196
197         * html/HTMLMediaElement.cpp:
198         (WebCore::HTMLMediaElement::enterFullscreen):
199         (WebCore::HTMLMediaElement::exitFullscreen):
200
201 2011-04-07  Adam Barth  <abarth@webkit.org>
202
203         Reviewed by Eric Seidel.
204
205         Implement CSP's options directive
206         https://bugs.webkit.org/show_bug.cgi?id=58014
207
208         This patch contains the full options parser, but we only have enough of
209         CSP implemented to see the effects of disable-xss-protection.  Will
210         need to do some more work before we can see eval-script in action.
211
212         Tests: http/tests/security/contentSecurityPolicy/inline-script-allowed.html
213                http/tests/security/contentSecurityPolicy/inline-script-blocked-goofy.html
214
215         * page/ContentSecurityPolicy.cpp:
216         (WebCore::CSPOptions::CSPOptions):
217         (WebCore::CSPOptions::disableXSSProtection):
218         (WebCore::CSPOptions::evalScript):
219         (WebCore::CSPOptions::parse):
220         (WebCore::ContentSecurityPolicy::allowJavaScriptURLs):
221         (WebCore::ContentSecurityPolicy::allowInlineEventHandlers):
222         (WebCore::ContentSecurityPolicy::allowInlineScript):
223         (WebCore::ContentSecurityPolicy::addDirective):
224         * page/ContentSecurityPolicy.h:
225
226 2011-04-07  Alexey Proskuryakov  <ap@apple.com>
227
228         Reviewed by Anders Carlsson.
229
230         REGRESSION (WebKit2): Reverse conversion doesn't work in Kotoeri
231         https://bugs.webkit.org/show_bug.cgi?id=58066
232         <rdar://problem/8965302>
233
234         * platform/mac/HTMLConverter.h:
235         * platform/mac/HTMLConverter.mm: (+[WebHTMLConverter editingAttributedStringFromRange:]):
236         Changed editingAttributedStringFromRange: to use WebCore::Range instead of DOMRange, since
237         it's now used in WebKit2.
238
239 2011-04-07  Andy Estes  <aestes@apple.com>
240
241         Reviewed by Darin Adler.
242
243         REGRESSION (r64712): Microsoft Outlook 2011: original message contents
244         not included when replying to an email.
245         https://bugs.webkit.org/show_bug.cgi?id=57794
246         
247         * WebCore.exp.in:
248         * loader/FrameLoader.cpp:
249         (WebCore::FrameLoader::finishedParsing): Call Frame::injectUserScripts()
250         before checking if the FrameLoader is parsing the initial empty document.
251         This allows user scripts to be injected at the end of document parsing
252         (if the setting is enabled).
253         * page/Frame.cpp:
254         (WebCore::Frame::injectUserScripts): Do not inject scripts if this
255         feature is disabled on the initial empty document.
256         * page/Settings.cpp:
257         (WebCore::Settings::Settings):
258         * page/Settings.h: Add a setting for injecting user scripts into the
259         initial empty document (defaults to false).
260         (WebCore::Settings::setInjectUserScriptsInInitialEmptyDocument):
261         (WebCore::Settings::injectUserScriptsInInitialEmptyDocument):
262         * platform/mac/RuntimeApplicationChecks.h:
263         * platform/mac/RuntimeApplicationChecks.mm:
264         (WebCore::applicationIsMicrosoftOutlook): Check if the embedding
265         application is Microsoft Outlook.
266
267 2011-04-06  Jer Noble  <jer.noble@apple.com>
268
269         Reviewed by Maciej Stachowiak.
270
271         AVF: MediaPlayerPrivateAVFoundation never reaches playable state.
272         https://bugs.webkit.org/show_bug.cgi?id=57962
273
274         Add support for a new AVPlayerItem API which will notify clients when their
275         seek completes.  This requires a new Notification type to be passed to the main
276         thread in MediaPlayerPrivateAVFoundation.
277
278         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
279         (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Added.
280         (WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification): Added two new
281             overloaded functions which take a Notification; and a Notification::Type and boolean.
282         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification): Support new SeekCompleted 
283             Notification type.
284         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
285         (WebCore::MediaPlayerPrivateAVFoundation::Notification::Notification): Added one new constructor.
286         (WebCore::MediaPlayerPrivateAVFoundation::Notification::finished): Added ivar and accessor.
287         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
288         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): Call new AVPlayerItem API.
289         (-[WebCoreAVFMovieObserver seekCompleted:]): Added.
290
291 2011-04-07  Nancy Piedra  <nancy.piedra@nokia.com>
292
293         Reviewed by Eric Carlson.
294
295         Parse quotes from content type parameters
296         https://bugs.webkit.org/show_bug.cgi?id=53275
297
298         This functionality is tested in video-can-play-type.html layout test
299         where I've added codecs parameter with good and bad formatting.
300
301         * platform/ContentType.cpp:
302         (WebCore::ContentType::parameter):
303
304 2011-04-07  Pavel Feldman  <pfeldman@google.com>
305
306         Reviewed by Yury Semikhatsky.
307
308         Web Inspector: remove "enabled" from the setBreakpoint protocol.
309         https://bugs.webkit.org/show_bug.cgi?id=58047
310
311         * bindings/js/ScriptDebugServer.cpp:
312         (WebCore::ScriptDebugServer::hasBreakpoint):
313         * bindings/v8/DebuggerScript.js:
314         ():
315         * bindings/v8/ScriptDebugServer.cpp:
316         (WebCore::ScriptDebugServer::setBreakpoint):
317         * inspector/Inspector.json:
318         * inspector/InspectorDebuggerAgent.cpp:
319         (WebCore::buildObjectForBreakpointCookie):
320         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
321         (WebCore::InspectorDebuggerAgent::setBreakpoint):
322         (WebCore::InspectorDebuggerAgent::continueToLocation):
323         (WebCore::InspectorDebuggerAgent::didParseSource):
324         * inspector/InspectorDebuggerAgent.h:
325         * inspector/ScriptBreakpoint.h:
326         (WebCore::ScriptBreakpoint::ScriptBreakpoint):
327         * inspector/front-end/DebuggerModel.js:
328         (WebInspector.DebuggerModel.prototype.setBreakpoint):
329         (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
330         * inspector/front-end/DebuggerPresentationModel.js:
331         (WebInspector.DebuggerPresentationModel):
332         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints):
333         (WebInspector.DebuggerPresentationModel.prototype._updateBreakpointsAfterLiveEdit):
334         (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint.callback):
335         (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint):
336         (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger):
337         (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger.didRequestSourceMapping):
338         (WebInspector.DebuggerPresentationModel.prototype._removeBreakpointFromDebugger):
339         (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled.afterUpdate):
340         (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled):
341         (WebInspector.DebuggerPresentationModel.prototype.updateBreakpoint):
342         (WebInspector.DebuggerPresentationModel.prototype.removeBreakpoint):
343         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded.didRequestSourceMapping):
344         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
345         (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved):
346         (WebInspector.DebuggerPresentationModel.prototype._breakpointResolved):
347         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpointsFromSettings):
348         (WebInspector.DebuggerPresentationModel.prototype._saveBreakpoints):
349         (WebInspector.DebuggerPresentationModel.prototype._reset):
350         (WebInspector.PresentationBreakpoint):
351
352 2011-04-07  Dan Bernstein  <mitz@apple.com>
353
354         Reviewed by Adam Roben.
355
356         Removed a redundant line of code.
357
358         * rendering/RenderInline.cpp:
359         (WebCore::RenderInline::updateAlwaysCreateLineBoxes): No need to compare line gap values, as
360         this is covered by the earlier hasIdenticalAscentDescentAndLineGap() check.
361
362 2011-04-07  Liang Qi  <liang.qi@nokia.com>
363
364         Reviewed by Laszlo Gombos.
365
366         [Qt][Symbian] Enable webkit build with GCCE on Symbian.
367         https://bugs.webkit.org/show_bug.cgi?id=57841
368
369         * WebCore.pri: Thanks for Norbert Leser  <norbert.leser@nokia.com> who checked RVCT part.
370         --rw-base value in QMAKE_LFLAGS.ARMCC and -Tdata value in QMAKE_LFLAGS.GCCE are updated
371         to 0x1000000 together. They need to be updated in the future when WebKit grows.
372
373 2011-04-06  Pavel Feldman  <pfeldman@google.com>
374
375         Reviewed by Yury Semikhatsky.
376
377         Web Inspector: get rid of Breakpoint.js.
378         https://bugs.webkit.org/show_bug.cgi?id=57949
379
380         * WebCore.gypi:
381         * WebCore.vcproj/WebCore.vcproj:
382         * inspector/front-end/Breakpoint.js: Removed.
383         * inspector/front-end/BreakpointsSidebarPane.js:
384         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.addBreakpoint):
385         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.updateBreakpoint.didLoadSnippet):
386         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.updateBreakpoint):
387         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._compareBreakpoints):
388         * inspector/front-end/DebuggerModel.js:
389         (WebInspector.DebuggerModel):
390         (WebInspector.DebuggerModel.prototype._debuggerWasDisabled):
391         (WebInspector.DebuggerModel.prototype.setBreakpoint.didSetBreakpoint):
392         (WebInspector.DebuggerModel.prototype.setBreakpoint):
393         (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
394         (WebInspector.DebuggerModel.prototype.removeBreakpoint):
395         (WebInspector.DebuggerModel.prototype._breakpointResolved):
396         (WebInspector.DebuggerModel.prototype.reset):
397         * inspector/front-end/DebuggerPresentationModel.js:
398         (WebInspector.DebuggerPresentationModel):
399         (WebInspector.DebuggerPresentationModel.prototype._refreshBreakpoints):
400         (WebInspector.DebuggerPresentationModel.prototype._updateBreakpointsAfterLiveEdit):
401         (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
402         (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint.didSetBreakpoint):
403         (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint):
404         (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled):
405         (WebInspector.DebuggerPresentationModel.prototype.updateBreakpoint):
406         (WebInspector.DebuggerPresentationModel.prototype.removeBreakpoint):
407         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded.didRequestSourceMapping):
408         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
409         (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved):
410         (WebInspector.DebuggerPresentationModel.prototype._breakpointResolved):
411         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints):
412         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoint):
413         (WebInspector.DebuggerPresentationModel.prototype._saveBreakpoints):
414         (WebInspector.DebuggerPresentationModel.prototype._reset):
415         (WebInspector.PresentationBreakpoint):
416         (WebInspector.PresentationBreakpoint.prototype.get sourceFile):
417         (WebInspector.PresentationBreakpoint.prototype.get url):
418         (WebInspector.PresentationBreakpoint.prototype.get resolved):
419         (WebInspector.PresentationBreakpoint.prototype.loadSnippet):
420         * inspector/front-end/ResourceTreeModel.js:
421         (WebInspector.ResourceTreeModel):
422         (WebInspector.ResourceTreeModel.prototype._onResourceStarted):
423         (WebInspector.ResourceTreeModel.prototype._addResourceToFrame):
424         * inspector/front-end/ScriptsPanel.js:
425         (WebInspector.ScriptsPanel):
426         (WebInspector.ScriptsPanel.prototype._breakpointUpdated):
427         (WebInspector.ScriptsPanel.prototype.reset):
428         * inspector/front-end/WebKit.qrc:
429         * inspector/front-end/inspector.html:
430
431 2011-04-07  Yury Semikhatsky  <yurys@chromium.org>
432
433         Reviewed by Pavel Feldman.
434
435         Web Inspector: console messages names should adhere to the common naming style
436         https://bugs.webkit.org/show_bug.cgi?id=58042
437
438         * inspector/ConsoleMessage.cpp:
439         (WebCore::ConsoleMessage::addToFrontend):
440         (WebCore::ConsoleMessage::updateRepeatCountInConsole):
441         * inspector/Inspector.json:
442         * inspector/InspectorConsoleAgent.cpp:
443         (WebCore::InspectorConsoleAgent::clearConsoleMessages):
444         * inspector/front-end/ConsoleView.js:
445         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messageAdded):
446         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messageRepeatCountUpdated):
447         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messagesCleared):
448         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher):
449
450 2011-04-06  Ilya Tikhonovsky  <loislo@chromium.org>
451
452         Reviewed by Yury Semikhatsky.
453
454         Web Inspector: migrate Inspector protocol messages format to JSON-RPC.
455         https://bugs.webkit.org/show_bug.cgi?id=57957
456
457         There is not a significant difference between  inspector messages spec and and JSON-RPC 2.0 messages spec.
458         Also JSON-RPC has a pretty clear specification for error descriptions which we haven't.
459         It was decided that we will use it.
460
461         the list of renames:
462         1) type-> /dev/null
463         2) domain + '.' + event => method // for events
464         3) domain + '.' + command => method // for requests
465         4) requestId => id // for responses
466         5) arguments => params // for requests
467         6) data => params // for events
468         7) body => result // for responses
469
470         protocolErrors and error properties will be converted to JSON-RPC error format.
471         The order of properties in messages also will be adjusted.
472         The only thing that looks unnecessary is jsonrpc property.
473
474         * inspector/CodeGeneratorInspector.pm:
475
476 2011-04-07  Ryosuke Niwa  <rniwa@webkit.org>
477
478         Reviewed by Eric Seidel.
479
480         Add functions to update left and right offsets to LineOffsets
481         https://bugs.webkit.org/show_bug.cgi?id=58028
482
483         Added update() and shrinkWidthForNewFloatIfNeeded(FloatingObject*) to LineOffsets,
484         which are used to update m_left and m_right. Also added m_block and m_isFirstLine
485         member variables to LineOffsets so that users of LineOffsets don't have to pass them around.
486
487         * rendering/RenderBlock.h:
488         * rendering/RenderBlockLineLayout.cpp:
489         (WebCore::RenderBlock::skipLeadingWhitespace): No longer passes firstLine to positionNewFloatOnLine.
490         (WebCore::LineOffsets::LineOffsets): Takes RenderBlock* and isFirstLine instead of left and right offsets.
491         (WebCore::LineOffsets::update): Extracted from findNextLineBreak and positionNewFloatOnLine.
492         (WebCore::LineOffsets::shrinkWidthForNewFloatIfNeeded): Extracted from positionNewFloatOnLine.
493         (WebCore::RenderBlock::findNextLineBreak): Calls skipLeadingWhitespace and positionNewFloatOnLine.
494         (WebCore::RenderBlock::positionNewFloatOnLine): Calls shrinkWidthForNewFloatIfNeeded and update and
495         no longer passes firstLine around.
496
497 2011-04-06  Pavel Feldman  <pfeldman@google.com>
498
499         Reviewed by Yury Semikhatsky.
500
501         Web Inspector: migrate debugger domain to the unified breakpoint location notion.
502         https://bugs.webkit.org/show_bug.cgi?id=57928
503
504         * inspector/Inspector.json:
505         * inspector/InspectorDebuggerAgent.cpp:
506         (WebCore::buildObjectForBreakpointCookie):
507         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
508         (WebCore::InspectorDebuggerAgent::setBreakpoint):
509         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
510         (WebCore::InspectorDebuggerAgent::didParseSource):
511         * inspector/InspectorDebuggerAgent.h:
512         * inspector/front-end/Breakpoint.js:
513         (WebInspector.Breakpoint):
514         * inspector/front-end/DebuggerModel.js:
515         (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
516         (WebInspector.DebuggerModel.prototype._breakpointResolved):
517
518 2011-04-07  Andreas Kling  <andreas.kling@nokia.com>
519
520         Reviewed by Benjamin Poulain.
521
522         [Qt] Mask the QStyle::State_Horizontal hint for vertical scrollbars.
523
524         When initializing a QStyleOptionSlider from a widget, the State_Horizontal
525         hint may get set depending on how that widget is laid out in its parent.
526         If this happens when drawing a vertical scrollbar, the hint is never
527         cleared and we end up painting a vertical scrollbar with horizontal arrows.
528
529         Covered by pixel tests which should no longer paint silly scrollbars.
530
531         * platform/qt/ScrollbarThemeQt.cpp:
532         (WebCore::styleOptionSlider):
533
534 2011-04-07  Adam Barth  <abarth@webkit.org>
535
536         Reviewed by Eric Seidel.
537
538         script-src should block inline script
539         https://bugs.webkit.org/show_bug.cgi?id=58012
540
541         Block inline scripts at the ScriptElement layer.  This should catch
542         exactly the scripts we want to catch.
543
544         Test: http/tests/security/contentSecurityPolicy/inline-script-blocked.html
545
546         * dom/Document.cpp:
547         (WebCore::Document::processHttpEquiv):
548             - This patch also adds the ability to supply a CSP policy via a
549               <meta> tag.  We'll update the name of the header once we've
550               finished implementing the spec.
551         * dom/ScriptElement.cpp:
552         (WebCore::ScriptElement::executeScript):
553         * page/ContentSecurityPolicy.cpp:
554         (WebCore::ContentSecurityPolicy::allowInlineScript):
555         * page/ContentSecurityPolicy.h:
556
557 2011-04-07  Alice Boxhall  <aboxhall@chromium.org>
558
559         Reviewed by Ryosuke Niwa.
560
561         Move the MouseEventWithHitTestResults::targetNode() method on to EventHandler.
562         https://bugs.webkit.org/show_bug.cgi?id=57921
563
564         Moves the MouseEventWithHitTestResults::targetNode() method on to EventHandler, so
565         that the same logic can be used for a HitTestResult.
566
567         No visible changes, just cleanup, so no tests.
568
569         * page/EventHandler.cpp:
570         (WebCore::EventHandler::selectClosestWordFromMouseEvent):
571         (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
572         (WebCore::EventHandler::handleMousePressEventTripleClick):
573         (WebCore::EventHandler::handleMousePressEventSingleClick):
574         (WebCore::EventHandler::handleMousePressEvent):
575         (WebCore::EventHandler::handleMouseDraggedEvent):
576         (WebCore::EventHandler::handleMouseReleaseEvent):
577         (WebCore::EventHandler::subframeForHitTestResult):
578         Made public static member, so that it can access targetNode(), and be accessed by
579         webkitwebview in gtk.
580         (WebCore::EventHandler::selectCursor):
581         (WebCore::EventHandler::targetNode):
582         (WebCore::EventHandler::handleMouseDoubleClickEvent):
583         (WebCore::EventHandler::handleMouseMoveEvent):
584         (WebCore::EventHandler::updateDragAndDrop):
585         (WebCore::EventHandler::sendContextMenuEvent):
586         * page/EventHandler.h:
587         * page/MouseEventWithHitTestResults.cpp:
588         (WebCore::MouseEventWithHitTestResults::MouseEventWithHitTestResults):
589         * page/MouseEventWithHitTestResults.h:
590         * page/android/EventHandlerAndroid.cpp:
591         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
592         * page/brew/EventHandlerBrew.cpp:
593         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
594         * page/chromium/EventHandlerChromium.cpp:
595         (WebCore::EventHandler::passMousePressEventToSubframe):
596         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
597         * page/efl/EventHandlerEfl.cpp:
598         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
599         * page/gtk/EventHandlerGtk.cpp:
600         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
601         * page/haiku/EventHandlerHaiku.cpp:
602         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
603         * page/mac/EventHandlerMac.mm:
604         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
605         (WebCore::EventHandler::passSubframeEventToSubframe):
606         * page/wx/EventHandlerWx.cpp:
607         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
608
609 2011-04-07  Pavel Podivilov  <podivilov@chromium.org>
610
611         Reviewed by Pavel Feldman.
612
613         Web Inspector: build mapping for formatted scripts based on keywords positions.
614         https://bugs.webkit.org/show_bug.cgi?id=57936
615
616         Mapping based on [\$\.\w]+ was not accurate because string literals representation
617         may be different in original and formatted scripts.
618
619         * inspector/front-end/ScriptFormatterWorker.js:
620         (buildMapping.regexp.b):
621         (buildMapping):
622
623 2011-04-07  Kent Tamura  <tkent@chromium.org>
624
625         Reviewed by Dimitri Glazkov.
626
627         Spinbuttons become unclickable if right padding is large.
628         https://bugs.webkit.org/show_bug.cgi?id=56298
629
630         An inner-spin-button is put on the right border and ignores right
631         padding in RenderTextControlSingleLine::layout(), but forwardEvent()
632         checks if a point is in an area just right of an internal text block.
633         This inconsistency caused a bug that an inner-spin-button with large
634         padding didn't receive mouse events.
635
636         To fix this bug, we render spin buttons as layers, and remove manual
637         event forwarding code.
638
639         Test: fast/forms/input-number-large-padding.html
640
641         * css/html.css: Add "position:relative" to make a spin-button a layer.
642         (input::-webkit-inner-spin-button):
643         (input::-webkit-outer-spin-button):
644         * rendering/RenderTextControlSingleLine.cpp:
645         (WebCore::RenderTextControlSingleLine::forwardEvent):
646           Remove manual event forwarding code.
647
648 2011-04-06  Adam Barth  <abarth@webkit.org>
649
650         Reviewed by Eric Seidel.
651
652         CSP object-src should block plugin loads
653         https://bugs.webkit.org/show_bug.cgi?id=57283
654
655         This change is pretty straight-forward.  It's slighly unclear to me
656         whether this patch is correct w.r.t. the code in DocumentWriter.  I've
657         added a FIXME comment, and I'll investigate that case more in the future.
658
659         Test: http/tests/security/contentSecurityPolicy/object-src-none.html
660
661         * loader/DocumentWriter.cpp:
662         (WebCore::DocumentWriter::begin):
663         * loader/SubframeLoader.cpp:
664         (WebCore::SubframeLoader::requestPlugin):
665         * page/ContentSecurityPolicy.cpp:
666         (WebCore::ContentSecurityPolicy::allowObjectFromSource):
667         (WebCore::ContentSecurityPolicy::addDirective):
668         * page/ContentSecurityPolicy.h:
669
670 2011-04-06  Beth Dakin  <bdakin@apple.com>
671
672         Reviewed by Dan Bernstein.
673
674         https://bugs.webkit.org/show_bug.cgi?id=58009
675         Frame::scalePage() results in visual artifacts with scale factors less than 1
676         -and corresponding-
677         <rdar://problem/8683230>
678
679         Fall into the case where we fill with a background base color when there is a page 
680         scale factor that is less than 1.
681         * rendering/RenderView.cpp:
682         (WebCore::RenderView::paintBoxDecorations):
683
684 2011-04-06  Jer Noble  <jer.noble@apple.com>
685
686         Reviewed by Darin Adler.
687
688         AVF: MediaPlayerPrivateAVFoundationObjC should not use -[AVPlayerItem isPlaybackBufferEmpty]
689         https://bugs.webkit.org/show_bug.cgi?id=57982
690
691         Query our cached loaded time array instead of asking AVPlayerItem if its buffer is empty.
692
693         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
694         (WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatus):
695
696 2011-04-06  Jer Noble  <jer.noble@apple.com>
697
698         Reviewed by Eric Carlson.
699
700         MediaPlayerPrivateAVFoundation does not change rate due to setRate().
701         https://bugs.webkit.org/show_bug.cgi?id=57919
702
703         Test: media/video-set-rate-from-pause.html
704
705         The base class of MediaPlayerPrivateAVFoundation does not actually change the rate
706         of the media; instead a subclass must do that work.  So when setRate() is called, 
707         inform a subclass through a new pure virtual updateRate() function that there's 
708         work to be done.
709
710         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
711         (WebCore::MediaPlayerPrivateAVFoundation::setRate): Call updateRate()
712         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
713         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h:
714         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
715         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateRate): Added.  Set the requested rate.
716
717 2011-04-06  Dai Mikurube  <dmikurube@chromium.org>
718
719         Reviewed by David Levin.
720
721         Add QUOTA build flag for unified quota API
722         https://bugs.webkit.org/show_bug.cgi?id=57918
723
724         * Configurations/FeatureDefines.xcconfig: Added QUOTA build flag
725         * GNUmakefile.am: Added QUOTA build flag
726         * WebCore.pri: Added QUOTA build flag
727
728 2011-04-06  Stephanie Lewis  <slewis@apple.com>
729
730         Reviewed by Darin Adler.
731
732         https://bugs.webkit.org/show_bug.cgi?id=57997
733         <rdar://problem/9187856> REGRESSION(r75555): ~5-7 MB increase in memory between iBench runs
734         Navigating away from a Scrolled page which queues a scroll event that is never dispatched.
735         Cancel all enqueued events when detaching the Document the events cannot keep the Document
736         alive.
737
738         No change in functionality so no new tests.  
739
740         * dom/Document.cpp:
741         (WebCore::Document::detach):
742         * dom/EventQueue.cpp:
743         (WebCore::EventQueue::cancelQueuedEvents):
744         * dom/EventQueue.h:
745
746 2011-04-06  Dan Bernstein  <mitz@apple.com>
747
748         Reviewed by Darin Adler.
749
750         <rdar://problem/9084761> REGRESSION (r73993): Default Arabic line spacing has gotten very loose when the specified font is not Arabic
751         https://bugs.webkit.org/show_bug.cgi?id=58002
752
753         * platform/graphics/mac/SimpleFontDataMac.mm:
754         (WebCore::SimpleFontData::platformInit): The version of Geeza Pro in Snow Leopard
755         does not require the vertical metrics tweaks that were needed in Leopard. That the
756         tweaks were being applied went mostly unnoticed until r73993, because until then it
757         only affected cases where Geeza Pro was specified, not when it occurred as a fallback
758         font.
759
760 2011-04-06  Roland Steiner  <rolandsteiner@chromium.org>
761
762         Reviewed by Dimitri Glazkov.
763
764         Bug 57994 - Move guardRef functionality back to Document
765         https://bugs.webkit.org/show_bug.cgi?id=57994
766
767         Move the relevant code parts from TreeScope back into Document.
768
769         No new tests. (no new functionality)
770
771         * dom/Document.cpp:
772         (WebCore::Document::removedLastRef):
773         * dom/Document.h:
774         * dom/TreeScope.cpp:
775         (WebCore::TreeScope::destroyTreeScopeData):
776         * dom/TreeScope.h:
777
778 2011-04-06  Ian Henderson  <ianh@apple.com>
779
780         Reviewed by Simon Fraser, Antti Koivisto.
781
782         Fast path for parsing simple CSS values
783         https://bugs.webkit.org/show_bug.cgi?id=57964
784
785         Add functions to parse simple color or dimension values, skipping the
786         overhead of full CSS parsing.
787
788         Change parseValue to a static method to avoid unnecessary allocation
789         of a CSSParser in the fast case.
790
791         * css/CSSMutableStyleDeclaration.cpp:
792         (WebCore::CSSMutableStyleDeclaration::setProperty):
793         Changed to use the new, static parseValue method.
794         * css/CSSParser.cpp:
795         (WebCore::isColorPropertyID):
796         (WebCore::parseColorValue):
797         Parses any color accepted by the existing parseColor() static method.
798         We must handle color identifiers separately, since parseColor() will
799         change 'red' into 'rgb(255, 0, 0)'.
800         (WebCore::isSimpleLengthPropertyID):
801         (WebCore::parseSimpleLengthValue):
802         Parses a value of the form 'NNpx', 'NN%', or 'NN' (when strict is
803         false, or 'NN' is '0').  Returns false to fall back to the slow path.
804         (WebCore::CSSParser::parseValue):
805         * css/CSSParser.h:
806         * css/WebKitCSSMatrix.cpp:
807         (WebCore::WebKitCSSMatrix::setMatrixValue):
808         Changed to use the new, static parseValue method.
809
810 2011-04-06  Kevin Ollivier  <kevino@theolliviers.com>
811
812         Reviewed by Darin Adler.
813
814         Make sure JS_EXPORT_PRIVATE is an empty define when we aren't using the export macros.
815
816         https://bugs.webkit.org/show_bug.cgi?id=27551
817
818         * config.h:
819
820 2011-04-06  Simon Fraser  <simon.fraser@apple.com>
821
822         Reviewed by Antti Koivisto.
823
824         Some minor style resolution optimizations
825         https://bugs.webkit.org/show_bug.cgi?id=57996
826
827         A couple of minor optimizations to style-related code.
828
829         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
830         (WebCore::isCSSPropertyName):
831         (WebCore::JSCSSStyleDeclaration::putDelegate):
832         Avoid calling cssPropertyName() twice when setting style on an element.
833         
834         * css/CSSStyleSelector.cpp:
835         (WebCore::useSVGZoomRules):
836         (WebCore::CSSStyleSelector::applyProperty):
837         Avoid calling isSVGElement() for every property, since only a two properties
838         care about it.
839
840 2011-04-06  Ian Henderson  <ianh@apple.com>
841
842         Reviewed by Antti Koivisto.
843
844         Unnecessary string allocation in CSSStyleDeclaration::setProperty
845         https://bugs.webkit.org/show_bug.cgi?id=57995
846
847         Pass the bool representing the property's importance directly instead
848         of constructing a string.
849
850         * css/CSSStyleDeclaration.cpp:
851         (WebCore::CSSStyleDeclaration::setProperty):
852
853 2011-04-06  Leandro Gracia Gil  <leandrogracia@chromium.org>
854
855         Reviewed by Steve Block.
856
857         Make the style of createFunctionOnlyCallback in V8 consistent with the JavaScriptCore version.
858         https://bugs.webkit.org/show_bug.cgi?id=57963
859
860         No new tests. LayoutTests/fast/dom/Geolocation/argument-types.html
861
862         * bindings/v8/V8Utilities.h:
863         (WebCore::createFunctionOnlyCallback):
864         * bindings/v8/custom/V8GeolocationCustom.cpp:
865         (WebCore::V8Geolocation::getCurrentPositionCallback):
866         (WebCore::V8Geolocation::watchPositionCallback):
867
868 2011-04-06  Brian Weinstein  <bweinstein@apple.com>
869
870         Reviewed by Adam Roben.
871
872         WebKit2: Support Windows 7 Gestures
873         https://bugs.webkit.org/show_bug.cgi?id=49824
874         <rdar://problem/8689728>
875         
876         Move WindowTouch.h from WebKit/win, so it can be used in both WebKit and WebKit2.
877
878         * WebCore.vcproj/WebCore.vcproj:
879         * platform/win/WindowsTouch.h: Copied from WebKit/win/WindowsTouch.h.
880
881 2011-04-06  Alexis Menard  <alexis.menard@openbossa.org>
882
883         Reviewed by Andreas Kling.
884
885         [Qt] We should use USE(QT_MULTIMEDIA) rather than ENABLE(QT_MULTIMEDIA).
886         https://bugs.webkit.org/show_bug.cgi?id=57974
887
888         We should use USE(QT_MULTIMEDIA) rather than ENABLE(QT_MULTIMEDIA).
889
890         No new tests needed, just a config flag rename.
891
892         * features.pri:
893
894 2011-04-06  Tyler Close  <tjclose@chromium.org>
895
896         Reviewed by Nate Chapin.
897
898         run-bindings-tests reference files out of sync with CodeGenerator*.pm
899         https://bugs.webkit.org/show_bug.cgi?id=57967
900
901         * bindings/scripts/test/V8/V8TestCallback.cpp:
902
903 2011-04-06  Asanka Herath  <asanka@chromium.org>
904
905         Reviewed by Darin Fisher.
906
907         Add new TargetType: TargetIsFavicon
908
909         https://bugs.webkit.org/show_bug.cgi?id=57659
910
911         No new functionality added, so no additional tests.
912
913         * platform/network/ResourceRequestBase.h:
914
915 2011-04-06  David Hyatt  <hyatt@apple.com>
916
917         Reviewed by Simon Fraser.
918
919         https://bugs.webkit.org/show_bug.cgi?id=57981
920         
921         Update the column count and width computation algorithm for CSS3 multi-column layout 
922         to match the revised pseudo-algorithm in the latest draft of the spec.
923
924         * rendering/RenderBlock.cpp:
925         (WebCore::RenderBlock::calcColumnWidth):
926
927 2011-04-06  Ryosuke Niwa  <rniwa@webkit.org>
928
929         Reviewed by Eric Seidel.
930
931         borderPaddingMarginStart and borderPaddingMarginEnd should take RenderInline
932         https://bugs.webkit.org/show_bug.cgi?id=57965
933
934         Changed the argument types of borderPaddingMarginStart and borderPaddingMarginEnd
935         from RenderBoxModelObject to RenderInline since they call marginStart and marginEnd
936         instead of marginStartForChild and marginEndForChild respectively.
937
938         Calling these two functions on RenderInline is okay because writing-mode cannot differ
939         from that of the containing block.
940
941         * rendering/RenderBlockLineLayout.cpp:
942         (WebCore::borderPaddingMarginStart):
943         (WebCore::borderPaddingMarginEnd):
944         (WebCore::inlineLogicalWidth):
945
946 2011-04-06  Sheriff Bot  <webkit.review.bot@gmail.com>
947
948         Unreviewed, rolling out r83039.
949         http://trac.webkit.org/changeset/83039
950         https://bugs.webkit.org/show_bug.cgi?id=57978
951
952         introduced a new regression in conjunction to
953         ReplaceSelectionCommand (Requested by rniwa on #webkit).
954
955         * editing/EditingStyle.cpp:
956         (WebCore::EditingStyle::init):
957         * editing/InsertParagraphSeparatorCommand.cpp:
958         (WebCore::InsertParagraphSeparatorCommand::doApply):
959
960 2011-04-06  Naoki Takano  <takano.naoki@gmail.com>
961
962         Reviewed by David Levin.
963
964         Webkit ignores PgUp/PgDown/Home/End in SELECT tag objects
965         https://bugs.webkit.org/show_bug.cgi?id=27658
966
967         Test: fast/events/select-element.html
968
969         * dom/SelectElement.cpp:
970         (WebCore::nextValidIndex): Moved from elsewhere in the file to be used by other routines.
971         (WebCore::nextSelectableListIndexPageAway): Returns a selectable index one page away from the given index.
972         (WebCore::nextSelectableListIndex): Implemented with nextValidIndex.
973         And converted to a normal static function from a private function of SelectElement.
974         (WebCore::previousSelectableListIndex): Implemented with nextValidIndex.
975         And converted to a normal static function from a private function of SelectElement.
976         (WebCore::firstSelectableListIndex): Returns the first selectable index.
977         (WebCore::lastSelectableListIndex): Returns the last selectable index.
978         (WebCore::SelectElement::menuListDefaultEventHandler): Converted from C cast to C++ cast.
979         (WebCore::SelectElement::listBoxDefaultEventHandler): Adds support for PageUp/PageDown/Home/End with both single and multiple selection.
980
981         * dom/SelectElement.h:
982         (WebCore::SelectElement::): Remove nextSelectableListIndex() and previousSelectableListIndex().
983
984         * rendering/RenderListBox.h: Makes RenderListBox::size public so that PageUp/PageDown behavior can use the actual list size rather than that specified in HTML.
985         They can differ due to the minimum size imposed by RenderListBox.
986
987 2011-04-06  David Hyatt  <hyatt@apple.com>
988
989         Reviewed by Dan Bernstein.
990
991         https://bugs.webkit.org/show_bug.cgi?id=57975
992
993         The "More..." link for line clamping no longer shows up in Safari RSS. Fix the isLink() check
994         to just look at the style, so that it can find the InlineTextBox and not care that it's a child
995         of the link element and not the line box for the link element itself (since that line box got
996         culled).
997
998         * rendering/RenderFlexibleBox.cpp:
999         (WebCore::RenderFlexibleBox::applyLineClamp):
1000
1001 2011-04-06  Brady Eidson  <beidson@apple.com>
1002
1003         Reviewed by Anders Carlsson.
1004
1005         https://bugs.webkit.org/show_bug.cgi?id=57973 and https://bugs.webkit.org/show_bug.cgi?id=57973
1006         WK2 icon database should be able to get a CGImage of a specific size
1007
1008         * platform/graphics/BitmapImage.h:
1009         * platform/graphics/Image.h:
1010         (WebCore::Image::getFirstCGImageRefOfSize):
1011         
1012         * platform/graphics/cg/ImageCG.cpp:
1013         (WebCore::BitmapImage::getFirstCGImageRefOfSize): Walk the frames of the image until reaching the
1014           first frame of the requested size.
1015
1016 2011-04-06  Malcolm MacLeod  <malcolm.macleod@tshwanedje.com>
1017
1018         Reviewed by Kevin Ollivier.
1019
1020         [wx] Fix cursor handling so that we always call the chrome to set it.
1021         
1022         https://bugs.webkit.org/show_bug.cgi?id=57972
1023
1024         * platform/wx/WidgetWx.cpp:
1025         (WebCore::Widget::setCursor):
1026
1027 2011-04-06  David Hyatt  <hyatt@apple.com>
1028
1029         Reviewed by Dan Bernstein.
1030
1031         https://bugs.webkit.org/show_bug.cgi?id=41445
1032         
1033         Visited links painting with black background. Make sure that if the visited style has
1034         the initial background color (transparent) set that we just use the unvisited color.
1035
1036         Added fast/history/visited-link-background-color.html
1037
1038         * rendering/style/RenderStyle.cpp:
1039         (WebCore::RenderStyle::visitedDependentColor):
1040
1041 2011-04-06  Csaba Osztrogon√°c  <ossy@webkit.org>
1042
1043         Unreviewed Qt buildfix after r83079.
1044
1045         * WebCore.pro:
1046
1047 2011-04-06  Dean Jackson  <dino@apple.com>
1048
1049         Reviewed by Chris Marrin.
1050
1051         https://bugs.webkit.org/show_bug.cgi?id=56936
1052         Crash in ImplicitAnimation::~ImplicitAnimation
1053
1054         Make sure the style and start time waiting lists
1055         are cleared in the CompositeAnimation destructor. This
1056         way, no running transitions can be left in a state
1057         where they are destroyed as the AnimationControllerPrivate
1058         cleans up.
1059
1060         * page/animation/CompositeAnimation.cpp:
1061         (WebCore::CompositeAnimation::~CompositeAnimation):
1062
1063 2011-04-06  Robert Sesek  <rsesek@chromium.org>
1064
1065         Reviewed by Alexey Proskuryakov.
1066
1067         Move code duplicated between the WebKit/mac and WebKit2 down to WebCore because Chromium will need it too
1068         https://bugs.webkit.org/show_bug.cgi?id=54969
1069
1070         No change in behavior; no new tests.
1071
1072         * editing/TextIterator.cpp:
1073         (WebCore::TextIterator::locationAndLengthFromRange): New method from duplicated code in WebKits
1074         * editing/TextIterator.h:
1075         * page/Frame.cpp:
1076         (WebCore::Frame::rangeForPoint): New method from duplicated code in WebKits
1077
1078 2011-04-06  Leandro Gracia Gil  <leandrogracia@chromium.org>
1079
1080         Reviewed by Steve Block.
1081
1082         Factoring the creation of 'FunctionOnly' callbacks in JavaScriptCore.
1083         https://bugs.webkit.org/show_bug.cgi?id=57770
1084
1085         Create a template from an existing functionality in JSGeolocationCustom.cpp
1086         to be used by the custom bindings of both Geolocation and the Media Stream API.
1087         V8 version of this bug: https://bugs.webkit.org/show_bug.cgi?id=57760
1088
1089         No new tests. LayoutTests/fast/dom/Geolocation/argument-types.html
1090
1091         * Android.jscbindings.mk:
1092         * CMakeLists.txt:
1093         * GNUmakefile.am:
1094         * WebCore.gypi:
1095         * WebCore.pro:
1096         * WebCore.vcproj/WebCore.vcproj:
1097         * WebCore.xcodeproj/project.pbxproj:
1098         * bindings/js/CallbackFunction.cpp: Added.
1099         (WebCore::checkFunctionOnlyCallback):
1100         * bindings/js/CallbackFunction.h: Added.
1101         (WebCore::createFunctionOnlyCallback):
1102         * bindings/js/JSBindingsAllInOne.cpp:
1103         * bindings/js/JSGeolocationCustom.cpp:
1104         (WebCore::JSGeolocation::getCurrentPosition):
1105         (WebCore::JSGeolocation::watchPosition):
1106
1107 2011-04-06  Alexis Menard  <alexis.menard@openbossa.org>
1108
1109         Reviewed by Andreas Kling.
1110
1111         [Qt] Implement fullscreen playback for the GStreamer backend.
1112         https://bugs.webkit.org/show_bug.cgi?id=56826
1113
1114         Implement support for fullscreen playback when building the
1115         Qt port with the GStreamer backend (DEFINES+=USE_GSTREAMER=1).
1116         The implementation is done in FullScreenVideoQt alongside with
1117         the Qt Multimedia support.
1118
1119         No new tests because layout tests cover it. They are not yet activated
1120         but will be any time soon.
1121
1122         * platform/graphics/gstreamer/PlatformVideoWindowPrivate.h:
1123         * platform/graphics/gstreamer/PlatformVideoWindowQt.cpp:
1124         (FullScreenVideoWindow::FullScreenVideoWindow):
1125         (FullScreenVideoWindow::setVideoElement):
1126         (FullScreenVideoWindow::closeEvent):
1127         (FullScreenVideoWindow::keyPressEvent):
1128         (FullScreenVideoWindow::event):
1129         (FullScreenVideoWindow::showFullScreen):
1130         (FullScreenVideoWindow::hideCursor):
1131         (FullScreenVideoWindow::showCursor):
1132
1133 2011-04-06  Ryosuke Niwa  <rniwa@webkit.org>
1134
1135         Reviewed by Dimitri Glazkov.
1136
1137         Bundle lineLeftOffset and lineRightOffset as a class
1138         https://bugs.webkit.org/show_bug.cgi?id=57851
1139
1140         Added a new class LineOffsets that encapsulates lineLeftOffset and lineRightOffset.
1141         The patch makes clear that lineLeftOffset and lineRightOffset are never read individually
1142         and only the difference is used to compute the width.
1143
1144         * rendering/RenderBlock.h:
1145         * rendering/RenderBlockLineLayout.cpp:
1146         (WebCore::RenderBlock::skipLeadingWhitespace): Takes LineOffsets instead of two integers.
1147         (WebCore::LineOffsets::LineOffsets): Added.
1148         (WebCore::LineOffsets::width): Added.
1149         (WebCore::LineOffsets::setLeft): Added.
1150         (WebCore::LineOffsets::setRight): Added.
1151         (WebCore::RenderBlock::findNextLineBreak): Calls skipLeadingWhitespace and positionNewFloatOnLine.
1152         (WebCore::RenderBlock::positionNewFloatOnLine): Takes LineOffsets instead of two integers.
1153
1154 2011-04-06  David Hyatt  <hyatt@apple.com>
1155
1156         Reviewed by Dan Bernstein.
1157
1158         https://bugs.webkit.org/show_bug.cgi?id=57916
1159         
1160         Implement an optimization to the line box tree to cull out most of the intermediate
1161         line boxes that can occur between the root line box and the leaves of the tree (images
1162         and text).
1163
1164         RenderInlines now have a boolean member, m_alwaysCreateLineBoxes,
1165         that starts off as false. Only if it gets flipped to true will there be any line boxes
1166         created for that RenderInline.
1167         
1168         * page/FocusController.cpp:
1169         (WebCore::FocusController::advanceFocusDirectionally):
1170         Adjust the ordering of updateLayout calls to make sure rects aren't queried unless layout
1171         is up to date.
1172
1173         * page/SpatialNavigation.cpp:
1174         (WebCore::hasOffscreenRect):
1175         (WebCore::nodeRectInAbsoluteCoordinates):
1176         Add asserts in spatial navigation code to catch any future bad queries that might be made
1177         for rectangles without layout being up to date.
1178
1179         * platform/graphics/FloatRect.cpp:
1180         (WebCore::FloatRect::uniteIfNonZero):
1181         * platform/graphics/FloatRect.h:
1182         * platform/graphics/IntRect.cpp:
1183         (WebCore::IntRect::uniteIfNonZero):
1184         * platform/graphics/IntRect.h:
1185         Add a new unite function that is useful for the render tree to FloatRect and IntRect.  This
1186         version allows rect unites to happen if either width or height is nonzero.
1187
1188         * rendering/HitTestResult.cpp:
1189         (WebCore::HitTestResult::addNodeToRectBasedTestResult):
1190         Make sure rect-based hit testing properly adds in culled inline ancestors to the set of nodes
1191         if content inside those inlines is hit.
1192
1193         * rendering/InlineBox.h:
1194         (WebCore::InlineBox::logicalFrameRect):
1195         Fix a bug in this function for obtaining the logical frame rect of an inline box.
1196
1197         * rendering/InlineFlowBox.cpp:
1198         (WebCore::InlineFlowBox::addToLine):
1199         addToLine now also checks line gap in the line box tree optimization checks.
1200     
1201         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
1202         (WebCore::InlineFlowBox::computeOverflow):
1203         * rendering/InlineFlowBox.h:
1204         Rewritten to add the text box overflow to the text box itself.
1205
1206          * rendering/InlineTextBox.cpp:
1207         (WebCore::InlineTextBox::destroy):
1208         Destroy has been changed to call a helper function to remove and destroy the line boxes that
1209         is now called from one additional spot.
1210
1211         (WebCore::InlineTextBox::logicalOverflowRect):
1212         (WebCore::InlineTextBox::setLogicalOverflowRect):
1213         Text boxes now cache their own overflow in a global hash table.
1214
1215         (WebCore::InlineTextBox::baselinePosition):
1216         (WebCore::InlineTextBox::lineHeight):
1217         Changed to not assume that the parent line box's renderer is the RenderText's immediate
1218         parent, since intermediate line boxes may have been culled.
1219
1220         (WebCore::InlineTextBox::paint):
1221         Paint now properly checks only the text box overflow instead of the parent line box's overflow.
1222
1223         * rendering/InlineTextBox.h:
1224         (WebCore::InlineTextBox::logicalTopVisualOverflow):
1225         (WebCore::InlineTextBox::logicalBottomVisualOverflow):
1226         (WebCore::InlineTextBox::logicalLeftVisualOverflow):
1227         (WebCore::InlineTextBox::logicalRightVisualOverflow):
1228         New accessors to obtain overflow for inline text boxes.
1229
1230         * rendering/RenderBlock.cpp:
1231         (WebCore::RenderBlock::updateFirstLetter):
1232         updateFirstLetter now removes text boxes from the line box tree before it destroys them, since those
1233         text boxes may not have anything in between them and the block that contains the inline first letter
1234         container.
1235
1236         * rendering/RenderBlockLineLayout.cpp:
1237         (WebCore::RenderBlock::createLineBoxes):
1238         The culling optimization is done here.  Only if the RenderInline says that boxes are allowed will they
1239         be created.
1240
1241         (WebCore::RenderBlock::layoutInlineChildren):
1242         The state of the RenderInline is updated here, in case it is discovered that line boxes are now needed.
1243         This is done before any lines are built.
1244
1245         * rendering/RenderInline.cpp:
1246         (WebCore::RenderInline::RenderInline):
1247         The new m_alwaysCreateLineBoxes flag has been added to the constructor.
1248
1249         (WebCore::RenderInline::styleDidChange):
1250         An initial update of the m_alwaysCreateLineBoxes happens here for things that can be checked immediately
1251         (like having a layer, borders, padding, margins or backgrounds).  Some checks that depend on examining
1252         the RenderInline's parent (including first line styles) happen later in layoutInlineChildren.
1253
1254         (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
1255         The function called by layoutInlineChildren to check parent and child style differences (e.g., font,
1256         vertical alignment, line height, etc.).
1257
1258         (WebCore::RenderInline::absoluteRects):
1259         (WebCore::RenderInline::culledInlineAbsoluteRects):
1260         absoluteRects calls culledInlineAbsoluteRects when m_alwaysCreateLineBoxes is false.
1261
1262         (WebCore::RenderInline::absoluteQuads):
1263         (WebCore::RenderInline::culledInlineAbsoluteQuads):
1264         absoluteQuads calls culledInlineAbsoluteQuads when m_alwaysCreateLineBoxes is false.
1265
1266         (WebCore::RenderInline::offsetLeft):
1267         (WebCore::RenderInline::offsetTop):
1268         offsetLeft and offsetTop now check descendant renderers when m_alwaysCreateLineBoxes is false.
1269
1270         (WebCore::RenderInline::linesBoundingBox):
1271         (WebCore::RenderInline::culledInlineBoundingBox):
1272         lineBoundingBox calls culledInlineBoundingBox when m_alwaysCreateLineBoxes is false.
1273
1274         (WebCore::RenderInline::culledInlineFirstLineBox):
1275         (WebCore::RenderInline::culledInlineLastLineBox):
1276         Helpers that return the first and last line box descendants. Used by firstLineBoxIncludingCulling and
1277         lastLineBoxIncludingCulling (which are in turn called by offsetLeft and offsetTop).
1278
1279         (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
1280         (WebCore::RenderInline::linesVisualOverflowBoundingBox):
1281         linesVisualOverflowBoundingBox calls culledInlineVisualOverflowBoundingBox when m_alwaysCreateLineBoxes is false.
1282
1283         (WebCore::RenderInline::clippedOverflowRectForRepaint):
1284         The initial bailout check is now done using firstLineBoxIncludingCulling instead of just firstLineBox.
1285
1286         (WebCore::RenderInline::dirtyLineBoxes):
1287         dirtyLineBoxes now crawls into descendants to figure out which root lines to dirty when
1288         m_alwaysCreateLineBoxes is false.
1289
1290         (WebCore::RenderInline::createAndAppendInlineFlowBox):
1291         Clear the m_alwaysCreateLineBoxes if a box gets added anyway. This happens for leaf inline flows and also
1292         when line-box-contain is set to an unusual value.
1293
1294         (WebCore::RenderInline::addFocusRingRects):
1295         Used culledInlineAbsoluteRects in place of the line box walk when m_alwaysCreateLineBoxes is false.
1296
1297         * rendering/RenderInline.h:
1298         (WebCore::RenderInline::firstLineBoxIncludingCulling):
1299         (WebCore::RenderInline::lastLineBoxIncludingCulling):
1300         Helpers used in a few places (like offsetLeft and offsetTop), mostly in places where the existence of a box
1301         is all that needs checking.
1302
1303         (WebCore::RenderInline::alwaysCreateLineBoxes):
1304         (WebCore::RenderInline::setAlwaysCreateLineBoxes):
1305         Functions for getting and setting the m_alwaysCreateLineBoxes flag.
1306
1307         * rendering/RenderLineBoxList.cpp:
1308         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
1309         Modified to use firstLineBoxIncludingCulling and lastLineBoxIncludingCulling to ensure the right set of
1310         lines get dirtied.
1311
1312         * rendering/RenderText.cpp:
1313         (WebCore::RenderText::removeAndDestroyTextBoxes):
1314         New helper invoked by destroy and also from updateFirstLetter.
1315
1316         (WebCore::RenderText::destroy):
1317         Changed to call removeAndDestroyTextBoxes.
1318
1319         (WebCore::RenderText::absoluteRects):
1320         Fixed to be properly physical instead of logical.
1321
1322         (WebCore::RenderText::linesVisualOverflowBoundingBox):
1323         New implementation for RenderText that gives the bounding box of the text boxes including overflow from
1324         shadows, glyphs, text-stroke, etc.  Used by RenderInline::culledInlineVisualOverflowBoundingBox.
1325
1326         * rendering/RenderText.h:
1327         * rendering/svg/RenderSVGInline.cpp:
1328         (WebCore::RenderSVGInline::RenderSVGInline):
1329         RenderSVGInline always sets m_alwaysCreateLineBoxes to true so that SVG is unaffected by this optimization.
1330
1331         * rendering/svg/SVGRootInlineBox.cpp:
1332         (WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes):
1333         (WebCore::SVGRootInlineBox::layoutChildBoxes):
1334         Move the isInlineFlowBox asserts to after the generated content skips, since the generated content boxes are
1335         now InlineTextBoxes (the enclosing InlineFlowBoxes got culled).
1336
1337 2011-04-05  Enrica Casucci  <enrica@apple.com>
1338
1339         Reviewed by Darin Adler.
1340
1341         REGRESSION: Drag & Drop Gmail Attachments doesn't work.
1342         https://bugs.webkit.org/show_bug.cgi?id=57909
1343         <rdar://problem/9103220>
1344
1345         In WebKit2 we cannot rely on the value returned by platformData() that
1346         on Mac returns an NSDraggingInfo object. This is available only in the UI
1347         process. Therefore we should use m_pasteboard instead.
1348         We cannot change what platformData() returns on Mac, since there are
1349         delegate methods that receive a NSDraggingInfo object (only in WebKit).
1350         
1351         * platform/DragData.h:
1352         (WebCore::DragData::pasteboard): Added.
1353         * platform/mac/ClipboardMac.mm:
1354         (WebCore::Clipboard::create): Changed to use pasteboard() instead of platformData().
1355         * platform/mac/DragDataMac.mm:
1356         (WebCore::DragData::asColor): Replaced references to m_platformData with m_pasteboard.
1357         (WebCore::DragData::asURL): Same as above.
1358
1359 2011-04-06  Benjamin Poulain  <benjamin.poulain@nokia.com>
1360
1361         Reviewed by Darin Adler.
1362
1363         ClipboardWin has unused variables "ExceptionCode ec"
1364         https://bugs.webkit.org/show_bug.cgi?id=57952
1365
1366         Remove the unused variable.
1367
1368         * platform/win/ClipboardWin.cpp:
1369         (WebCore::ClipboardWin::declareAndWriteDragImage):
1370         (WebCore::ClipboardWin::writePlainText):
1371
1372 2011-04-06  Ryosuke Niwa  <rniwa@webkit.org>
1373
1374         Reviewed by Dimitri Glazkov.
1375
1376         Split getBorderPaddingMargin into two functions
1377         https://bugs.webkit.org/show_bug.cgi?id=57947
1378
1379         * rendering/RenderBlockLineLayout.cpp:
1380         (WebCore::borderPaddingMarginStart): Extracted from getBorderPaddingMargin.
1381         (WebCore::borderPaddingMarginEnd): Ditto.
1382         (WebCore::inlineLogicalWidth): Calls borderPaddingMarginStart and borderPaddingMarginEnd.
1383         (WebCore::RenderBlock::findNextLineBreak): Ditto.
1384
1385 2011-04-06  MORITA Hajime  <morrita@google.com>
1386
1387         Reviewed by Dimitri Glazkov.
1388
1389         [Refactoring] <progress> should not have manual layout code.
1390         https://bugs.webkit.org/show_bug.cgi?id=57801
1391
1392         - Simplified RenderProgress, removing its custom layout code
1393         - Introducing ProgressValueElement and ProgressBarElement, replacing
1394           ProgressBarValueElement. 
1395         
1396         Now the structure is almost identical to <meter>, 
1397         other than:
1398         - RenderProgress has animated painting, thus manages its own timer.
1399         - Both ProgressValueElement and ProgressBarElement has pseudo classes
1400           which don't changes during its lifetime.
1401        
1402         * Android.mk:
1403         * CMakeLists.txt:
1404         * GNUmakefile.am:
1405         * WebCore.gypi:
1406         * WebCore.pro:
1407         * WebCore.vcproj/WebCore.vcproj:
1408         * WebCore.xcodeproj/project.pbxproj:
1409         * css/html.css:
1410         (progress):
1411         (progress::-webkit-progress-bar):
1412         (progress::-webkit-progress-value):
1413         * html/HTMLProgressElement.cpp:
1414         (WebCore::HTMLProgressElement::~HTMLProgressElement):
1415         (WebCore::HTMLProgressElement::create):
1416         (WebCore::HTMLProgressElement::attach):
1417         (WebCore::HTMLProgressElement::didElementStateChange):
1418         (WebCore::HTMLProgressElement::createShadowSubtree):
1419         * html/HTMLProgressElement.h:
1420         * html/shadow/ProgressShadowElement.cpp: Copied from Source/WebCore/html/shadow/ProgressBarValueElement.h.
1421         (WebCore::ProgressShadowElement::ProgressShadowElement):
1422         (WebCore::ProgressShadowElement::progressElement):
1423         (WebCore::ProgressShadowElement::rendererIsNeeded):
1424         (WebCore::ProgressBarElement::shadowPseudoId):
1425         (WebCore::ProgressValueElement::shadowPseudoId):
1426         (WebCore::ProgressValueElement::setWidthPercentage):
1427         * html/shadow/ProgressShadowElement.h: Renamed from Source/WebCore/html/shadow/ProgressBarValueElement.h.
1428         (WebCore::ProgressBarElement::ProgressBarElement):
1429         (WebCore::ProgressBarElement::create):
1430         (WebCore::ProgressValueElement::ProgressValueElement):
1431         (WebCore::ProgressValueElement::create):
1432         * rendering/RenderProgress.cpp:
1433         (WebCore::RenderProgress::RenderProgress):
1434         (WebCore::RenderProgress::updateFromElement):
1435         (WebCore::RenderProgress::animationTimerFired):
1436         * rendering/RenderProgress.h:
1437         (WebCore::RenderProgress::requiresForcedStyleRecalcPropagation):
1438         (WebCore::RenderProgress::canHaveChildren):
1439
1440 2011-04-06  Mario Sanchez Prada  <msanchez@igalia.com>
1441
1442         Reviewed by Chris Fleizach.
1443
1444         [GTK] Do not reference AccessibilityRenderObject from platform dependent code
1445         https://bugs.webkit.org/show_bug.cgi?id=57955
1446
1447         Do not reference AccessibilityRenderObject from platform specific code
1448
1449         Added new virtual functions to AccessibilityObject.h and removed
1450         explicit references to AccessibilityRenderObject from GTK code.
1451
1452         * accessibility/AccessibilityObject.h:
1453         (WebCore::AccessibilityObject::renderer): New virtual method,
1454         returning 0 by default. Overriden by AccessibilityRenderObject.
1455         (WebCore::AccessibilityObject::correspondingLabelForControlElement):
1456         New virtual method, returning 0 by default. It complements the
1457         already present method correspondingControlForLabelElement().
1458
1459         * accessibility/AccessibilityRenderObject.h:
1460         (WebCore::AccessibilityRenderObject::renderer): Made virtual.
1461
1462         * accessibility/gtk/AXObjectCacheAtk.cpp:
1463         (WebCore::emitTextChanged): Reference  AccessibilityObject,
1464         instead of AccessibilityRenderObject.
1465         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
1466         Ditto.
1467
1468         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
1469         (webkit_accessible_get_name): Do not reference
1470         AccessibilityRenderObject.
1471         (webkit_accessible_get_description): Ditto.
1472         (setAtkRelationSetFromCoreObject): Ditto.
1473         (optionFromList): Ditto.
1474         (optionFromSelection): Ditto.
1475         (webkit_accessible_selection_clear_selection): Ditto.
1476         (webkit_accessible_selection_get_selection_count): Ditto.
1477         (webkit_accessible_selection_select_all_selection): Ditto.
1478         (textForObject): Ditto.
1479         (webkit_accessible_text_get_text): Ditto.
1480         (getPangoLayoutForAtk): Ditto.
1481         (webkit_accessible_text_get_caret_offset): Ditto.
1482         (baselinePositionForRenderObject): Ditto.
1483         (getAttributeSetForAccessibilityObject): Ditto.
1484         (accessibilityObjectLength): Ditto.
1485         (getSelectionOffsetsForObject): Ditto.
1486         (webkit_accessible_text_set_selection): Ditto.
1487         (webkit_accessible_text_set_caret_offset): Ditto.
1488         (webkit_accessible_table_get_caption): Ditto.
1489         (getInterfaceMaskFromObject): Ditto.
1490
1491         * accessibility/gtk/WebKitAccessibleHyperlink.cpp:
1492         (getRangeLengthForObject): Ditto.
1493
1494         Removed unused renderer() method from AccessibilityMenuList.
1495
1496         * accessibility/AccessibilityMenuList.h: Removed unused method.
1497         * accessibility/AccessibilityMenuList.cpp: Removed unused method.
1498
1499 2011-04-06  Alexander Pavlov  <apavlov@chromium.org>
1500
1501         Reviewed by Pavel Feldman.
1502
1503         Web Inspector: Javascipt warning link expand and overlap with icons in js console
1504         https://bugs.webkit.org/show_bug.cgi?id=57939
1505
1506         * inspector/front-end/inspector.js:
1507         (WebInspector.linkifyURLAsNode):
1508
1509 2011-04-06  Alexander Pavlov  <apavlov@chromium.org>
1510
1511         Reviewed by Pavel Feldman.
1512
1513         Web Inspector: Beautify parameter names in Inspector.json (CSS domain)
1514         https://bugs.webkit.org/show_bug.cgi?id=57931
1515
1516         * inspector/Inspector.json:
1517
1518 2011-04-06  Jia Pu  <jpu@apple.com>
1519
1520         Reviewed by Darin Adler.
1521
1522         [Mac] WebCore need to notify AppKit spell checker after user has modified autocorrected text.
1523         https://bugs.webkit.org/show_bug.cgi?id=57665
1524         <rdar://problem/7350477>
1525
1526         We need to track how user modified an autocorrected word. If he changed it back to original
1527         text, we want to record AutocorrectionReverted response. And if he changed it to something
1528         else, we want to record AutocorrectionEdited response.
1529
1530         To achieve this, we need to distringuish between text replacement caused by autocorrection
1531         from that due to other causes, such as reversion, text substitution, etc. So we added a new
1532         marker type "Autocorrected". We also need to be able to check for correction, even when we
1533         don't intend to actually carry out replacement. For this, we introduced a new TextCheckingOption
1534         value, "CheckForCorrection".
1535
1536         We also added DocumentMarkerController::markersInRange() to retrieve a vector of markers in
1537         specified range, and of specified type.
1538
1539         * dom/DocumentMarker.h:
1540         * dom/DocumentMarkerController.cpp:
1541         (WebCore::DocumentMarkerController::markersInRange):
1542         (WebCore::DocumentMarkerController::hasMarkers):
1543         * dom/DocumentMarkerController.h:
1544         * editing/Editor.cpp:
1545         (WebCore::markerTypesForAutocorrection):
1546         (WebCore::markersHaveIdenticalDescription):
1547         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
1548         (WebCore::Editor::recordSpellcheckerResponseForModifiedCorrection):
1549         (WebCore::Editor::changeBackToReplacedString):
1550         (WebCore::Editor::markMisspellingsAndBadGrammar):
1551         (WebCore::Editor::applyCorrectionPanelInfo):
1552         (WebCore::Editor::unappliedSpellCorrection):
1553         (WebCore::Editor::textCheckingTypeMaskFor):
1554         * editing/Editor.h:
1555         * editing/SpellingCorrectionCommand.cpp:
1556         (WebCore::SpellingCorrectionCommand::doApply):
1557
1558 2011-04-06  Sheriff Bot  <webkit.review.bot@gmail.com>
1559
1560         Unreviewed, rolling out r83045.
1561         http://trac.webkit.org/changeset/83045
1562         https://bugs.webkit.org/show_bug.cgi?id=57953
1563
1564         Broke win layout tests (Requested by podivilov on #webkit).
1565
1566         * GNUmakefile.am:
1567         * inspector/front-end/DebuggerPresentationModel.js:
1568         (WebInspector.DebuggerPresentationModel.prototype._addScript):
1569         (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
1570
1571 2011-04-06  Ryosuke Niwa  <rniwa@webkit.org>
1572
1573         Moved the declaration of positionNewFloatOnLine in RenderBlock.h after r83042.
1574
1575         * rendering/RenderBlock.h:
1576
1577 2011-03-27  Diego Gonzalez  <diegohcg@webkit.org>
1578
1579         Reviewed by Kenneth Rohde Christiansen.
1580
1581         [Qt] Re-draw the <input> fields for Qt Mobile Theme to do not override elements already styled.
1582         https://bugs.webkit.org/show_bug.cgi?id=57007
1583
1584         * CodeGenerators.pri:
1585         * css/themeQtMobile.css: Removed.
1586         * platform/qt/QtMobileWebStyle.cpp:
1587         (drawRectangularControlBackground):
1588         (QtMobileWebStyle::drawPrimitive):
1589         (QtMobileWebStyle::drawComplexControl):
1590         * platform/qt/QtMobileWebStyle.h:
1591         * platform/qt/RenderThemeQt.cpp:
1592         (WebCore::RenderThemeQt::isControlStyled):
1593         (WebCore::RenderThemeQt::paintTextField):
1594
1595 2011-04-06  Jia Pu  <jpu@apple.com>
1596
1597         Reviewed by Darin Adler.
1598
1599         [Mac] When autocorrection occurs without showing correction panel, WebCore need to post accessibility notification.
1600         https://bugs.webkit.org/show_bug.cgi?id=57800
1601         <rdar://problem/9218223>
1602
1603         Defined a new accessibility notification type, AXAutocorrectionOccured. Editor::markAllMisspellingsAndBadGrammarInRanges()
1604         now posts said notification when any autocorrection or text replacement (e.g. replacing "(c)" with copyright mark) takes place.
1605
1606         * accessibility/AXObjectCache.h:
1607         * accessibility/chromium/AXObjectCacheChromium.cpp:
1608         (WebCore::AXObjectCache::postPlatformNotification):
1609         * accessibility/mac/AXObjectCacheMac.mm:
1610         (WebCore::AXObjectCache::postPlatformNotification):
1611         * editing/Editor.cpp:
1612         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
1613
1614 2011-04-06  Martin Robinson  <mrobinson@igalia.com>
1615
1616         Build fix for debug Cairo builds.
1617
1618         * platform/graphics/cairo/PlatformContextCairo.cpp:
1619         (WebCore::PlatformContextCairo::pushImageMask): Update the reference to m_maskInformation.
1620
1621 2011-04-06  Diego Gonzalez  <diegohcg@webkit.org>
1622
1623         Reviewed by Antonio Gomes.
1624
1625         [Qt] Style fix for QtMobileWebStyle.h
1626         https://bugs.webkit.org/show_bug.cgi?id=57708
1627
1628         * platform/qt/QtMobileWebStyle.h:
1629
1630 2011-04-06  Andras Becsi  <abecsi@webkit.org>
1631
1632         Reviewed by Darin Adler.
1633
1634         Invalid color #{predefined colorName} is accepted by the CSS parser.
1635         https://bugs.webkit.org/show_bug.cgi?id=15360
1636
1637         Test: fast/css/invalid-predefined-color.html
1638
1639         * css/CSSGrammar.y: Remove superfluous hexcolor production.
1640         * css/tokenizer.flex: A hexadecimal number should consist of [a-fA-F0-9] values ({h}).
1641
1642 2011-03-30  Pavel Podivilov  <podivilov@chromium.org>
1643
1644         Reviewed by Pavel Feldman.
1645
1646         Web Inspector: add test for script formatter worker.
1647         https://bugs.webkit.org/show_bug.cgi?id=57447
1648
1649         Test: inspector/debugger/script-formatter.html
1650
1651         * GNUmakefile.am:
1652         * inspector/front-end/DebuggerPresentationModel.js:
1653         (WebInspector.DebuggerPresentationModel):
1654         (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
1655
1656 2011-04-06  Martin Robinson  <mrobinson@igalia.com>
1657
1658         Reviewed by Xan Lopez.
1659
1660         [Cairo] Hide the details of image masking in PlatformContextCairo
1661         https://bugs.webkit.org/show_bug.cgi?id=57878
1662
1663         No new tests. This is just a refactor.
1664
1665         * platform/graphics/GraphicsContext.h:
1666         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1667         (WebCore::GraphicsContext::savePlatformState): Call into PlatformContextCairo now to
1668         do the actual cairo_save. Remove information about image masking.
1669         (WebCore::GraphicsContext::restorePlatformState): Call into PlatformContextCairo now to
1670         do the actual cairo_restore. Remove information about image masking.
1671         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
1672         * platform/graphics/cairo/ImageBufferCairo.cpp:
1673         (WebCore::ImageBuffer::clip): Use PlatformContextCairo here now.
1674         * platform/graphics/cairo/PlatformContextCairo.cpp:
1675         (WebCore::PlatformContextCairo::restore): Added.
1676         (WebCore::PlatformContextCairo::save): Added.
1677         (WebCore::PlatformContextCairo::pushImageMask): Added.
1678         * platform/graphics/cairo/PlatformContextCairo.h:
1679         (WebCore::ImageMaskInformation::update): Moved from GraphicsContextPlatformPrivateCairo.h.
1680         (WebCore::ImageMaskInformation::isValid): Ditto.
1681         (WebCore::ImageMaskInformation::maskSurface): Ditto.
1682         (WebCore::ImageMaskInformation::maskRect): Ditto.
1683
1684 2011-04-02  Diego Gonzalez  <diegohcg@webkit.org>
1685
1686         Reviewed by Csaba Osztrogon√°c.
1687
1688         [Qt] Radio buttons are showing wrong with mobile theme
1689         https://bugs.webkit.org/show_bug.cgi?id=57706
1690
1691         * platform/qt/QtMobileWebStyle.cpp:
1692         (QtMobileWebStyle::drawRadio):
1693
1694 2011-04-06  Ryosuke Niwa  <rniwa@webkit.org>
1695
1696         Reviewed by Eric Seidel.
1697
1698         Move RenderBlock::positionNewFloatOnLine to RenderBlockLineLayout.cpp
1699         https://bugs.webkit.org/show_bug.cgi?id=57943
1700
1701         * rendering/RenderBlock.cpp: Removed positionNewFloatOnLine.
1702         * rendering/RenderBlockLineLayout.cpp:
1703         (WebCore::RenderBlock::positionNewFloatOnLine): Moved from RenderBlock.cpp
1704
1705 2011-04-05  Diego Gonzalez  <diegohcg@webkit.org>
1706
1707         Buildfix after r82125.
1708
1709         [Qt] QtWebKit will not compile with QT_ASCII_CAST_WARNINGS enabled
1710         https://bugs.webkit.org/show_bug.cgi?id=57087
1711
1712         * platform/qt/QtMobileWebStyle.cpp:
1713         (QtMobileWebStyle::findChecker):
1714         (QtMobileWebStyle::findRadio):
1715         (QtMobileWebStyle::findComboButton):
1716
1717 2011-04-06  Pavel Podivilov  <podivilov@chromium.org>
1718
1719         Reviewed by Yury Semikhatsky.
1720
1721         Web Inspector: inline script imports in ScriptFormatterWorker.js so it works in Safari release.
1722         https://bugs.webkit.org/show_bug.cgi?id=57641
1723
1724         * WebCore.xcodeproj/project.pbxproj:
1725         * gyp/streamline-inspector-source.sh:
1726         * inspector/combine-javascript-resources.pl: Renamed from Source/WebCore/combine-javascript-resources.
1727         * inspector/inline-javascript-imports.py: Added.
1728
1729 2011-04-06  Ryosuke Niwa  <rniwa@webkit.org>
1730
1731         Reviewed by Eric Seidel.
1732
1733         REGRESSION (r46914, r48764): When typing in Mail, line wrapping frequently occurs in the middle of words
1734         https://bugs.webkit.org/show_bug.cgi?id=57872
1735
1736         r46914 initially introduced a regression by replacing calls to styleAtPosition by editingStyleAtPosition
1737         because editingStyleAtPosition did not avoid tab span to obtain the computed style unlike styleAtPosition.
1738
1739         r46914 also introduced a regression by cloning hierarchy under new block at the insertion position without
1740         avoiding the tab span.
1741
1742         Fixed the both regressions by avoiding tab spans when computing the editing style and when cloning hierarchy.
1743
1744         Test: editing/inserting/insert-paragraph-separator-tab-span.html
1745
1746         * editing/EditingStyle.cpp:
1747         (WebCore::EditingStyle::init): Always avoid a tab span when computing the editing style.
1748         * editing/InsertParagraphSeparatorCommand.cpp:
1749         (WebCore::InsertParagraphSeparatorCommand::doApply): Avoid cloning tab spans and inserting a paragraph
1750         separator into a paragraph separator.
1751
1752 2011-04-06  Levi Weintraub  <leviw@chromium.org>
1753
1754         Reviewed by Ryosuke Niwa.
1755
1756         Add member functions for determining line/paragraph separation to InlineIterator
1757         https://bugs.webkit.org/show_bug.cgi?id=57938
1758
1759         Adding atTextParagraphSeparator and atParagraphSeparator inline convenience functions to
1760         InlineIterator, where it makes far more sense for them to be. Also moving
1761         shouldPreserveNewline to RenderObject and renaming it preservesNewline.
1762
1763         No new tests as this provides no new functionality.
1764
1765         * rendering/InlineIterator.h:
1766         (WebCore::InlineIterator::atTextParagraphSeparator):
1767         (WebCore::InlineIterator::atParagraphSeparator):
1768         * rendering/RenderBlockLineLayout.cpp:
1769         (WebCore::RenderBlock::requiresLineBox):
1770         (WebCore::RenderBlock::findNextLineBreak):
1771         * rendering/RenderObject.h:
1772         (WebCore::RenderObject::preservesNewline):
1773
1774 2011-04-05  Alexander Pavlov  <apavlov@chromium.org>
1775
1776         Reviewed by Pavel Feldman.
1777
1778         Web Inspector: Range insertNode function does not update content in the inspector
1779         https://bugs.webkit.org/show_bug.cgi?id=57829
1780
1781         * inspector/InspectorDOMAgent.cpp:
1782         (WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
1783         (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
1784
1785 2011-04-06  Alejandro G. Castro  <alex@igalia.com>
1786
1787         Fix GTK3 compilation after r82962.
1788
1789         * platform/gtk/RenderThemeGtk3.cpp:
1790         (WebCore::paintToggle):
1791         (WebCore::renderButton):
1792         (WebCore::RenderThemeGtk::paintMenuList):
1793         (WebCore::RenderThemeGtk::paintTextField):
1794         (WebCore::RenderThemeGtk::paintSliderTrack):
1795         (WebCore::RenderThemeGtk::paintSliderThumb):
1796         (WebCore::RenderThemeGtk::paintProgressBar):
1797         (WebCore::paintSpinArrowButton):
1798         * platform/gtk/ScrollbarThemeGtk3.cpp:
1799         (WebCore::ScrollbarThemeGtk::paintTrackBackground):
1800         (WebCore::ScrollbarThemeGtk::paintScrollbarBackground):
1801         (WebCore::ScrollbarThemeGtk::paintThumb):
1802         (WebCore::ScrollbarThemeGtk::paintButton):
1803
1804 2011-04-06  Andrey Kosyakov  <caseq@chromium.org>
1805
1806         Reviewed by Yury Semikhatsky.
1807
1808         Web Inspector: [Extensions API] remove inspectedPage.* events
1809         https://bugs.webkit.org/show_bug.cgi?id=57763
1810
1811         - Removed webInspector.inspectedPage.* events
1812         - moved onNavigated to webInspector.resources
1813
1814         * inspector/front-end/ExtensionAPI.js:
1815         (WebInspector.injectedExtensionAPI):
1816         (WebInspector.injectedExtensionAPI.InspectedWindow):
1817         * inspector/front-end/ExtensionAPISchema.json:
1818         * inspector/front-end/ExtensionServer.js:
1819         (WebInspector.ExtensionServer.prototype.notifyInspectedURLChanged):
1820         * inspector/front-end/inspector.js:
1821         (WebInspector.domContentEventFired):
1822         (WebInspector.loadEventFired):
1823         (WebInspector.inspectedURLChanged):
1824
1825 2011-04-06  Joseph Pecoraro  <joepeck@webkit.org>
1826
1827         Reviewed by Antti Koivisto.
1828
1829         Add <head> to the simpleUserAgentStyleSheet
1830         https://bugs.webkit.org/show_bug.cgi?id=57915
1831
1832         * css/CSSStyleSelector.cpp:
1833         (WebCore::elementCanUseSimpleDefaultStyle): add head to the
1834         simple stylesheet, display:none.
1835
1836 2011-04-05  Mikhail Naganov  <mnaganov@chromium.org>
1837
1838         Reviewed by Pavel Feldman.
1839
1840         Web Inspector: [Chromium] Add layout test for Summary view of detailed heap snapshots.
1841         https://bugs.webkit.org/show_bug.cgi?id=57856
1842
1843         Test: inspector/profiler/detailed-heapshots-summary.html
1844
1845         * inspector/front-end/DataGrid.js:
1846         (WebInspector.DataGrid):
1847         * inspector/front-end/DetailedHeapshotGridNodes.js:
1848         (WebInspector.HeapSnapshotGridNode.prototype._populate.doPopulate):
1849         (WebInspector.HeapSnapshotGridNode.prototype._populate):
1850         (WebInspector.HeapSnapshotGridNode.prototype.populateChildren):
1851         (WebInspector.HeapSnapshotGridNode.prototype.sort.doSort):
1852         (WebInspector.HeapSnapshotGridNode.prototype.sort):
1853         (WebInspector.HeapSnapshotDiffNode.prototype.populateChildren):
1854         * inspector/front-end/DetailedHeapshotView.js:
1855         (WebInspector.HeapSnapshotSortableDataGrid.prototype.sortingChanged):
1856         * inspector/front-end/ProfilesPanel.js:
1857         (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot.doParse):
1858         (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot):
1859
1860 2011-04-06  Anders Bakken  <agbakken@gmail.com>
1861
1862         Reviewed by David Levin.
1863
1864         [Qt] SmartReplaceQt.cpp has coding-style errors
1865         https://bugs.webkit.org/show_bug.cgi?id=40261
1866
1867         This patch does not require new test cases.
1868
1869         * editing/qt/SmartReplaceQt.cpp:
1870         (WebCore::isCharacterSmartReplaceExempt):
1871
1872 2011-04-06  Naoki Takano  <takano.naoki@gmail.com>
1873
1874         Reviewed by Ryosuke Niwa.
1875
1876         REGRESSION(r81328): Null pointer crash in canAppendNewLineFeed when selection isn't inside an editable element
1877         https://bugs.webkit.org/show_bug.cgi?id=57755
1878
1879         Test: editing/execCommand/insert-line-break-onload.html
1880
1881         * editing/TypingCommand.cpp:
1882         (WebCore::canAppendNewLineFeed): Added null pointer check for rootEditableElement().
1883
1884 2011-04-05  Antti Koivisto  <antti@apple.com>
1885
1886         Reviewed by Cameron Zwarich.
1887
1888         Avoid calling currentTime() from FrameView::adjustedDeferredRepaintDelay() when repaints are deferred
1889         https://bugs.webkit.org/show_bug.cgi?id=57914
1890
1891         Don't call adjustedDeferredRepaintDelay unnecessarily.
1892
1893         * page/FrameView.cpp:
1894         (WebCore::FrameView::repaintContentRectangle):
1895         (WebCore::FrameView::adjustedDeferredRepaintDelay):
1896
1897 2011-04-05  Steve VanDeBogart  <vandebo@chromium.org>
1898
1899         Reviewed by David Levin.
1900
1901         Update call to SkAdvancedTypefaceMetrics to new API.
1902         https://bugs.webkit.org/show_bug.cgi?id=57887
1903
1904         * platform/graphics/chromium/FontPlatformDataLinux.cpp:
1905         (WebCore::FontPlatformData::emSizeInFontUnits):
1906
1907 2011-04-05  Alexey Proskuryakov  <ap@apple.com>
1908
1909         Reviewed by Darin Adler.
1910
1911         Rename event dispatching functions after form event removal
1912         https://bugs.webkit.org/show_bug.cgi?id=57908
1913
1914         * dom/InputElement.cpp:
1915         (WebCore::InputElement::setValueFromRenderer):
1916         * dom/Node.cpp:
1917         (WebCore::Node::dispatchChangeEvent):
1918         (WebCore::Node::dispatchInputEvent):
1919         (WebCore::Node::defaultEventHandler):
1920         * dom/Node.h:
1921         * html/HTMLFormControlElement.cpp:
1922         (WebCore::HTMLFormControlElement::dispatchFormControlChangeEvent):
1923         (WebCore::HTMLFormControlElement::dispatchFormControlInputEvent):
1924         (WebCore::HTMLTextFormControlElement::dispatchFormControlChangeEvent):
1925         Renamed "events" to "event", since there is only one event to dispatch now.
1926
1927 2011-04-05  Anders Bakken  <agbakken@gmail.com>
1928
1929         Reviewed by David Levin.
1930
1931         [Qt] DragControllerQt.cpp has coding-style errors
1932         https://bugs.webkit.org/show_bug.cgi?id=40258
1933
1934         This patch does not require new test cases.
1935
1936         * page/qt/DragControllerQt.cpp:
1937         (WebCore::DragController::dragOperation):
1938
1939 2011-04-05  Steve VanDeBogart  <vandebo@chromium.org>
1940
1941         Reviewed by David Levin.
1942
1943         Update deprecated include: platform_canvas_win.h to platform_canvas.h.
1944         https://bugs.webkit.org/show_bug.cgi?id=57896
1945
1946         * platform/graphics/chromium/FontChromiumWin.cpp:
1947
1948 2011-04-05  Darin Adler  <darin@apple.com>
1949
1950         Try to fix Leopard bots.
1951
1952         * platform/mac/HTMLConverter.mm: Fix #if back the way Alexey seems
1953         to have intended it.
1954
1955 2011-04-05  Darin Adler  <darin@apple.com>
1956
1957         Try to fix Leopard bots.
1958
1959         * platform/mac/HTMLConverter.mm: Move declarations of new functions
1960         inside the appropriate #if.
1961
1962 2011-04-05  Adrienne Walker  <enne@google.com>
1963
1964         Reviewed by Tony Chang.
1965
1966         Correctly set color when using skia's fillRoundedRect.
1967         https://bugs.webkit.org/show_bug.cgi?id=57907
1968
1969         * platform/graphics/skia/GraphicsContextSkia.cpp:
1970         (WebCore::GraphicsContext::fillRoundedRect):
1971
1972 2011-04-05  Alexey Proskuryakov  <ap@apple.com>
1973
1974         Reviewed by Darin Adler.
1975
1976         Move attributedStringFromRange down to WebCore
1977         https://bugs.webkit.org/show_bug.cgi?id=57905
1978
1979         No change in behavior, so no new tests.
1980
1981         Also tweaked HTMLConverter to not use methods defined in WebKit.
1982
1983         * WebCore.exp.in:
1984         * WebCore.xcodeproj/project.pbxproj:
1985         * platform/mac/HTMLConverter.h:
1986         * platform/mac/HTMLConverter.mm:
1987         (-[WebHTMLConverter _newTabForElement:]):
1988         (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
1989         (+[WebHTMLConverter editingAttributedStringFromRange:]):
1990         (fileWrapperForURL):
1991         (fileWrapperForElement):
1992         * platform/mac/PasteboardMac.mm:
1993         (WebCore::Pasteboard::writeSelection):
1994         * platform/mac/WebNSAttributedStringExtras.h: Copied from Source/WebKit/mac/Misc/WebNSAttributedStringExtras.h.
1995         * platform/mac/WebNSAttributedStringExtras.mm: Copied from Source/WebKit/mac/Misc/WebNSAttributedStringExtras.mm.
1996         (WebCore::attributedStringByStrippingAttachmentCharacters):
1997
1998 2011-04-05  Simon Fraser  <simon.fraser@apple.com>
1999
2000         Reviewed by Darin Adler.
2001
2002         Rename variables in border drawing code for readability
2003         https://bugs.webkit.org/show_bug.cgi?id=57894
2004
2005         * rendering/RenderObject.cpp:
2006         (WebCore::RenderObject::drawLineForBoxSide):
2007         (WebCore::RenderObject::drawBoxSideFromPath):
2008         (WebCore::RenderObject::drawArcForBoxSide):
2009
2010 2011-04-05  Antti Koivisto  <antti@apple.com>
2011
2012         Reviewed by Darin Adler.
2013
2014         Defer repaints during style recalc
2015         https://bugs.webkit.org/show_bug.cgi?id=57886
2016
2017         This reduces the need to do (often expensive) platform surface invalidation.
2018         We already do this during layout but style recalculation may trigger
2019         invalidation as well.
2020     
2021         * dom/Document.cpp:
2022         (WebCore::Document::recalcStyle):
2023
2024 2011-04-05  Jer Noble  <jer.noble@apple.com>
2025
2026         Reviewed by Darin Adler.
2027
2028         HTML5 Player Has no Fullscreen Mode
2029         https://bugs.webkit.org/show_bug.cgi?id=57795
2030
2031         * html/HTMLVideoElement.cpp:
2032         (WebCore::HTMLVideoElement::supportsFullscreen): Call the new ChromeClient API
2033             supportsFullScreenForElement() before the old supportsFullScreenForNode() API.
2034
2035 2011-04-05  Vsevolod Vlasov  <vsevik@chromium.org>
2036
2037         Reviewed by Pavel Feldman.
2038
2039         Web Inspector: fix data url's status and timing the network panel.
2040         https://bugs.webkit.org/show_bug.cgi?id=53066
2041
2042         Added data url support for status of network resources.
2043
2044         * English.lproj/localizedStrings.js:
2045         * inspector/front-end/NetworkPanel.js:
2046         (WebInspector.NetworkDataGridNode.prototype._refreshStatusCell):
2047         * inspector/front-end/Resource.js:
2048         (WebInspector.Resource.prototype.isDataURL):
2049
2050 2011-04-04  Vitaly Repeshko  <vitalyr@chromium.org>
2051
2052         Reviewed by Adam Barth.
2053
2054         [V8] Keep dirty primitive CSS values alive.
2055         https://bugs.webkit.org/show_bug.cgi?id=57810
2056
2057         * bindings/v8/V8GCController.cpp:
2058         (WebCore::GrouperVisitor::visitDOMWrapper):
2059
2060 2011-04-05  Simon Fraser  <simon.fraser@apple.com>
2061
2062         Reviewed by Adele Peterson.
2063
2064         Add a fast path for simple color backgrounds
2065         https://bugs.webkit.org/show_bug.cgi?id=57773
2066
2067         Add a fast path for drawing simple color backgrounds. It's
2068         faster to fill a path or rect than it is to set up a clip,
2069         and then paint the rect.
2070         
2071         No visible behavior change so no new tests.
2072
2073         * rendering/RenderBoxModelObject.cpp:
2074         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2075
2076 2011-04-05  Patrick Gansterer  <paroga@webkit.org>
2077
2078         Unreviewed EFL build fix for r82962.
2079
2080         * CMakeListsEfl.txt:
2081
2082 2011-04-05  Chris Rogers  <crogers@google.com>
2083
2084         Reviewed by Kenneth Russell.
2085
2086         Add support for offline audio rendering to AudioContext API
2087         https://bugs.webkit.org/show_bug.cgi?id=57676
2088
2089         No new tests since audio API is not yet implemented.
2090
2091         * DerivedSources.make:
2092         * WebCore.gypi:
2093         * WebCore.xcodeproj/project.pbxproj:
2094         * bindings/js/JSAudioContextCustom.cpp:
2095         (WebCore::JSAudioContextConstructor::constructJSAudioContext):
2096         * bindings/js/JSEventCustom.cpp:
2097         (WebCore::toJS):
2098         * bindings/js/JSEventTarget.cpp:
2099         (WebCore::toJS):
2100         * bindings/v8/V8DOMWrapper.cpp:
2101         (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
2102         * bindings/v8/custom/V8AudioContextCustom.cpp:
2103         (WebCore::V8AudioContext::constructorCallback):
2104         * bindings/v8/custom/V8EventCustom.cpp:
2105         (WebCore::toV8):
2106         * dom/Event.cpp:
2107         (WebCore::Event::isOfflineAudioCompletionEvent):
2108         * dom/Event.h:
2109         * dom/EventTarget.cpp:
2110         (WebCore::EventTarget::toAudioContext):
2111         * dom/EventTarget.h:
2112         * platform/audio/HRTFDatabaseLoader.cpp:
2113         (WebCore::HRTFDatabaseLoader::waitForLoaderThreadCompletion):
2114         * platform/audio/HRTFDatabaseLoader.h:
2115         (WebCore::HRTFDatabaseLoader::loader):
2116         * webaudio/AudioContext.cpp:
2117         (WebCore::AudioContext::createOfflineContext):
2118         (WebCore::AudioContext::AudioContext):
2119         (WebCore::AudioContext::constructCommon):
2120         (WebCore::AudioContext::document):
2121         (WebCore::AudioContext::scriptExecutionContext):
2122         (WebCore::AudioContext::toAudioContext):
2123         (WebCore::AudioContext::startRendering):
2124         (WebCore::AudioContext::fireCompletionEvent):
2125         * webaudio/AudioContext.h:
2126         (WebCore::AudioContext::isOfflineContext):
2127         (WebCore::AudioContext::eventTargetData):
2128         (WebCore::AudioContext::ensureEventTargetData):
2129         (WebCore::AudioContext::refEventTarget):
2130         (WebCore::AudioContext::derefEventTarget):
2131         * webaudio/AudioContext.idl:
2132         * webaudio/AudioDestinationNode.cpp:
2133         (WebCore::AudioDestinationNode::AudioDestinationNode):
2134         * webaudio/AudioDestinationNode.h:
2135         (WebCore::AudioDestinationNode::reset):
2136         (WebCore::AudioDestinationNode::numberOfChannels):
2137         * webaudio/ConvolverNode.cpp:
2138         (WebCore::ConvolverNode::setBuffer):
2139         * webaudio/DefaultAudioDestinationNode.cpp: Added.
2140         (WebCore::DefaultAudioDestinationNode::DefaultAudioDestinationNode):
2141         (WebCore::DefaultAudioDestinationNode::~DefaultAudioDestinationNode):
2142         (WebCore::DefaultAudioDestinationNode::initialize):
2143         (WebCore::DefaultAudioDestinationNode::uninitialize):
2144         (WebCore::DefaultAudioDestinationNode::startRendering):
2145         * webaudio/DefaultAudioDestinationNode.h: Added.
2146         (WebCore::DefaultAudioDestinationNode::create):
2147         (WebCore::DefaultAudioDestinationNode::sampleRate):
2148         * webaudio/OfflineAudioCompletionEvent.cpp: Added.
2149         (WebCore::OfflineAudioCompletionEvent::create):
2150         (WebCore::OfflineAudioCompletionEvent::OfflineAudioCompletionEvent):
2151         (WebCore::OfflineAudioCompletionEvent::~OfflineAudioCompletionEvent):
2152         (WebCore::OfflineAudioCompletionEvent::isOfflineAudioCompletionEvent):
2153         * webaudio/OfflineAudioCompletionEvent.h: Added.
2154         (WebCore::OfflineAudioCompletionEvent::renderedBuffer):
2155         * webaudio/OfflineAudioCompletionEvent.idl: Added.
2156         * webaudio/OfflineAudioDestinationNode.cpp: Added.
2157         (WebCore::OfflineAudioDestinationNode::OfflineAudioDestinationNode):
2158         (WebCore::OfflineAudioDestinationNode::~OfflineAudioDestinationNode):
2159         (WebCore::OfflineAudioDestinationNode::initialize):
2160         (WebCore::OfflineAudioDestinationNode::uninitialize):
2161         (WebCore::OfflineAudioDestinationNode::startRendering):
2162         (WebCore::OfflineAudioDestinationNode::renderEntry):
2163         (WebCore::OfflineAudioDestinationNode::render):
2164         (WebCore::OfflineAudioDestinationNode::notifyCompleteDispatch):
2165         (WebCore::OfflineAudioDestinationNode::notifyComplete):
2166         * webaudio/OfflineAudioDestinationNode.h: Added.
2167         (WebCore::OfflineAudioDestinationNode::create):
2168         (WebCore::OfflineAudioDestinationNode::sampleRate):
2169
2170 2011-04-05  Martin Robinson  <mrobinson@igalia.com>
2171
2172         Reviewed by Eric Seidel.
2173
2174         [Cairo] Better separate the concerns of GraphicsContextCairo
2175         https://bugs.webkit.org/show_bug.cgi?id=55150
2176
2177         Add a PlatformContextCairo which right now stores the cairo_t* for a
2178         GraphicsContextCairo. Later patches will move logic for tracking ContextShadow
2179         and image masking layers into this PlatformContextCairo class.
2180
2181         No new tests. This patch is only a code cleanup.
2182
2183         * GNUmakefile.am:
2184         * platform/graphics/GraphicsContext.h: The platform context is no longer a
2185         cairo_t, but our new class the PlatformContextCairo.
2186         * platform/graphics/cairo/ContextShadowCairo.cpp: Updated to reflect new class.j
2187         * platform/graphics/cairo/FontCairo.cpp: Ditto.
2188         * platform/graphics/cairo/GradientCairo.cpp: Ditto.
2189         * platform/graphics/cairo/GraphicsContextCairo.cpp: Mostly mechanical
2190         changes which now reference platformContext()->cr() to get the cairo_t.
2191         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: Now hold the
2192         PlatformContextCairo instead of the cairo_t.
2193         * platform/graphics/cairo/ImageBufferCairo.cpp: Update to reflect new class.
2194         * platform/graphics/cairo/ImageCairo.cpp: Ditto.
2195         * platform/graphics/cairo/PathCairo.cpp: Ditto.
2196         * platform/graphics/cairo/PlatformContextCairo.cpp: Added.
2197         * platform/graphics/cairo/PlatformContextCairo.h: Added.
2198         * platform/graphics/gtk/FontGtk.cpp: Update to reflect new class.
2199         * platform/graphics/gtk/IconGtk.cpp: Ditto.
2200         * platform/graphics/win/GraphicsContextCairoWin.cpp: Now fill out
2201         m_data with a private section containing the platform context instead of
2202         just a cairo_t.
2203         * platform/gtk/RenderThemeGtk.cpp: Update to reflect new class.
2204         * platform/gtk/WidgetRenderingContext.cpp: Ditto.
2205         (WebCore::WidgetRenderingContext::~WidgetRenderingContext): Ditto.
2206         * plugins/gtk/PluginViewGtk.cpp: Ditto.
2207
2208 2011-04-05  David Dorwin  <ddorwin@chromium.org>
2209
2210         Reviewed by David Levin.
2211
2212         Fullscreen code assumes all layers use GPU compositing when USE(ACCELERATED_COMPOSITING)
2213         https://bugs.webkit.org/show_bug.cgi?id=57400
2214
2215         Check whether the full screen renderer layer is being composited by the GPU before assuming that the backing is valid. 
2216         Accelerated compositing may be compiled in but disabled at runtime or for some elements.
2217
2218         Tests: Fullscreen layout tests on Chromium.
2219
2220         * dom/Document.cpp:
2221         (WebCore::Document::webkitWillEnterFullScreenForElement):
2222         (WebCore::Document::webkitDidEnterFullScreenForElement):
2223         (WebCore::Document::webkitWillExitFullScreenForElement):
2224
2225 2011-04-05  Nikolas Zimmermann  <nzimmermann@rim.com>
2226
2227         Reviewed by Dirk Schulze.
2228
2229         Regression: Invalid write in SVGTextLayoutEngine
2230         https://bugs.webkit.org/show_bug.cgi?id=57721
2231
2232         Properly stop layout if all metrics object refer to zero-width/height characters,
2233         which can happen for instance when using <text font-size="0">.
2234
2235         Test: svg/text/font-size-null-assertion.svg
2236
2237         * rendering/svg/SVGTextLayoutEngine.cpp:
2238         (WebCore::SVGTextLayoutEngine::currentLogicalCharacterAttributes):
2239         (WebCore::SVGTextLayoutEngine::currentLogicalCharacterMetrics):
2240
2241 2011-04-04 MORITA Hajime  <morrita@google.com>
2242
2243         Reviewed by Ryosuke Niwa.
2244
2245         [Refactoring] SpellCheckingResult should be replaced with TextCheckingResult
2246         https://bugs.webkit.org/show_bug.cgi?id=56085
2247         
2248         Removed WebCore::SpellCheckingResult and replaced it with TextCheckingResult.
2249         This change also added TextCheckerClient::requestCheckingOfString() should have
2250         TextCheckingTypeMask as a parameter to control text checking type.
2251
2252         * WebCore.exp.in:
2253         * editing/Editor.cpp:
2254         (WebCore::Editor::replaceSelectionWithFragment):
2255         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
2256         (WebCore::Editor::textCheckingTypeMaskFor): Extracted from markAllMisspellingsAndBadGrammarInRanges()
2257         * editing/SpellChecker.cpp:
2258         (WebCore::SpellChecker::requestCheckingFor): Added a parameter.
2259         (WebCore::SpellChecker::markAt): Extracted from didCheck(), Added a check for the GrammarDetail object.
2260         (WebCore::SpellChecker::didCheck):
2261         * editing/SpellChecker.h:
2262         * loader/EmptyClients.h:
2263         (WebCore::EmptyTextCheckerClient::checkTextOfParagraph):
2264         (WebCore::EmptyTextCheckerClient::requestCheckingOfString):
2265         * platform/text/TextCheckerClient.h:
2266
2267 2011-04-04  Antti Koivisto  <antti@apple.com>
2268
2269         Reviewed by Sam Weinig.
2270
2271         Print stylesheet on nytimes.com loads too early
2272         https://bugs.webkit.org/show_bug.cgi?id=57814
2273
2274         Don't load resources with Very Low priority until there are no other resources to 
2275         load for the host (or until document is complete enough that we stop limiting requests).
2276
2277         No tests, this is  difficult to observe reliably with our current testing infrastructure.
2278         Verified working with Wireshark.
2279
2280         * loader/ResourceLoadScheduler.cpp:
2281         (WebCore::ResourceLoadScheduler::servePendingRequests):
2282         (WebCore::ResourceLoadScheduler::HostInformation::limitRequests):
2283         * loader/ResourceLoadScheduler.h:
2284
2285 2011-04-04  Steve Block  <steveblock@google.com>
2286
2287         Reviewed by Dimitri Glazkov.
2288
2289         JavaInstance should be a pure interface
2290         https://bugs.webkit.org/show_bug.cgi?id=55383
2291
2292         This patch fixes JavaInstance for V8 only.
2293
2294         It factors out a JavaInstance interface which does not use JNI
2295         types. This will allow the Java bridge to be used with objects
2296         that don't use JNI directly. The existing jobject-backed
2297         implementation is moved to a new JavaInstanceJobject class which
2298         implements the interface.
2299
2300         No new tests, refactoring only.
2301
2302         * Android.v8bindings.mk:
2303         * WebCore.gypi:
2304         * bridge/jni/JobjectWrapper.h:
2305         * bridge/jni/v8/JNIUtilityPrivate.cpp:
2306         (JSC::Bindings::jvalueToJavaValue):
2307         (JSC::Bindings::javaValueToJvalue):
2308         * bridge/jni/v8/JavaInstanceJobjectV8.cpp:
2309         (JavaInstanceJobject::JavaInstanceJobject):
2310         (JavaInstanceJobject::~JavaInstanceJobject):
2311         (JavaInstanceJobject::begin):
2312         (JavaInstanceJobject::end):
2313         (JavaInstanceJobject::getClass):
2314         (JavaInstanceJobject::invokeMethod):
2315         (JavaInstanceJobject::getField):
2316         * bridge/jni/v8/JavaInstanceJobjectV8.h: Copied from Source/WebCore/bridge/jni/v8/JavaInstanceV8.h.
2317         (JSC::Bindings::JavaInstanceJobject::javaInstance):
2318         * bridge/jni/v8/JavaInstanceV8.h:
2319         (JSC::Bindings::JavaInstance::~JavaInstance):
2320
2321 2011-04-05  Dimitri Glazkov  <dglazkov@chromium.org>
2322
2323        Reviewed by Darin Adler.
2324
2325         Move MouseEvent-dispatching logic into MouseEventDispatchMediator.
2326         https://bugs.webkit.org/show_bug.cgi?id=57639
2327
2328         Refactoring, covered by existing tests.
2329
2330         * dom/EventDispatcher.cpp:
2331         (WebCore::EventDispatcher::dispatchEvent): Moved useful assertion here
2332             from dispatchMouseEvent.
2333         (WebCore::EventDispatcher::adjustRelatedTarget): Converted into a method.
2334         * dom/EventDispatcher.h: Adjusted decls.
2335         (WebCore::EventDispatcher::node): Added.
2336         * dom/MouseEvent.cpp:
2337         (WebCore::MouseEvent::create): Moved useful assertion here from
2338             dispatchMouseEvent.
2339         (WebCore::MouseEventDispatchMediator::MouseEventDispatchMediator): Added.
2340         (WebCore::MouseEventDispatchMediator::event): Added.
2341         (WebCore::MouseEventDispatchMediator::dispatchEvent): Added.
2342         * dom/MouseEvent.h:
2343         (WebCore::MouseEvent::setRelatedTarget): Added.
2344         * dom/Node.cpp:
2345         (WebCore::Node::dispatchMouseEvent): Changed to use MouseEventDispatchMediator.
2346
2347 2011-04-05  Nikolas Zimmermann  <nzimmermann@rim.com>
2348
2349         Reviewed by Adam Roben & Dirk Schulze.
2350
2351         text-tspan-02-b.svg from SVG 1.1 2nd edition fails
2352         https://bugs.webkit.org/show_bug.cgi?id=57831
2353
2354         We were not spanning rotation values correcty accross text children, which resulted in text-span-02-b.svg misrendering.
2355         While rewriting the rotation specific code, it came apparent that the LayoutScope concept is flawed in general and
2356         should be replaced by a global list of x/y/dx/dy/rotate values for the whole text subtree. This makes it much simpler
2357         to implement the demand that the last rotation value spans the whole scope. A follow-up patch will optimize the
2358         required memory.
2359
2360         Example:
2361         <text rotate="10,20,999,50">AB<tspan rotate="30">CDE</>FGH</text>
2362     
2363         text:   A  B  C  D  E  F  G  H
2364         rotate="10 20 30 30 30 50 50 50"
2365
2366         Tests: svg/W3C-SVG-1.1-SE/text-tspan-02-b.svg
2367                svg/text/text-midpoint-split-bug.svg
2368
2369         * rendering/RenderBlockLineLayout.cpp:     Move SVG specific midpoint creation after the non-SVG specific code that may mutate the midpoints. otherwhise we end up in an
2370         (WebCore::RenderBlock::findNextLineBreak): inconsistent state. We were intereferring with the ignoreSpaces code resulting in wrong truncations - covered by new testcase.
2371         * rendering/svg/SVGTextLayoutAttributes.cpp:
2372         (WebCore::SVGTextLayoutAttributes::reserveCapacity): Also reserveCapacity for the text metrics list (minor optimization).
2373         (WebCore::SVGTextLayoutAttributes::fillWithEmptyValue): Added helper function for use from SVGTextLayoutAttributesBuilder.
2374         (WebCore::SVGTextLayoutAttributes::appendEmptyValue): Ditto.
2375         (WebCore::safeValueAtPosition): Ditto. (Inline helper)
2376         (WebCore::SVGTextLayoutAttributes::appendSingleValueFromAttribute): Ditto.
2377         * rendering/svg/SVGTextLayoutAttributes.h: Ditto.
2378         * rendering/svg/SVGTextLayoutAttributesBuilder.cpp: Rewrite code, see explaination above.
2379         (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForTextSubtree):
2380         (WebCore::processRenderSVGInlineText):
2381         (WebCore::SVGTextLayoutAttributesBuilder::collectTextPositioningElements):
2382         (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForAllCharacters):
2383         (WebCore::SVGTextLayoutAttributesBuilder::propagateLayoutAttributes):
2384         (WebCore::fillListAtPosition):
2385         (WebCore::SVGTextLayoutAttributesBuilder::fillAttributesAtPosition):
2386         * rendering/svg/SVGTextLayoutAttributesBuilder.h:
2387         (WebCore::SVGTextLayoutAttributesBuilder::TextPosition::TextPosition):
2388
2389 2011-04-05  Levi Weintraub  <leviw@chromium.org>
2390
2391         Reviewed by Ryosuke Niwa.
2392
2393         DeleteButtonController is given invalid style
2394         https://bugs.webkit.org/show_bug.cgi?id=57853
2395
2396         DeleteButtonController was assigned an invalid style that can lead to assertions
2397         in debug builds. This matches up the code with its intent.
2398
2399         No new tests as this changes nothing on release builds.
2400
2401         * editing/DeleteButtonController.cpp:
2402         (WebCore::DeleteButtonController::createDeletionUI):
2403
2404 2011-04-05  Anders Bakken  <agbakken@gmail.com>
2405
2406         Reviewed by Laszlo Gombos.
2407
2408         [Qt] EditorQt.cpp has coding-style errors
2409         https://bugs.webkit.org/show_bug.cgi?id=40260
2410         
2411         This patch does not require new test cases.
2412
2413         * editing/qt/EditorQt.cpp:
2414
2415 2011-04-05  Pavel Podivilov  <podivilov@chromium.org>
2416
2417         Reviewed by Pavel Feldman.
2418
2419         Web Inspector: go to line dialog highlights wrong line.
2420         https://bugs.webkit.org/show_bug.cgi?id=57845
2421
2422         * inspector/front-end/GoToLineDialog.js:
2423         (WebInspector.GoToLineDialog.prototype._highlightSelectedLine):
2424
2425 2011-04-05  Luke Macpherson   <macpherson@chromium.org>
2426
2427         Reviewed by Dimitri Glazkov.
2428
2429         Implement CSSPropertyDirection in CSSStyleApplyProperty
2430         https://bugs.webkit.org/show_bug.cgi?id=57608
2431
2432         No new tests required as no new functionality introduced.
2433
2434         * css/CSSStyleApplyProperty.cpp:
2435         Add implementation class for CSSPropertyDirection
2436         * css/CSSStyleSelector.cpp:
2437         Remove existing implementation for CSSPropertyDirection
2438         * css/CSSStyleSelector.h:
2439         Add getter for element
2440
2441 2011-04-05  Leandro Gracia Gil  <leandrogracia@chromium.org>
2442
2443         Reviewed by Steve Block.
2444
2445         Factoring the creation of 'FunctionOnly' callbacks in V8.
2446         https://bugs.webkit.org/show_bug.cgi?id=57760
2447
2448         This method creates a template from an existing functionality in V8GeolocationCustom.cpp
2449         to V8Utilities to be used by the custom bindings of both Geolocation and the Media Stream API.
2450
2451         No new tests. LayoutTests/fast/dom/Geolocation/argument-types.html
2452
2453         * bindings/v8/V8Utilities.cpp:
2454         (WebCore::throwTypeMismatchException):
2455         * bindings/v8/V8Utilities.h:
2456         (WebCore::createFunctionOnlyCallback):
2457         * bindings/v8/custom/V8GeolocationCustom.cpp:
2458         (WebCore::V8Geolocation::getCurrentPositionCallback):
2459         (WebCore::V8Geolocation::watchPositionCallback):
2460
2461 2011-04-05  Nikolas Zimmermann  <nzimmermann@rim.com>
2462
2463         Reviewed by Andreas Kling.
2464
2465         Switch from Vector<UChar> to StringBuilder in bindings/
2466         https://bugs.webkit.org/show_bug.cgi?id=57838
2467
2468         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2469         (WebCore::cssPropertyName):
2470         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
2471         (WebCore::cssPropertyInfo):
2472
2473 2011-04-05  Nikolas Zimmermann  <nzimmermann@rim.com>
2474
2475         Reviewed by Andreas Kling.
2476
2477         Switch from Vector<UChar> to StringBuilder in accessibility/
2478         https://bugs.webkit.org/show_bug.cgi?id=57837
2479
2480         * accessibility/AccessibilityObject.cpp:
2481         (WebCore::AccessibilityObject::listMarkerTextForNodeAndPosition):
2482         (WebCore::AccessibilityObject::stringForVisiblePositionRange):
2483         * accessibility/AccessibilityRenderObject.cpp:
2484         (WebCore::AccessibilityRenderObject::accessibilityDescriptionForElements):
2485
2486 2011-04-05  Andrey Adaikin  <aandrey@google.com>
2487
2488         Reviewed by Pavel Feldman.
2489
2490         Web Inspector: Scripts with syntax errors are cropped in the UI
2491         https://bugs.webkit.org/show_bug.cgi?id=57828
2492
2493         * inspector/front-end/SourceFrame.js:
2494         (WebInspector.SourceFrame.prototype.addMessageToSource):
2495
2496 2011-04-05  Alexey Proskuryakov  <ap@apple.com>
2497
2498         Reviewed by Darin Adler.
2499
2500         Remove onformchange and onforminput events/event handlers
2501         https://bugs.webkit.org/show_bug.cgi?id=55755
2502         <rdar://problem/9087969>
2503
2504         Covered by existing tests.
2505
2506         * dom/Document.h:
2507         * dom/Document.idl:
2508         * dom/Element.h:
2509         * dom/Element.idl:
2510         * dom/Event.cpp:
2511         (WebCore::Event::fromUserGesture):
2512         * dom/EventNames.h:
2513         * html/FormAssociatedElement.h:
2514         * html/HTMLAttributeNames.in:
2515         * html/HTMLElement.cpp:
2516         (WebCore::HTMLElement::parseMappedAttribute):
2517         * html/HTMLElement.h:
2518         * html/HTMLFormControlElement.h:
2519         (WebCore::HTMLFormControlElement::isEnumeratable):
2520         * html/HTMLFormElement.cpp:
2521         * html/HTMLFormElement.h:
2522         * html/HTMLFormElement.idl:
2523         * html/HTMLInputElement.h:
2524         * html/HTMLKeygenElement.h:
2525         * html/HTMLObjectElement.h:
2526         (WebCore::HTMLObjectElement::isEnumeratable):
2527         * html/HTMLOutputElement.h:
2528         (WebCore::HTMLOutputElement::isEnumeratable):
2529         * html/HTMLSelectElement.h:
2530         (WebCore::HTMLSelectElement::isEnumeratable):
2531         * html/HTMLTextAreaElement.h:
2532         (WebCore::HTMLTextAreaElement::isEnumeratable):
2533         * page/DOMWindow.h:
2534         * page/DOMWindow.idl:
2535
2536 2011-04-05  Sheriff Bot  <webkit.review.bot@gmail.com>
2537
2538         Unreviewed, rolling out r82915.
2539         http://trac.webkit.org/changeset/82915
2540         https://bugs.webkit.org/show_bug.cgi?id=57825
2541
2542         Broke 270 chromium tests on win and linux (Requested by
2543         podivilov on #webkit).
2544
2545         * rendering/RenderThemeChromiumSkia.cpp:
2546         (WebCore::RenderThemeChromiumSkia::defaultGUIFont):
2547
2548 2011-04-05  James Simonsen  <simonjam@chromium.org>
2549
2550         Reviewed by Adam Barth.
2551
2552         Stop preload scanning CSS when it&apos;s impossible to have another @import.
2553         https://bugs.webkit.org/show_bug.cgi?id=57664
2554
2555         @import statements are only allowed at the beginning of a CSS file.
2556         Only comments or @charset can precede them. After seeing anything else,
2557         abort early so that we:
2558         - don't have to parse the rest of the CSS.
2559         - don't preload something that the regular parser won't load.
2560
2561         * html/parser/CSSPreloadScanner.cpp:
2562         (WebCore::CSSPreloadScanner::scan): Terminate early if we're done with @imports.
2563         (WebCore::CSSPreloadScanner::tokenize): Terminate early if we see a {} or any style rule.
2564         (WebCore::CSSPreloadScanner::emitRule): Only @charset or @import are allowed to precede @import.
2565         * html/parser/CSSPreloadScanner.h: Add DoneParsingImportRules state.
2566
2567 2011-04-05  Takayoshi Kochi <kochi@chromium.org>
2568
2569         Reviewed by Tony Chang.
2570
2571         [chromium] Specify 'sans-serif' as a fallback to the default UI font
2572         'Arial' for non-latin UI scripts (e.g. CJK).
2573         https://bugs.webkit.org/show_bug.cgi?id=55035
2574
2575         No new tests, because it may still fail if the system is not configured
2576         properly to resolve 'sans-serif' to existing real font file, thus even
2577         manual test is hard to systematically tell it is working properly.
2578
2579         * rendering/RenderThemeChromiumSkia.cpp
2580
2581 2011-04-05  Kent Tamura  <tkent@chromium.org>
2582
2583         Reviewed by Dimitri Glazkov.
2584
2585         Setting defaultValue on a textarea with a modified value still clobbers the value
2586         https://bugs.webkit.org/show_bug.cgi?id=57636
2587
2588         If the dirty flag is true, we shouldn't update the value when the
2589         defaultValue is updated
2590
2591         Test: fast/forms/textarea-set-defaultvalue-after-value.html
2592
2593         * html/HTMLTextAreaElement.cpp:
2594         (WebCore::HTMLTextAreaElement::childrenChanged):
2595         (WebCore::HTMLTextAreaElement::setDefaultValue):
2596
2597 2011-04-04  Kent Tamura  <tkent@chromium.org>
2598
2599         Add a case label which was unexpectedly removed in r82899.
2600         https://bugs.webkit.org/show_bug.cgi?id=50661
2601
2602         * css/CSSSelector.cpp:
2603         (WebCore::CSSSelector::extractPseudoType):
2604
2605 2011-04-04  Dan Bernstein  <mitz@apple.com>
2606
2607         Reviewed by Simon Fraser.
2608
2609         <rdar://problem/7709452> Implement Default Ruby Overhang Behavior
2610         https://bugs.webkit.org/show_bug.cgi?id=49334
2611
2612         Tests: fast/ruby/overhang-horizontal.html
2613                fast/ruby/overhang-vertical.html
2614
2615         This is a first cut at ruby overhang. It allows ruby text to hang over other
2616         text of equal or smaller size. Two notable omissions are that max preferred
2617         width computation was not patched, so it will overshoot, and that overhang
2618         ignores the width of the adjoining text runs.
2619
2620         * rendering/RenderBlock.h:
2621         * rendering/RenderBlockLineLayout.cpp:
2622         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Adjust margins
2623         of ruby runs for overhang.
2624         (WebCore::RenderBlock::fitBelowFloats): Maintain the increase in line width to
2625         compensate for overhang.
2626         (WebCore::RenderBlock::findNextLineBreak): When encountering
2627         a ruby run, increase the line width to account for the fact that overhang will be
2628         collapsed.
2629         * rendering/RenderRubyRun.cpp:
2630         (WebCore::RenderRubyRun::getOverhang): Added. Allows ruby to overhang if
2631         the adjoining renderer is text with equal or smaller font size.
2632         * rendering/RenderRubyRun.h:
2633         (WebCore::toRenderRubyRun):
2634
2635 2011-04-04  David Kilzer  <ddkilzer@apple.com>
2636
2637         <http://webkit.org/b/57384> CFNetwork and WebCore load priorities should match
2638
2639         Reviewed by Alexey Proskuryakov.
2640
2641         * WebCore.exp.in: Export wkSetHTTPPipeliningMaximumPriority().
2642         * platform/mac/WebCoreSystemInterface.h:
2643         (wkSetHTTPPipeliningMaximumPriority): Added function pointer
2644         declaration.
2645         * platform/mac/WebCoreSystemInterface.mm:
2646         (wkSetHTTPPipeliningMaximumPriority): Added function pointer.
2647         * platform/network/cf/ResourceRequestCFNet.cpp:
2648         (WebCore::initializeMaximumHTTPConnectionCountPerHost): Call
2649         wkSetHTTPPipeliningMaximumPriority() to set the maximum HTTP
2650         pipelining priority.
2651         * platform/network/cf/ResourceRequestCFNet.h:
2652         (WebCore::toResourceLoadPriority): Renamed from
2653         mapHTTPPipeliningPriorityToResourceLoadPriority().  Updated to
2654         to handle Unresolved case.
2655         (WebCore::toHTTPPipeliningPriority): Renamed from
2656         mapResourceLoadPriorityToHTTPPipeliningPriority().  Updated to
2657         handle Unresolved case.
2658         * platform/network/mac/ResourceRequestMac.mm:
2659         (WebCore::ResourceRequest::doUpdateResourceRequest): Switched to
2660         use toResourceLoadPriority().
2661         (WebCore::ResourceRequest::doUpdatePlatformRequest): Switched to
2662         use toHTTPPipeliningPriority().  Moved
2663         shouldForceHTTPPipeliningPriorityHigh() check into the argument
2664         of toHTTPPipeliningPriority() instead of hard-coding a
2665         now-incorrect value.
2666
2667 2011-04-04  MORITA Hajime  <morrita@google.com>
2668
2669         Reviewed by Kent Tamura.
2670
2671         Convert <meter> shadow DOM to a DOM-based shadow.
2672         https://bugs.webkit.org/show_bug.cgi?id=50661
2673         
2674         Eliminated a large part of <meter> custom layout code,
2675         which is replaced by a shadow tree.
2676         Note that the shadow tree is created on construction time and
2677         will remain during the host HTMLMeterElement lifecycle.
2678         
2679         * Android.mk:
2680         * CMakeLists.txt:
2681         * GNUmakefile.am:
2682         * WebCore.gypi:
2683         * WebCore.pro:
2684         * WebCore.vcproj/WebCore.vcproj:
2685         * WebCore.xcodeproj/project.pbxproj:
2686         * css/CSSMutableStyleDeclaration.cpp:
2687         (WebCore::CSSMutableStyleDeclaration::setProperty):
2688         * css/CSSMutableStyleDeclaration.h:
2689         * css/CSSSelector.cpp:
2690         (WebCore::CSSSelector::pseudoId):
2691         (WebCore::nameToPseudoTypeMap):
2692         (WebCore::CSSSelector::extractPseudoType):
2693         * css/CSSSelector.h:
2694         * css/html.css:
2695         (meter):
2696         (meter::-webkit-meter-bar):
2697         (meter::-webkit-meter-optimum-value):
2698         (meter::-webkit-meter-suboptimum-value):
2699         (meter::-webkit-meter-even-less-good-value):
2700         * html/HTMLMeterElement.cpp:
2701         (WebCore::HTMLMeterElement::~HTMLMeterElement):
2702         (WebCore::HTMLMeterElement::parseMappedAttribute):
2703         (WebCore::HTMLMeterElement::attach):
2704         (WebCore::HTMLMeterElement::valueRatio):
2705         (WebCore::HTMLMeterElement::didElementStateChange):
2706         (WebCore::HTMLMeterElement::createShadowSubtree):
2707         * html/HTMLMeterElement.h:
2708         * html/shadow/MeterShadowElement.cpp: Added.
2709         (WebCore::MeterShadowElement::MeterShadowElement):        
2710         (WebCore::MeterShadowElement::meterElement):
2711         (WebCore::MeterShadowElement::rendererIsNeeded):
2712         (WebCore::MeterBarElement::shadowPseudoId):
2713         (WebCore::MeterValueElement::shadowPseudoId):
2714         (WebCore::MeterValueElement::setWidthPercentage):
2715         * html/shadow/MeterShadowElement.h: Added.
2716         (WebCore::MeterBarElement::MeterBarElement):
2717         (WebCore::MeterBarElement::create):
2718         (WebCore::MeterValueElement::MeterValueElement):
2719         (WebCore::MeterValueElement::create):
2720         * rendering/RenderMeter.cpp:
2721         (WebCore::RenderMeter::RenderMeter):
2722         (WebCore::RenderMeter::~RenderMeter):
2723         (WebCore::RenderMeter::valueRatio):
2724         * rendering/RenderMeter.h:
2725         (WebCore::RenderMeter::renderName):
2726         (WebCore::RenderMeter::isMeter):
2727         (WebCore::RenderMeter::requiresForcedStyleRecalcPropagation):
2728         (WebCore::RenderMeter::canHaveChildren):
2729
2730 2011-04-04  Dimitri Glazkov  <dglazkov@chromium.org>
2731
2732         Reviewed by Adam Barth.
2733
2734         Introduce EventDispatchMediator abstraction, which encapsulate all
2735         non-trivial logic around firing a specific type of an event.
2736         https://bugs.webkit.org/show_bug.cgi?id=57562
2737
2738         Refactoring, covered by existing tests.
2739
2740         * dom/Event.cpp:
2741         (WebCore::EventDispatchMediator::EventDispatchMediator): Added.
2742         (WebCore::EventDispatchMediator::~EventDispatchMediator): Added.
2743         (WebCore::EventDispatchMediator::dispatchEvent): Added.
2744         (WebCore::EventDispatchMediator::event): Added.
2745         * dom/Event.h: Added decl.
2746         * dom/EventDispatcher.cpp:
2747         (WebCore::EventDispatcher::dispatchEvent): Changed to use EventDispatchMediator.
2748         * dom/EventDispatcher.h: Updated decls.
2749         * dom/KeyboardEvent.cpp:
2750         (WebCore::KeyboardEventDispatchMediator::KeyboardEventDispatchMediator): Added.
2751         (WebCore::KeyboardEventDispatchMediator::dispatchEvent): Added.
2752         * dom/KeyboardEvent.h: Updated decls
2753         * dom/Node.cpp:
2754         (WebCore::Node::dispatchEvent): Changed to use EventDispatchMediator.
2755         (WebCore::Node::dispatchKeyEvent): Changed to use KeyboardEventDispatchMediator.
2756
2757 2011-04-04  Martin Robinson  <mrobinson@igalia.com>
2758
2759         Reviewed by Xan Lopez.
2760
2761         [Cairo] Memory leak in RefPtrCairo
2762         https://bugs.webkit.org/show_bug.cgi?id=57758
2763
2764         No new tests. This just fixes a memory leak.
2765
2766         * platform/graphics/cairo/RefPtrCairo.cpp:
2767         (WTF::derefIfNotNull): Deref should unref the cairo_font_fact_t, not reference it.
2768
2769 2011-04-04  Adrienne Walker  <enne@google.com>
2770
2771         Unreviewed, rolling out r82880.
2772         http://trac.webkit.org/changeset/82880
2773         https://bugs.webkit.org/show_bug.cgi?id=50661
2774
2775         Meter elements not rendered in Chromium Linux layout tests
2776
2777         * Android.mk:
2778         * CMakeLists.txt:
2779         * GNUmakefile.am:
2780         * WebCore.gypi:
2781         * WebCore.pro:
2782         * WebCore.vcproj/WebCore.vcproj:
2783         * WebCore.xcodeproj/project.pbxproj:
2784         * css/CSSMutableStyleDeclaration.cpp:
2785         * css/CSSMutableStyleDeclaration.h:
2786         * css/CSSSelector.cpp:
2787         (WebCore::CSSSelector::pseudoId):
2788         (WebCore::nameToPseudoTypeMap):
2789         (WebCore::CSSSelector::extractPseudoType):
2790         * css/CSSSelector.h:
2791         * css/html.css:
2792         (meter):
2793         (meter::-webkit-meter):
2794         (meter::-webkit-meter-bar):
2795         (meter::-webkit-meter-optimum-value):
2796         (meter::-webkit-meter-suboptimal-value):
2797         (meter::-webkit-meter-even-less-good-value):
2798         * html/HTMLMeterElement.cpp:
2799         (WebCore::HTMLMeterElement::create):
2800         (WebCore::HTMLMeterElement::parseMappedAttribute):
2801         (WebCore::HTMLMeterElement::attach):
2802         * html/HTMLMeterElement.h:
2803         * html/shadow/MeterShadowElement.cpp: Removed.
2804         * html/shadow/MeterShadowElement.h: Removed.
2805         * rendering/RenderMeter.cpp:
2806         (WebCore::RenderMeter::RenderMeter):
2807         (WebCore::RenderMeter::~RenderMeter):
2808         (WebCore::RenderMeter::createPart):
2809         (WebCore::RenderMeter::updateFromElement):
2810         (WebCore::RenderMeter::layoutParts):
2811         (WebCore::RenderMeter::styleDidChange):
2812         (WebCore::RenderMeter::shouldHaveParts):
2813         (WebCore::RenderMeter::valueRatio):
2814         (WebCore::RenderMeter::barPartRect):
2815         (WebCore::RenderMeter::valuePartRect):
2816         (WebCore::RenderMeter::valuePseudoId):
2817         (WebCore::RenderMeter::barPseudoId):
2818         (WebCore::RenderMeter::detachShadows):
2819         (WebCore::RenderMeter::updateShadows):
2820         * rendering/RenderMeter.h:
2821         (WebCore::RenderMeter::renderName):
2822         (WebCore::RenderMeter::isMeter):
2823         (WebCore::RenderMeter::shadowAttached):
2824
2825 2011-04-04  Chang Shu  <cshu@webkit.org>
2826
2827         Reviewed by Ryosuke Niwa.
2828
2829         setContentEditable with true/false/inherit string is not working properly
2830         https://bugs.webkit.org/show_bug.cgi?id=52058
2831
2832         Move isContentEditable from HTMLElement to Node. Thus, Node provides two functions for
2833         checking editability: rendererIsEditable and isContentEdiable. The former is a fast path,
2834         which does NOT trigger layout and only checks the render style of usermodify. The latter
2835         updates the layout first to make sure the render style syncs with DOM contenteditable 
2836         attribute. Certain call sites that need to call isContentEditable rather than rendererIsEditable
2837         are also updated in the patch. But a complete fix will follow up in bug 57244.
2838
2839         This patch fixes all the failed layout tests related to set contenteditable.
2840
2841         * accessibility/AccessibilityRenderObject.cpp:
2842         (WebCore::AccessibilityRenderObject::isReadOnly):
2843         * dom/Node.cpp:
2844         (WebCore::Node::isContentEditable):
2845         (WebCore::Node::shouldUseInputMethod):
2846         * dom/Node.h:
2847         * html/HTMLElement.cpp:
2848         * html/HTMLElement.h:
2849
2850 2011-04-04  Roland Steiner  <rolandsteiner@chromium.org>
2851
2852         Reviewed by Dimitri Glazkov.
2853
2854         Bug 57689 - Extract scoping functionality from Document
2855         https://bugs.webkit.org/show_bug.cgi?id=57689
2856
2857         Moved selfOnlyRef (renamed to guardRef), element ID, image map
2858         and accesss key functionalities from Document to a new base
2859         class TreeScope.
2860
2861         TreeShared: made removedLastRef protected
2862
2863         No new tests. (refactoring)
2864
2865         * Android.mk:
2866         * CMakeLists.txt:
2867         * GNUmakefile.am:
2868         * WebCore.gypi:
2869         * WebCore.pro:
2870         * WebCore.vcproj/WebCore.vcproj:
2871         * WebCore.xcodeproj/project.pbxproj:
2872         * dom/Document.cpp:
2873         (WebCore::Document::Document):
2874         (WebCore::Document::destroyScope):
2875         (WebCore::Document::getElementById):
2876         (WebCore::Document::childrenChanged):
2877         (WebCore::Document::scheduleStyleRecalc):
2878         (WebCore::Document::attach):
2879         (WebCore::Document::detach):
2880         * dom/Document.h:
2881         (WebCore::Node::Node):
2882         * dom/DocumentOrderedMap.cpp:
2883         (WebCore::DocumentOrderedMap::get):
2884         (WebCore::DocumentOrderedMap::getElementById):
2885         (WebCore::DocumentOrderedMap::getElementByMapName):
2886         (WebCore::DocumentOrderedMap::getElementByLowercasedMapName):
2887         * dom/DocumentOrderedMap.h:
2888         * dom/DOMAllInOne.cpp:
2889         * dom/Node.cpp:
2890         (WebCore::Node::~Node):
2891         (WebCore::Node::setDocument):
2892         * dom/Node.h:
2893         * dom/TreeScope.cpp: Added.
2894         * dom/TreeScope.h: Added.
2895         * platform/TreeShared.h:
2896         (WebCore::TreeShared::removedLastRef): made protected
2897
2898 2011-04-04  MORITA Hajime  <morrita@google.com>
2899
2900         Reviewed by Dimitri Glazkov.
2901
2902         Convert <meter> shadow DOM to a DOM-based shadow.
2903         https://bugs.webkit.org/show_bug.cgi?id=50661
2904         
2905         Eliminated a large part of <meter> custom layout code,
2906         which is replaced by a shadow tree.
2907         Note that the shadow tree is created on construction time and
2908         will remain during the host HTMLMeterElement lifecycle.
2909         
2910         * Android.mk:
2911         * CMakeLists.txt:
2912         * GNUmakefile.am:
2913         * WebCore.gypi:
2914         * WebCore.pro:
2915         * WebCore.vcproj/WebCore.vcproj:
2916         * WebCore.xcodeproj/project.pbxproj:
2917         * css/CSSMutableStyleDeclaration.cpp:
2918         (WebCore::CSSMutableStyleDeclaration::setProperty):
2919         * css/CSSMutableStyleDeclaration.h:
2920         * css/CSSSelector.cpp:
2921         (WebCore::CSSSelector::pseudoId):
2922         (WebCore::nameToPseudoTypeMap):
2923         (WebCore::CSSSelector::extractPseudoType):
2924         * css/CSSSelector.h:
2925         * css/html.css:
2926         (meter):
2927         (meter::-webkit-meter-bar):
2928         (meter::-webkit-meter-optimum-value):
2929         (meter::-webkit-meter-suboptimum-value):
2930         (meter::-webkit-meter-even-less-good-value):
2931         * html/HTMLMeterElement.cpp:
2932         (WebCore::HTMLMeterElement::~HTMLMeterElement):
2933         (WebCore::HTMLMeterElement::parseMappedAttribute):
2934         (WebCore::HTMLMeterElement::attach):
2935         (WebCore::HTMLMeterElement::valueRatio):
2936         (WebCore::HTMLMeterElement::didElementStateChange):
2937         (WebCore::HTMLMeterElement::createShadowSubtree):
2938         * html/HTMLMeterElement.h:
2939         * html/shadow/MeterShadowElement.cpp: Added.
2940         (WebCore::MeterShadowElement::MeterShadowElement):        
2941         (WebCore::MeterShadowElement::meterElement):
2942         (WebCore::MeterShadowElement::rendererIsNeeded):
2943         (WebCore::MeterBarElement::shadowPseudoId):
2944         (WebCore::MeterValueElement::shadowPseudoId):
2945         (WebCore::MeterValueElement::setWidthPercentage):
2946         * html/shadow/MeterShadowElement.h: Added.
2947         (WebCore::MeterBarElement::MeterBarElement):
2948         (WebCore::MeterBarElement::create):
2949         (WebCore::MeterValueElement::MeterValueElement):
2950         (WebCore::MeterValueElement::create):
2951         * rendering/RenderMeter.cpp:
2952         (WebCore::RenderMeter::RenderMeter):
2953         (WebCore::RenderMeter::~RenderMeter):
2954         (WebCore::RenderMeter::valueRatio):
2955         * rendering/RenderMeter.h:
2956         (WebCore::RenderMeter::renderName):
2957         (WebCore::RenderMeter::isMeter):
2958         (WebCore::RenderMeter::requiresForcedStyleRecalcPropagation):
2959         (WebCore::RenderMeter::canHaveChildren):
2960
2961 2011-04-04  Martin Robinson  <mrobinson@igalia.com>
2962
2963         Reviewed by Gustavo Noronha Silva.
2964
2965         [GTK] WebGL support
2966         https://bugs.webkit.org/show_bug.cgi?id=31517
2967
2968         Add WebGL support for the GTK+ bits of WebCore.
2969
2970         No new tests. This will be covered by the existing WebGL tests once
2971         the bots are capable of running WebGL tests.
2972
2973         * GNUmakefile.am: Added new files required for WebGL support.
2974         * html/HTMLCanvasElement.cpp:
2975         (WebCore::HTMLCanvasElement::getContext): Extend #ifdef to cover GTK+ as well, which does not
2976         yet support accelerated compositing.
2977         * platform/graphics/ANGLEWebKitBridge.h: Update to reflect the fact that ANGLE isn't compiled as
2978         a framework for GTK+.
2979         * platform/graphics/GraphicsContext3D.h:
2980         (WebCore::GraphicsContext3D::platformTexture): Added a declaration of this method for Cairo.
2981         (WebCore::GraphicsContext3D::paintsIntoCanvasBuffer): Ditto.
2982         * platform/graphics/cairo/GraphicsContext3DCairo.cpp: Added.
2983         (WebCore::GraphicsContext3D::getImageData): Added.
2984         (WebCore::GraphicsContext3D::paintToCanvas): Added.
2985         * platform/graphics/cairo/OpenGLShims.cpp: Added. This file controls loading of GL extension
2986         functions dynamically. They have different names across the different vendors' GL implementations.
2987         (WebCore::lookupOpenGLFunctionAddress): Added
2988         (WebCore::openGLFunctionTable): Added
2989         (WebCore::initializeOpenGLShims): Added
2990         * platform/graphics/cairo/OpenGLShims.h: Added.
2991         * platform/graphics/gtk/DrawingBufferGtk.cpp: Added.
2992         (WebCore::DrawingBuffer::DrawingBuffer): Very generic implementation for Cairo.
2993         (WebCore::DrawingBuffer::~DrawingBuffer): Ditto.
2994         (WebCore::DrawingBuffer::didReset): Ditto.
2995         (WebCore::DrawingBuffer::platformColorBuffer): Ditto.
2996         * platform/graphics/gtk/GraphicsContext3DGtk.cpp: Added.
2997         (WebCore::GraphicsContext3D::create): Initial implementation.
2998         (WebCore::GraphicsContext3D::GraphicsContext3D): Ditto.
2999         (WebCore::GraphicsContext3D::~GraphicsContext3D): Ditto.
3000         (WebCore::GraphicsContext3D::makeContextCurrent): Ditto.
3001         (WebCore::GraphicsContext3D::platformGraphicsContext3D): Ditto.
3002         (WebCore::GraphicsContext3D::isGLES2Compliant): Ditto.
3003         * platform/graphics/gtk/GraphicsContext3DInternal.cpp: Added.
3004         (sharedDisplay): Added this shared display which is required by some
3005         display drivers.
3006         (WebCore::activeGraphicsContexts): This method keeps track of all active GraphicsContext3D
3007         contexts, in order to clean them up at exit. This prevents crashes on certain OpenGL drivers.
3008         (WebCore::GraphicsContext3DInternal::addActiveGraphicsContext): Ditto.
3009         (WebCore::GraphicsContext3DInternal::removeActiveGraphicsContext): Ditto.
3010         (WebCore::GraphicsContext3DInternal::cleanupActiveContextsAtExit): Ditto.
3011         (WebCore::GraphicsContext3DInternal::create): Figure out the best way to create an OpenGL
3012         context given the current environment.
3013         (WebCore::GraphicsContext3DInternal::createPbufferContext): Pbuffer context initializer.
3014         (WebCore::GraphicsContext3DInternal::createPixmapContext): Pixmap context initializer.
3015         (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): Initial implementation.
3016         (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal): Ditto.
3017         (WebCore::GraphicsContext3DInternal::makeContextCurrent): Ditto.
3018         * platform/graphics/gtk/GraphicsContext3DInternal.h: Added.
3019         * platform/graphics/opengl/Extensions3DOpenGL.cpp: Added generic implementation.
3020         (WebCore::Extensions3DOpenGL::ensureEnabled): Ditto.
3021         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
3022         (WebCore::GraphicsContext3D::reshape): Test for the context using the public API rather than
3023         the private bits that are specific to the Apple port.
3024
3025 2011-04-04  Alexey Proskuryakov  <ap@apple.com>
3026
3027         Reviewed by Dan Bernstein.
3028
3029         REGRESSION (WebKit2): Caps-Lock indicator sometimes doesn't appear in WebKit2
3030         https://bugs.webkit.org/show_bug.cgi?id=51230
3031         <rdar://problem/8780989>
3032
3033         <rdar://problem/9015250> REGRESSION (WebKit2): Key events not fired for modifier keys
3034
3035         * page/EventHandler.cpp: (WebCore::EventHandler::keyEvent): Moved Caps Lock handling from
3036         WebKits to WebCore, because WebKit shouldn't be smart.
3037
3038 2011-04-04  Steve Falkenburg  <sfalken@apple.com>
3039
3040         Fix Windows build warning.
3041
3042         * WebCore.vcproj/WebCore.vcproj: Exclude EventQueue.cpp in Debug_All build.
3043
3044 2011-04-04  Adam Roben  <aroben@apple.com>
3045
3046         Attempted Mac build fix, part III
3047
3048         * WebCore.exp.in: Export PlatformCALayer::setGeometryFlipped. Also resorted some symbols.
3049
3050 2011-04-04  Andy Estes  <aestes@apple.com>
3051
3052         Fix the Mac build.
3053
3054         * WebCore.exp.in:
3055
3056 2011-04-04  David Dorwin  <ddorwin@chromium.org>
3057
3058         Reviewed by David Levin.
3059
3060         Chromium Mac crashes when entering fullscreen
3061         https://bugs.webkit.org/show_bug.cgi?id=57483
3062
3063         Override extraFullScreenStyleSheet in RenderThemeChromiumMac to avoid hitting the ASSERT_NOT_REACHED in RenderThemeMac.
3064
3065         * WebCore.gyp/WebCore.gyp:
3066         * rendering/RenderThemeChromiumMac.h:
3067         * rendering/RenderThemeChromiumMac.mm:
3068         (WebCore::RenderThemeChromiumMac::extraFullScreenStyleSheet):
3069
3070 2011-04-04  Adam Roben  <aroben@apple.com>
3071
3072         Attempted Mac build fix, part II
3073
3074         * WebCore.xcodeproj/project.pbxproj: Marked PlatformCALayerClient.h and
3075         PlatformCAAnimation.h as private so that WebKit2 can #include them (transitively).
3076
3077 2011-04-04  Steve Falkenburg  <sfalken@apple.com>
3078
3079         Reviewed by Adam Roben.
3080
3081         Remove unused AnalyzeWithLargeStack code from Windows build files
3082         https://bugs.webkit.org/show_bug.cgi?id=57771
3083         
3084         This was used for us to build with prefast automatically,
3085         but it is out-of-date and hasn't been used for some time.
3086         Removing completely for now.
3087
3088         * WebCore.vcproj/WebCore.vcproj:
3089         * WebCore.vcproj/WebCorePreBuild.cmd:
3090
3091 2011-04-01  Matthew Delaney  <mdelaney@apple.com>
3092
3093         Reviewed by Simon Fraser.
3094
3095         [CG] Do not accelerate small canvases
3096         https://bugs.webkit.org/show_bug.cgi?id=57596
3097
3098         No new tests. No outward behavior changes.
3099
3100         * platform/graphics/cg/ImageBufferCG.cpp:
3101
3102 2011-04-04  Adam Roben  <aroben@apple.com>
3103
3104         Attempted Mac build fix
3105
3106         * WebCore.xcodeproj/project.pbxproj: Marked PlatformCALayer.h and GraphicsLayerCA.h private
3107         so that WebKit can #include them.
3108
3109 2011-04-04  Malcolm MacLeod  <mmacleod@webmail.co.za>
3110
3111         Reviewed by Kevin Ollivier.
3112
3113         [wx] Implement support for temporary files.
3114         
3115         https://bugs.webkit.org/show_bug.cgi?id=57772
3116
3117         * platform/FileSystem.h:
3118         * platform/wx/FileSystemWx.cpp:
3119         (WebCore::getFileModificationTime):
3120         (WebCore::openTemporaryFile):
3121         (WebCore::closeFile):
3122         (WebCore::writeToFile):
3123
3124 2011-04-01  Oliver Hunt  <oliver@apple.com>
3125
3126         Reviewed by Geoffrey Garen.
3127
3128         Make StructureChain GC allocated
3129         https://bugs.webkit.org/show_bug.cgi?id=56695
3130
3131         Update for new Structure marking function
3132
3133         * bindings/js/JSDOMGlobalObject.cpp:
3134         (WebCore::JSDOMGlobalObject::markChildren):
3135
3136 2011-04-04  Pavel Feldman  <pfeldman@google.com>
3137
3138         Reviewed by Yury Semikhatsky.
3139
3140         Web Inspector: add support for the enumerated types in the protocol.
3141         https://bugs.webkit.org/show_bug.cgi?id=57761
3142
3143         * inspector/Inspector.json:
3144         * inspector/InspectorDebuggerAgent.cpp:
3145         (WebCore::InspectorDebuggerAgent::setPauseOnExceptions):
3146         * inspector/InspectorDebuggerAgent.h:
3147         * inspector/InspectorInstrumentation.cpp:
3148         (WebCore::InspectorInstrumentation::resourceRetrievedByXMLHttpRequestImpl):
3149         (WebCore::InspectorInstrumentation::scriptImportedImpl):
3150         * inspector/InspectorResourceAgent.cpp:
3151         (WebCore::cachedResourceTypeString):
3152         (WebCore::InspectorResourceAgent::didReceiveResponse):
3153         (WebCore::InspectorResourceAgent::setInitialScriptContent):
3154         (WebCore::InspectorResourceAgent::setInitialXHRContent):
3155         * inspector/InspectorResourceAgent.h:
3156         * inspector/front-end/ScriptsPanel.js:
3157         * inspector/generate-inspector-idl:
3158
3159 2011-04-04  Yury Semikhatsky  <yurys@chromium.org>
3160
3161         Reviewed by Pavel Feldman.
3162
3163         Web Inspector: InspectorRuntimeAgent should not depend on Page
3164         https://bugs.webkit.org/show_bug.cgi?id=57759
3165
3166         Descendants of InspectorRuntimeAgent should implement a method providing access to the default
3167         inspected state used for console evaluations.
3168
3169         * inspector/InspectorAgent.cpp:
3170         (WebCore::InspectorAgent::InspectorAgent): runtime agent is created and deleted along with other agents.
3171         (WebCore::InspectorAgent::setFrontend):
3172         * inspector/InspectorAgent.h:
3173         * inspector/InspectorRuntimeAgent.cpp:
3174         (WebCore::InspectorRuntimeAgent::create):
3175         (WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
3176         (WebCore::InspectorRuntimeAgent::evaluate):
3177         * inspector/InspectorRuntimeAgent.h:
3178         (WebCore::InspectorRuntimeAgent::InspectedStateProvider::~InspectedStateProvider):
3179
3180 2011-04-04  Yong Li  <yoli@rim.com>
3181
3182         Reviewed by Antonio Gomes.
3183
3184         https://bugs.webkit.org/show_bug.cgi?id=55969
3185         Fix the issue that document state is not saved when
3186         going backward and ending up with error page.
3187
3188         Test: platform/qt/fast/history/back-to-unreachable-url-then-forward.html
3189
3190         (For manual test, load a non-existent html first, then load
3191         fast/history/resources/check-scroll-position.html, then go
3192         back and go forward. If it doesn't show "SUCCESS" at the bottom
3193         of the page, your browser has failed the test)
3194
3195         * loader/FrameLoader.cpp:
3196         (WebCore::FrameLoader::load):
3197
3198 2011-04-04  Sergio Villar Senin  <svillar@igalia.com>
3199
3200         Reviewed by Martin Robinson.
3201
3202         [GTK] Fix make distcheck for 1.4.0
3203         https://bugs.webkit.org/show_bug.cgi?id=57750
3204
3205         Added a missing header file to the Makefile
3206
3207         * GNUmakefile.am:
3208
3209 2011-04-04  Martin Robinson  <mrobinson@igalia.com>
3210
3211         Reviewed by Xan Lopez.
3212
3213         [GTK] http/tests/plugins/post-url-file.html fails on GTK+
3214         https://bugs.webkit.org/show_bug.cgi?id=55826
3215
3216         Correct the implementation of handlePostReadFile which uses GIO APIs and
3217         actually resizes the buffer to fit the entire size of the file data. This
3218         was likely leading to memory corruption until now.
3219
3220         * plugins/gtk/PluginViewGtk.cpp:
3221         (WebCore::PluginView::handlePostReadFile): Fix this method.
3222
3223 2011-04-04  Andrey Kosyakov  <caseq@chromium.org>
3224
3225         Reviewed by Yury Semikhatsky.
3226
3227         Web Inspector: [Extensions API] add notifications on panels shown/hidden
3228         https://bugs.webkit.org/show_bug.cgi?id=57752
3229
3230         * inspector/front-end/ExtensionAPI.js:
3231         (WebInspector.injectedExtensionAPI.PanelImpl):
3232         * inspector/front-end/ExtensionServer.js:
3233         (WebInspector.ExtensionServer.prototype.notifyPanelShown):
3234         (WebInspector.ExtensionServer.prototype.notifyPanelHidden):
3235         * inspector/front-end/Panel.js:
3236         (WebInspector.Panel.prototype.show):
3237         (WebInspector.Panel.prototype.hide):
3238
3239 2011-04-04  Pavel Podivilov  <podivilov@chromium.org>
3240
3241         Reviewed by Yury Semikhatsky.
3242
3243         Web Inspector: search in resources panel is broken.
3244         https://bugs.webkit.org/show_bug.cgi?id=57631
3245
3246         Search in resources panel should trigger source frame content load.
3247
3248         * inspector/front-end/Panel.js:
3249         (WebInspector.Panel.prototype.jumpToNextSearchResult):
3250         (WebInspector.Panel.prototype.jumpToPreviousSearchResult):
3251         * inspector/front-end/ResourcesPanel.js:
3252         * inspector/front-end/SearchController.js:
3253         (WebInspector.SearchController.prototype.handleShortcut):
3254         (WebInspector.SearchController.prototype.focusSearchField):
3255         * inspector/front-end/SourceFrame.js:
3256         (WebInspector.SourceFrame.prototype.show):
3257         (WebInspector.SourceFrame.prototype._ensureContentLoaded):
3258         (WebInspector.SourceFrame.prototype.performSearch):
3259
3260 2011-04-03  Eric Seidel  <eric@webkit.org>
3261
3262         Reviewed by Ryosuke Niwa.
3263
3264         Split out UnicodeBidi enum into its own header (to allow use in platform)
3265         https://bugs.webkit.org/show_bug.cgi?id=57722
3266
3267         unicode-bidi is a CSS concept.  However the same concept is really needed throughout
3268         the bidi code in platform as well.  So I'm moving the enum to platform.
3269         The only part of the enum which doesn't make much sense to platform/ is "normal".
3270
3271         * WebCore.xcodeproj/project.pbxproj:
3272         * css/CSSPrimitiveValueMappings.h:
3273         * platform/text/UnicodeBidi.h: Added.
3274         * rendering/style/RenderStyle.h:
3275         * rendering/style/RenderStyleConstants.h:
3276
3277 2011-04-04  Andrey Adaikin  <aandrey@google.com>
3278
3279         Reviewed by Yury Semikhatsky.
3280
3281         Web Inspector: Highlighted search tokens would not be shown on long lines in the text viewer
3282         https://bugs.webkit.org/show_bug.cgi?id=57749
3283
3284         * inspector/front-end/TextViewer.js:
3285         (WebInspector.TextEditorMainPanel.prototype.markAndRevealRange):
3286         (WebInspector.TextEditorMainPanel.prototype._paintLine):
3287
3288 2011-04-04  Alexander Pavlov  <apavlov@chromium.org>
3289
3290         Reviewed by Yury Semikhatsky.
3291
3292         Web Inspector: Incorrectly reports warning on missing/incorrect content-type for 304s
3293         https://bugs.webkit.org/show_bug.cgi?id=48525
3294
3295         * inspector/front-end/Resource.js:
3296         (WebInspector.Resource.prototype._mimeTypeIsConsistentWithType):
3297
3298 2011-04-01  Alexander Pavlov  <apavlov@chromium.org>
3299
3300         Reviewed by Yury Semikhatsky.
3301
3302         Web Inspector: appropriateSelectorForNode() invokes the "localName" getter on DOMNode rather than function
3303         https://bugs.webkit.org/show_bug.cgi?id=57632
3304
3305         Moved the affected method onto the DOMNode.prototype as "appropriateSelectorFor".
3306
3307         * inspector/front-end/DOMAgent.js:
3308         (WebInspector.DOMNode.prototype.appropriateSelectorFor):
3309         * inspector/front-end/EventListenersSidebarPane.js:
3310         ():
3311         * inspector/front-end/StylesSidebarPane.js:
3312         (WebInspector.StylesSidebarPane.prototype.addBlankSection):
3313         * inspector/front-end/utilities.js:
3314
3315 2011-04-04  Andrey Kosyakov  <caseq@chromium.org>
3316
3317         Unreviewed. Followup to an incomplete commit in r82806.
3318
3319         * inspector/front-end/ExtensionAPI.js:
3320         (WebInspector.injectedExtensionAPI.PanelWithSidebarImpl.prototype.createSidebarPane):
3321         (WebInspector.injectedExtensionAPI.ExtensionSidebarPaneImpl):
3322         (WebInspector.injectedExtensionAPI.ExtensionSidebarPaneImpl.prototype.setHeight):
3323         (WebInspector.injectedExtensionAPI.ExtensionSidebarPaneImpl.prototype.setExpression):
3324         (WebInspector.injectedExtensionAPI):
3325         * inspector/front-end/ExtensionPanel.js:
3326         (WebInspector.ExtensionSidebarPane):
3327         (WebInspector.ExtensionSidebarPane.prototype.setPage):
3328         (WebInspector.ExtensionSidebarPane.prototype._setObject):
3329         * inspector/front-end/ExtensionServer.js:
3330         (WebInspector.ExtensionServer):
3331         (WebInspector.ExtensionServer.prototype.notifyExtensionSidebarUpdated):
3332         (WebInspector.ExtensionServer.prototype._onCreatePanel):
3333         (WebInspector.ExtensionServer.prototype._onCreateSidebarPane):
3334         (WebInspector.ExtensionServer.prototype.createClientIframe):
3335         (WebInspector.ExtensionServer.prototype._onSetSidebarContent):
3336
3337 2011-04-04  Yury Semikhatsky  <yurys@chromium.org>
3338
3339         Unreviewed. Fix Qt minimal build.
3340
3341         * inspector/InspectorFrontendChannel.h:
3342
3343 2011-04-01  Sergey Vorobyev  <sergeyvorobyev@google.com>
3344
3345         Reviewed by Yury Semikhatsky.
3346
3347         Web Inspector: Separate sendMessageToFrontend function
3348         from InspectorClient to individual interface.
3349         https://bugs.webkit.org/show_bug.cgi?id=57548
3350
3351         Refactoring - covered with existing inspector tests.
3352
3353         * GNUmakefile.am:
3354         * WebCore.gypi:
3355         * WebCore.vcproj/WebCore.vcproj:
3356         * WebCore.xcodeproj/project.pbxproj:
3357         * inspector/CodeGeneratorInspector.pm:
3358         * inspector/InspectorClient.h:
3359         * inspector/InspectorFrontendChannel.h: Added.
3360         (WebCore::InspectorFrontendChannel::~InspectorFrontendChannel):
3361
3362 2011-04-04  Nico Weber  <thakis@chromium.org>
3363
3364         Reviewed by Eric Seidel.
3365
3366         Prefer a using directive over qualified names in LocalizedNumberICU.cpp
3367         https://bugs.webkit.org/show_bug.cgi?id=57742
3368
3369         Requested by ap in https://bugs.webkit.org/show_bug.cgi?id=57715
3370
3371         * platform/text/LocalizedNumberICU.cpp:
3372         (WebCore::createFormatterForCurrentLocale):
3373         (WebCore::numberFormatter):
3374         (WebCore::parseLocalizedNumber):
3375         (WebCore::formatLocalizedNumber):
3376
3377 2011-04-04  Andrey Adaikin  <aandrey@google.com>
3378
3379         Reviewed by Yury Semikhatsky.
3380
3381         Web Inspector: Breakpoints in the gutter stay static while editing the text
3382         https://bugs.webkit.org/show_bug.cgi?id=57616
3383
3384         * inspector/front-end/SourceFrame.js:
3385         (WebInspector.SourceFrame):
3386         (WebInspector.SourceFrame.prototype._saveViewerState):
3387         (WebInspector.SourceFrame.prototype._restoreViewerState):
3388         (WebInspector.SourceFrame.prototype._endEditing):
3389         (WebInspector.SourceFrame.prototype._lineNumberAfterEditing):
3390         (WebInspector.SourceFrame.prototype.addBreakpoint):
3391         (WebInspector.SourceFrame.prototype.removeBreakpoint):
3392         * inspector/front-end/TextViewer.js:
3393         (WebInspector.TextViewer.prototype._syncDecorationsForLine):
3394         (WebInspector):
3395         (WebInspector.TextEditorChunkedPanel.prototype.removeDecoration):
3396         (WebInspector.TextEditorChunkedPanel.prototype.makeLineAChunk):
3397         (WebInspector.TextEditorChunkedPanel.prototype._splitChunkOnALine):
3398         (WebInspector.TextEditorMainPanel.prototype._splitChunkOnALine):
3399
3400 2011-04-04  Ilya Tikhonovsky  <loislo@chromium.org>
3401
3402         Reviewed by Yury Semikhatsky.
3403
3404         Web Inspector: remove obsolete doc generating code from CodeGenerator.
3405         https://bugs.webkit.org/show_bug.cgi?id=57748
3406
3407         * inspector/CodeGeneratorInspector.pm:
3408
3409 2011-04-04  Andrey Kosyakov  <caseq@chromium.org>
3410
3411         Reviewed by Yury Semikhatsky.
3412
3413         Web Inspector: [Extensions API] Merge WatchExpressionSidebarPane into ExtensionSidebarPane
3414         https://bugs.webkit.org/show_bug.cgi?id=57622
3415
3416         Merged WatchExpressionSidebarPane into ExtensionSidebarPane, added setPage(url).
3417         Fixed wrong getter in schema (scripts -> elements)
3418
3419         * inspector/front-end/ExtensionAPI.js:
3420         (WebInspector.injectedExtensionAPI.WatchExpressionSidebarPaneImpl.prototype.setObject):
3421         (WebInspector.injectedExtensionAPI.WatchExpressionSidebarPaneImpl.prototype.setPage):
3422         * inspector/front-end/ExtensionAPISchema.json:
3423         * inspector/front-end/ExtensionServer.js:
3424         (WebInspector.ExtensionServer.prototype._onSetSidebarPage):
3425
3426 2011-04-04  Ilya Tikhonovsky  <loislo@chromium.org>
3427
3428         Reviewed by Pavel Feldman.
3429
3430         Web Inspector: introduce support of 'optional' flag for command arguments.
3431         https://bugs.webkit.org/show_bug.cgi?id=57698
3432
3433         * inspector/CodeGeneratorInspector.pm:
3434         * inspector/Inspector.json:
3435         * inspector/InspectorDebuggerAgent.cpp:
3436         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
3437         (WebCore::InspectorDebuggerAgent::setBreakpoint):
3438         (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
3439         * inspector/InspectorDebuggerAgent.h:
3440         * inspector/InspectorPageAgent.cpp:
3441         (WebCore::InspectorPageAgent::reloadPage):
3442         * inspector/InspectorPageAgent.h:
3443         * inspector/InspectorResourceAgent.cpp:
3444         (WebCore::InspectorResourceAgent::getResourceContent):
3445         * inspector/InspectorResourceAgent.h:
3446         * inspector/InspectorRuntimeAgent.cpp:
3447         (WebCore::InspectorRuntimeAgent::evaluate):
3448         * inspector/InspectorRuntimeAgent.h:
3449         * inspector/generate-inspector-idl:
3450
3451 2011-04-04  Yury Semikhatsky  <yurys@chromium.org>
3452
3453         Reviewed by Pavel Feldman.
3454
3455         Web Inspector: InjectedScriptManager should not try to access inspected window in case of workers
3456         https://bugs.webkit.org/show_bug.cgi?id=57637
3457
3458         * bindings/js/JSInjectedScriptManager.cpp:
3459         (WebCore::InjectedScriptManager::injectedScriptFor):
3460         * bindings/v8/custom/V8InjectedScriptManager.cpp:
3461         (WebCore::InjectedScriptManager::injectedScriptFor):
3462         * inspector/InjectedScript.cpp:
3463         (WebCore::InjectedScript::InjectedScript):
3464         (WebCore::InjectedScript::canAccessInspectedWindow):
3465         * inspector/InjectedScript.h:
3466         * inspector/InjectedScriptManager.cpp:
3467         (WebCore::InjectedScriptManager::createForPage):
3468         (WebCore::InjectedScriptManager::createForWorker):
3469         (WebCore::InjectedScriptManager::InjectedScriptManager): access check function is passed as a parameter to the constructor
3470         and it depends on which type of context we're inspecting(worker or page).
3471         (WebCore::InjectedScriptManager::canAccessInspectedWorkerContext):
3472         * inspector/InjectedScriptManager.h:
3473         * inspector/InspectorController.cpp:
3474         (WebCore::InspectorController::InspectorController):
3475
3476 2011-04-04  Ryuan Choi  <ryuan.choi@samsung.com>
3477
3478         Reviewed by Eric Seidel.
3479
3480         V8StringCallback.cpp requires V8Binding.h
3481         https://bugs.webkit.org/show_bug.cgi?id=57699
3482
3483         No new tests required because of just adding header file.
3484
3485         * bindings/scripts/CodeGeneratorV8.pm:
3486
3487 2011-04-03  Ryuan Choi  <ryuan.choi@samsung.com>
3488
3489         Reviewed by Eric Seidel.
3490
3491         [CMAKE] Clean duplicated files in WebCore_Sources
3492         https://bugs.webkit.org/show_bug.cgi?id=57741
3493
3494         No new tests, Only duplicated files were removed.
3495
3496         * CMakeLists.txt:
3497
3498 2011-04-03  Luke Macpherson   <macpherson@chromium.org>