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