2010-07-02 Zhenyao Mo <zmo@google.com>
[WebKit.git] / WebCore / ChangeLog
1 2010-07-02  Zhenyao Mo  <zmo@google.com>
2
3         Reviewed by Dimitri Glazkov.
4
5         linkProgram should fail when vertex/fragment shaders are not both present
6         https://bugs.webkit.org/show_bug.cgi?id=41380
7
8         Test: fast/canvas/webgl/program-test.html
9
10         * html/canvas/WebGLProgram.cpp: Add flag for link failure due to missing shaders.
11         (WebCore::WebGLProgram::WebGLProgram):
12         * html/canvas/WebGLProgram.h: Add interface for linkFailure flag.
13         (WebCore::WebGLProgram::isLinkFailureFlagSet):
14         (WebCore::WebGLProgram::setLinkFailureFlag):
15         * html/canvas/WebGLRenderingContext.cpp:
16         (WebCore::WebGLRenderingContext::getProgramParameter): Intercept when linkFailureFlag is set.
17         (WebCore::WebGLRenderingContext::linkProgram): Check if there are missing shaders and don't link if yes.
18         * html/canvas/WebGLShader.cpp: Cache shader type.
19         (WebCore::WebGLShader::WebGLShader):
20         * html/canvas/WebGLShader.h: Ditto.
21         (WebCore::WebGLShader::getType):
22
23 2010-07-02  Qi Zhang  <qi.2.zhang@nokia.com>
24
25         Reviewed by Laszlo Gombos.
26
27         [Qt]  Failed on http://philip.html5.org/tests/canvas/suite/tests/2d.drawImage.negativesource.html
28
29         Support negative width and height in canvas image draw
30
31         * platform/graphics/FloatRect.h:
32         * platform/graphics/qt/FloatRectQt.cpp:
33         (WebCore::FloatRect::normalized):
34         * platform/graphics/qt/ImageQt.cpp:
35         (WebCore::BitmapImage::draw):
36
37 2010-06-24  Dimitri Glazkov  <dglazkov@chromium.org>
38
39         Reviewed by Alexey Proskuryakov.
40
41         REGRESSION: Enter does not trigger submit of forms when focus is on select.
42         https://bugs.webkit.org/show_bug.cgi?id=39532
43
44         Restore behavior where hitting "Enter" on a select element attempts to submit
45         form implicitly.
46
47         * dom/SelectElement.cpp:
48         (WebCore::SelectElement::menuListDefaultEventHandler): Added htmlForm argument,
49             and attempting to submit implicitly.
50         (WebCore::SelectElement::listBoxDefaultEventHandler): Ditto.
51         (WebCore::SelectElement::defaultEventHandler): Plumbed through htmlForm argument.
52         * dom/SelectElement.h: Added htmlForm argument to method declaration.
53         * html/HTMLSelectElement.cpp:
54         (WebCore::HTMLSelectElement::defaultEventHandler): Changed to provide submitting form
55             as the argument.
56
57 2010-07-02  Kent Tamura  <tkent@chromium.org>
58
59         Reviewed by Darin Fisher.
60
61         [Chromium] Support indeterminate checkbox for Linux, and a small fix for Windows
62         https://bugs.webkit.org/show_bug.cgi?id=41508
63
64         * rendering/RenderThemeChromiumSkia.cpp:
65         (WebCore::RenderThemeChromiumSkia::paintCheckbox):
66           Use dedicated images for indeterminate states.
67         * rendering/RenderThemeChromiumWin.cpp:
68         (WebCore::RenderThemeChromiumWin::determineClassicState):
69           Do not use DFCS_CHECKED in a case of indeterminate state in
70           order to have consistent appearance of indeterminate checkbox.
71
72 2010-07-02  Brent Fulgham  <bfulgham@webkit.org>
73
74         Reviewed by Gustavo Noronha Silva.
75
76         Fixes https://bugs.webkit.org/show_bug.cgi?id=41323.
77         Provides an implementation of the 'squiggle' used for
78         bad grammar or spelling, based on the Pango logic used
79         by the GTK builds.
80
81         No new tests. Covered by LayoutTests/editing/spelling
82
83         * WebCore.vcproj/WebCore.vcproj: Add new file holding underline
84         implementation, set to build only for WinCairo port.
85         * platform/graphics/cairo/DrawErrorUnderline.cpp: Added.
86         (drawErrorUnderline): New file containing the squiggle drawing
87         logic based on the Pango implementation.  Placed in its own file
88         to isolate licenses.
89         * platform/graphics/cairo/GraphicsContextCairo.cpp:
90         (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
91         Have WinCairo build call new 'drawErrorUnderline' implementation.
92
93 2010-07-02  Martin Robinson  <mrobinson@igalia.com>
94
95         Reviewed by Gustavo Noronha Silva.
96
97         [GTK] Separate DerivedSources per-project
98         https://bugs.webkit.org/show_bug.cgi?id=41109
99
100         Generate WebCore derived sources in <builddir>/DerivedSources/WebCore.
101
102         * GNUmakefile.am:
103
104 2010-07-02  Zhenyao Mo  <zmo@google.com>
105
106         Reviewed by Dimitri Glazkov.
107
108         Implement OpenGL ES 2.0 semantics for vertex attribute 0
109         https://bugs.webkit.org/show_bug.cgi?id=41300
110
111         Test: fast/canvas/webgl/gl-bind-attrib-location-test.html
112               fast/canvas/webgl/gl-vertex-attrib.html
113
114         * html/canvas/WebGLProgram.cpp:
115         (WebCore::WebGLProgram::numActiveAttribLocations): const.
116         (WebCore::WebGLProgram::getActiveAttribLocation): const.
117         (WebCore::WebGLProgram::isUsingVertexAttrib0): Determine whether vertex attrib 0 is used by the program.
118         * html/canvas/WebGLProgram.h: Declare isUsingVertexAttrib0.
119         * html/canvas/WebGLRenderingContext.cpp:
120         (WebCore::WebGLRenderingContext::WebGLRenderingContext): Deal with vertex attrib 0.
121         (WebCore::WebGLRenderingContext::disableVertexAttribArray): Ditto.
122         (WebCore::WebGLRenderingContext::drawArrays): Ditto.
123         (WebCore::WebGLRenderingContext::drawElements): Ditto.
124         (WebCore::WebGLRenderingContext::getVertexAttrib): Use cached value instead of calling glGetVertexAtrtrib.
125         (WebCore::WebGLRenderingContext::vertexAttrib1f): Validate input, deal with vertex attrib 0.
126         (WebCore::WebGLRenderingContext::vertexAttrib1fv): Ditto.
127         (WebCore::WebGLRenderingContext::vertexAttrib2f): Ditto.
128         (WebCore::WebGLRenderingContext::vertexAttrib2fv): Ditto.
129         (WebCore::WebGLRenderingContext::vertexAttrib3f): Ditto.
130         (WebCore::WebGLRenderingContext::vertexAttrib3fv): Ditto.
131         (WebCore::WebGLRenderingContext::vertexAttrib4f): Ditto.
132         (WebCore::WebGLRenderingContext::vertexAttrib4fv): Ditto.
133         (WebCore::WebGLRenderingContext::vertexAttribPointer): Ditto.
134         (WebCore::WebGLRenderingContext::handleNPOTTextures): Move isGLES2Compliant() to caller.
135         (WebCore::WebGLRenderingContext::vertexAttribImpl): Helper for vertexAttribNfv.
136         (WebCore::WebGLRenderingContext::initVertexAttrib0): Initialize vertex attrib 0.
137         (WebCore::WebGLRenderingContext::simulateVertexAttrib0): Simulate vertex attrib 0.
138         (WebCore::WebGLRenderingContext::restoreStatesAfterVertexAttrib0Simulation): Restore states after simulating vertex attrib 0.
139         * html/canvas/WebGLRenderingContext.h:
140         (WebCore::WebGLRenderingContext::VertexAttribState::VertexAttribState): Tracking full vertex attrib states.
141         (WebCore::WebGLRenderingContext::VertexAttribState::initValue): Init value to [0,0,0,1].
142
143 2010-07-02  Zhenyao Mo  <zmo@google.com>
144
145         Reviewed by Dimitri Glazkov.
146
147         Need to validate the size of the incoming arrays for uniform* functions
148         https://bugs.webkit.org/show_bug.cgi?id=41383
149
150         * html/canvas/WebGLRenderingContext.cpp: Validate input array size.
151         (WebCore::WebGLRenderingContext::uniform1fv):
152         (WebCore::WebGLRenderingContext::uniform1iv):
153         (WebCore::WebGLRenderingContext::uniform2fv):
154         (WebCore::WebGLRenderingContext::uniform2iv):
155         (WebCore::WebGLRenderingContext::uniform3fv):
156         (WebCore::WebGLRenderingContext::uniform3iv):
157         (WebCore::WebGLRenderingContext::uniform4fv):
158         (WebCore::WebGLRenderingContext::uniform4iv):
159         (WebCore::WebGLRenderingContext::uniformMatrix2fv):
160         (WebCore::WebGLRenderingContext::uniformMatrix3fv):
161         (WebCore::WebGLRenderingContext::uniformMatrix4fv):
162         (WebCore::WebGLRenderingContext::validateUniformParameters):
163         (WebCore::WebGLRenderingContext::validateUniformMatrixParameters):
164         * html/canvas/WebGLRenderingContext.h: Add helper functions.
165
166 2010-07-02  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
167
168         Reviewed by Simon Hausmann.
169
170         [Qt] Canvas arcTo() should draw straight line to p1 if p0, p1 and p2 are collinear
171
172         The implementation of PathQt's addArcTo() was not float-safe and also had
173         a case where it drew an 'infinite' line, which is not part of the spec.
174
175         http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-arcto
176
177         We now use qFuzzyCompare() in both cases. The method isPointOnPathBorder()
178         also had the same problem, and was refactored a bit in the process of fixing
179         the bug.
180
181         Initial patch by Andreas Kling.
182
183         https://bugs.webkit.org/show_bug.cgi?id=41412
184
185         * platform/graphics/qt/PathQt.cpp:
186
187 2010-07-02  Yury Semikhatsky  <yurys@chromium.org>
188
189         Reviewed by Pavel Feldman.
190
191         [v8] Web Inspector: inspected page crashes on attempt to change iframe's src attribute
192         https://bugs.webkit.org/show_bug.cgi?id=41511
193
194         Tests: fast/events/popup-blocked-from-fake-user-gesture.html
195                http/tests/inspector/change-iframe-src.html
196
197         * bindings/v8/ScriptController.cpp:
198         (WebCore::ScriptController::processingUserGesture): use V8Proxy from the ScriptController instead of one
199         from the call stack. Get event directly from hidden property to avoid unnecessary checks.
200         * bindings/v8/V8AbstractEventListener.cpp:
201         (WebCore::V8AbstractEventListener::invokeEventHandler):
202         * bindings/v8/V8HiddenPropertyName.h:
203         * bindings/v8/custom/V8DOMWindowCustom.cpp:
204         (WebCore::V8DOMWindow::eventAccessorGetter):
205         (WebCore::V8DOMWindow::eventAccessorSetter):
206
207 2010-07-02  Adam Barth  <abarth@webkit.org>
208
209         Reviewed by Eric Seidel.
210
211         Fix tokenization of <!----->
212         https://bugs.webkit.org/show_bug.cgi?id=41505
213
214         I noticed this error when browsing through the HTML5lib failures.
215         We're adding an extra character to the comment token, contrary to what
216         the spec says to do.
217
218         * html/HTMLTokenizer.cpp:
219         (WebCore::HTMLTokenizer::nextToken):
220
221 2010-07-02  Adam Barth  <abarth@webkit.org>
222
223         Reviewed by Eric Seidel.
224
225         Implement processFakePEndTagIfPInScope
226         https://bugs.webkit.org/show_bug.cgi?id=41503
227
228         This is a common idiom because <p> likes to close itself.
229
230         * html/HTMLTreeBuilder.cpp:
231         (WebCore::HTMLTreeBuilder::processFakePEndTagIfPInScope):
232         (WebCore::HTMLTreeBuilder::processStartTag):
233         * html/HTMLTreeBuilder.h:
234
235 2010-07-02  Adam Barth  <abarth@webkit.org>
236
237         Reviewed by Eric Seidel.
238
239         Implement AfterAfterBodyMode
240         https://bugs.webkit.org/show_bug.cgi?id=41501
241
242         In implementing this mode, I noticed a bug in the character processing
243         of the AfterBodyMode, which I fixed by adding a break statement.  Also,
244         to get one of the new tests to pass, I needed to implement one
245         notImplemented() in the InBody insertion mode.  Yay for testing.
246
247         * html/HTMLTreeBuilder.cpp:
248         (WebCore::HTMLTreeBuilder::processStartTag):
249         (WebCore::HTMLTreeBuilder::processEndTag):
250         (WebCore::HTMLTreeBuilder::processComment):
251         (WebCore::HTMLTreeBuilder::processCharacter):
252         (WebCore::HTMLTreeBuilder::processEndOfFile):
253
254 2010-07-02  Sheriff Bot  <webkit.review.bot@gmail.com>
255
256         Unreviewed, rolling out r62371.
257         http://trac.webkit.org/changeset/62371
258         https://bugs.webkit.org/show_bug.cgi?id=41515
259
260         "Breaks media/controls-drag-timebar.html on 32-Bit Release"
261         (Requested by philn-tp on #webkit).
262
263         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
264         (WebCore::MediaPlayerPrivateGStreamer::maxTimeSeekable):
265         (WebCore::MediaPlayerPrivateGStreamer::updateStates):
266
267 2010-06-28  Philippe Normand  <pnormand@igalia.com>
268
269         Reviewed by Xan Lopez.
270
271         [GStreamer] can't seek past maxTimeLoaded value
272         https://bugs.webkit.org/show_bug.cgi?id=40526
273
274         Extended the seekable range to the whole media. This allows video
275         played with progressive download to be seeked past the current
276         buffered position.
277
278         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
279         (WebCore::MediaPlayerPrivateGStreamer::maxTimeSeekable):
280         (WebCore::MediaPlayerPrivateGStreamer::updateStates):
281
282 2010-07-02  Adam Barth  <abarth@webkit.org>
283
284         Reviewed by Eric Seidel.
285
286         Implement AfterBodyMode for HTML5 tree builder
287         https://bugs.webkit.org/show_bug.cgi?id=41500
288
289         In the coarse of implementing this state, I ran into an ASSERT in how
290         </br> tags where handled, which I fixed.  Technically, that could be a
291         separate patch, but it seemed harmless to include it here (with tests).
292
293         * html/HTMLTreeBuilder.cpp:
294         (WebCore::HTMLTreeBuilder::processStartTag):
295         (WebCore::HTMLTreeBuilder::processEndTag):
296         (WebCore::HTMLTreeBuilder::processComment):
297         (WebCore::HTMLTreeBuilder::processCharacter):
298         (WebCore::HTMLTreeBuilder::processEndOfFile):
299         (WebCore::HTMLTreeBuilder::insertCommentOnHTMLHtmlElement):
300         * html/HTMLTreeBuilder.h:
301
302 2010-07-02  Adam Barth  <abarth@webkit.org>
303
304         Reviewed by Eric Seidel.
305
306         Handle <base> and friends in AfterHeadMode
307         https://bugs.webkit.org/show_bug.cgi?id=41502
308
309         Implement notImplemented() per spec.
310
311         * html/HTMLTreeBuilder.cpp:
312         (WebCore::HTMLTreeBuilder::processStartTag):
313
314 2010-07-01  Oliver Hunt  <oliver@apple.com>
315
316         Build fix
317
318         * dom/Document.h:
319
320 2010-07-01  Oliver Hunt  <oliver@apple.com>
321
322         Reviewed by Maciej Stachowiak.
323
324         Add a FixedArray template to encapsulate fixed length arrays
325         https://bugs.webkit.org/show_bug.cgi?id=41506
326
327         Add forwarding header, and replace a few fixed length arrays
328         with the new FixedArray type.
329
330         * ForwardingHeaders/wtf/FixedArray.h: Added.
331         * dom/Document.h:
332         * platform/graphics/GlyphMetricsMap.h:
333
334 2010-07-01  Simon Fraser  <simon.fraser@apple.com>
335
336         No review.
337
338         Fix a link warning in 32-bit by not explicitly exporting WebCore::GraphicsLayer::syncCompositingStateForThisLayerOnly().
339
340         * WebCore.AcceleratedCompositing.exp:
341
342 2010-07-01  Tony Gentilcore  <tonyg@chromium.org>
343
344         Reviewed by Dimitri Glazkov.
345
346         Add window.performance.navigation namespace
347         https://bugs.webkit.org/show_bug.cgi?id=41442
348
349         Adds window.performance.navigation namespace consisting of ".type"
350         and ".redirectCount". As part of this change, I renmaed "NavigationTiming"
351         to just "Timing" to avoid confusion.
352
353         No new tests because tests will be added in a subsequent patch when
354         functionality is added.
355
356         * Android.mk:
357         * CMakeLists.txt:
358         * DerivedSources.cpp:
359         * DerivedSources.make:
360         * GNUmakefile.am:
361         * WebCore.gypi:
362         * WebCore.pri:
363         * WebCore.pro:
364         * WebCore.vcproj/WebCore.vcproj:
365         * WebCore.xcodeproj/project.pbxproj:
366         * page/Navigation.cpp: Added.
367         (WebCore::Navigation::Navigation):
368         (WebCore::Navigation::frame):
369         (WebCore::Navigation::disconnectFrame):
370         (WebCore::Navigation::type):
371         (WebCore::Navigation::redirectCount):
372         * page/Navigation.h: Added.
373         (WebCore::Navigation::create):
374         * page/Navigation.idl: Added.
375         * page/NavigationTiming.cpp: Removed.
376         * page/NavigationTiming.h: Removed.
377         * page/NavigationTiming.idl: Removed.
378         * page/Performance.cpp:
379         (WebCore::Performance::navigation):
380         (WebCore::Performance::timing):
381         * page/Performance.h:
382         * page/Performance.idl:
383         * page/Timing.cpp: Added.
384         (WebCore::Timing::Timing):
385         (WebCore::Timing::frame):
386         (WebCore::Timing::disconnectFrame):
387         (WebCore::Timing::navigationStart):
388         * page/Timing.h: Added.
389         (WebCore::Timing::create):
390         * page/Timing.idl: Added.
391
392 2010-07-01  Daniel Cheng  <dcheng@chromium.org>
393
394         Reviewed by Jian Li.
395
396         [chromium] Dragging a link triggers an assert when accessing event.dataTransfer.types
397         https://bugs.webkit.org/show_bug.cgi?id=41493
398
399         ClipboardChromium::writeURL violates ClipboardChromium's assumption that uriList will always
400         be non-empty if url is valid.
401
402         No new tests.
403
404         * platform/chromium/ClipboardChromium.cpp:
405         (WebCore::ClipboardChromium::writeURL):
406
407 2010-07-01  Andreas Kling  <andreas.kling@nokia.com>
408
409         Reviewed by Tor Arne Vestbø.
410
411         [Qt] Clamp color stops passed to QGradient to 1.0
412         [https://bugs.webkit.org/show_bug.cgi?id=41484
413
414         Fixes an issue where color stops would be silently dropped from radial gradients.
415
416         * platform/graphics/qt/GradientQt.cpp:
417         (WebCore::Gradient::platformGradient):
418
419 2010-07-01  Eric Seidel  <eric@webkit.org>
420
421         Reviewed by Adam Barth.
422
423         HTMLTokenizer should ASSERT that it never emits a null character
424         https://bugs.webkit.org/show_bug.cgi?id=41448
425
426         No functional change, thus no tests.  These ASSERTs would have
427         caught the coding error which caused the trouble in bug 41436
428         (which was fixed by bug 41439).
429
430         * html/HTMLToken.h:
431         (WebCore::HTMLToken::beginStartTag):
432         (WebCore::HTMLToken::beginCharacter):
433         (WebCore::HTMLToken::beginDOCTYPE):
434         (WebCore::HTMLToken::appendToName):
435         (WebCore::HTMLToken::appendToComment):
436         (WebCore::HTMLToken::appendToAttributeName):
437         (WebCore::HTMLToken::appendToAttributeValue):
438         (WebCore::HTMLToken::appendToPublicIdentifier):
439         (WebCore::HTMLToken::appendToSystemIdentifier):
440
441 2010-07-01  Andreas Kling  <andreas.kling@nokia.com>
442
443         Reviewed by Tor Arne Vestbø.
444
445         Canvas: Don't paint with empty radial gradients
446         https://bugs.webkit.org/show_bug.cgi?id=41190
447
448         If a radial gradient has x0==x1 && y0==y1 && r0==r1, don't paint with it.
449
450         * html/canvas/CanvasRenderingContext2D.cpp:
451         (WebCore::CanvasRenderingContext2D::fillRect):
452         * platform/graphics/Gradient.h:
453         (WebCore::Gradient::isZeroSize):
454
455 2010-07-01  Tony Gentilcore  <tonyg@chromium.org>
456
457         Reviewed by Adam Barth.
458
459         Add interface for network platform to pass up timing information
460         https://bugs.webkit.org/show_bug.cgi?id=41437
461
462         The Web Timing feature requires the network platform to expose detailed
463         timing information for the main resource. This patch adds that data to
464         the ResourceResponseBase. Since the 82 bytes of information is only
465         needed for the main resource, it is a RefPtr to avoid using the memory
466         for other resource types.
467
468         No new tests because no new functionality.
469
470         * GNUmakefile.am:
471         * WebCore.gypi:
472         * WebCore.pro:
473         * WebCore.vcproj/WebCore.vcproj:
474         * WebCore.xcodeproj/project.pbxproj:
475         * platform/network/ResourceLoadTiming.h: Added.
476         (WebCore::ResourceLoadTiming::create):
477         (WebCore::ResourceLoadTiming::deepCopy):
478         (WebCore::ResourceLoadTiming::operator==):
479         (WebCore::ResourceLoadTiming::operator!=):
480         (WebCore::ResourceLoadTiming::ResourceLoadTiming):
481         * platform/network/ResourceResponseBase.cpp:
482         (WebCore::ResourceResponseBase::adopt):
483         (WebCore::ResourceResponseBase::copyData):
484         (WebCore::ResourceResponseBase::resourceLoadTiming):
485         (WebCore::ResourceResponseBase::setResourceLoadTiming):
486         (WebCore::ResourceResponseBase::compare):
487         * platform/network/ResourceResponseBase.h:
488
489 2010-07-01  Sheriff Bot  <webkit.review.bot@gmail.com>
490
491         Unreviewed, rolling out r62321.
492         http://trac.webkit.org/changeset/62321
493         https://bugs.webkit.org/show_bug.cgi?id=41494
494
495         Broke the non-win builds. (Requested by dumi on #webkit).
496
497         * dom/ScriptExecutionContext.cpp:
498         (WebCore::ScriptExecutionContext::addOpenDatabase):
499         (WebCore::ScriptExecutionContext::removeOpenDatabase):
500         (WebCore::ScriptExecutionContext::stopDatabases):
501         * dom/ScriptExecutionContext.h:
502         * storage/Database.cpp:
503         (WebCore::Database::openDatabase):
504         (WebCore::Database::Database):
505         (WebCore::Database::markAsDeletedAndClose):
506         (WebCore::ContextRemoveOpenDatabaseTask::create):
507         (WebCore::ContextRemoveOpenDatabaseTask::performTask):
508         (WebCore::ContextRemoveOpenDatabaseTask::isCleanupTask):
509         (WebCore::ContextRemoveOpenDatabaseTask::ContextRemoveOpenDatabaseTask):
510         (WebCore::Database::close):
511         (WebCore::Database::closeImmediately):
512         (WebCore::Database::stop):
513         (WebCore::Database::performPolicyChecks):
514         * storage/Database.h:
515         (WebCore::Database::):
516         (WebCore::Database::stopped):
517         * storage/DatabaseTask.cpp:
518         (WebCore::DatabaseTask::performTask):
519         (WebCore::DatabaseOpenTask::DatabaseOpenTask):
520         (WebCore::DatabaseOpenTask::doPerformTask):
521         (WebCore::DatabaseOpenTask::debugTaskName):
522         (WebCore::DatabaseCloseTask::DatabaseCloseTask):
523         (WebCore::DatabaseCloseTask::doPerformTask):
524         (WebCore::DatabaseCloseTask::debugTaskName):
525         (WebCore::DatabaseTransactionTask::DatabaseTransactionTask):
526         (WebCore::DatabaseTransactionTask::~DatabaseTransactionTask):
527         (WebCore::DatabaseTransactionTask::doPerformTask):
528         (WebCore::DatabaseTransactionTask::debugTaskName):
529         (WebCore::DatabaseTableNamesTask::DatabaseTableNamesTask):
530         (WebCore::DatabaseTableNamesTask::doPerformTask):
531         (WebCore::DatabaseTableNamesTask::debugTaskName):
532         * storage/DatabaseTask.h:
533         (WebCore::DatabaseOpenTask::create):
534         (WebCore::DatabaseCloseTask::create):
535         (WebCore::DatabaseTransactionTask::create):
536         (WebCore::DatabaseTableNamesTask::create):
537         * storage/DatabaseThread.cpp:
538         (WebCore::DatabaseThread::databaseThread):
539         * storage/DatabaseTracker.cpp:
540         (WebCore::DatabaseTracker::addOpenDatabase):
541         * storage/SQLTransaction.cpp:
542         (WebCore::SQLTransaction::executeSQL):
543         (WebCore::SQLTransaction::checkAndHandleClosedDatabase):
544
545 2010-07-01  Xan Lopez  <xlopez@igalia.com>
546
547         Reviewed by Gustavo Noronha.
548
549         [GTK] Stop using GdkRegion in 3.x mode
550         https://bugs.webkit.org/show_bug.cgi?id=41463
551
552         Make us compile without using GdkRegion, since it's gone from GTK+
553         3.x.
554
555         * platform/graphics/IntRect.h:
556         * platform/graphics/cairo/GraphicsContextCairo.cpp:
557         (WebCore::GraphicsContext::drawFocusRing):
558         * platform/graphics/gtk/FontGtk.cpp:
559         (WebCore::cairo_region_shrink):
560         (WebCore::Font::drawComplexText):
561         * platform/gtk/GtkPluginWidget.cpp:
562         (WebCore::GtkPluginWidget::paint):
563         * platform/gtk/RenderThemeGtk.h:
564         * platform/gtk/ScrollbarGtk.cpp:
565         (ScrollbarGtk::paint):
566
567 2010-06-30  Dumitru Daniliuc  <dumi@chromium.org>
568
569         Reviewed by Darin Fisher.
570
571         DB clean up.
572         https://bugs.webkit.org/show_bug.cgi?id=41404
573
574         1. Made all DatabaseTasks internal classes of Database and made
575            the Database methods called by those tasks private.
576         2. Removed the Database::stop{ed}() methods.
577         3. Removed the code that kept track of open databases from
578            ScriptExecutionContext (no longer needed).
579         4. Made minor changes to Database::closeImmediately() to make it
580            possible for DatabaseThread to call that method instead of
581            close().
582         5. Minor fix to DatabaseTracker: addOpenDatabase() should call
583            OriginQuotaManager::addDatabase() if the origin quota manager
584            is not tracking this origin.
585         6. Removed Database::performPolicyChecks(). We already update the
586            DB size after each transaction, and we enforce a max size for
587            the DB at the beginning of each transaction.
588
589         * dom/ScriptExecutionContext.cpp:
590         (WebCore::ScriptExecutionContext::stopDatabases):
591         * dom/ScriptExecutionContext.h:
592         (WebCore::ScriptExecutionContext::hasOpenDatabases):
593         * storage/Database.cpp:
594         (WebCore::Database::openDatabase):
595         (WebCore::Database::Database):
596         (WebCore::Database::markAsDeletedAndClose):
597         (WebCore::Database::close):
598         (WebCore::Database::closeImmediately):
599         * storage/Database.h:
600         * storage/DatabaseTask.cpp:
601         (WebCore::DatabaseTask::performTask):
602         (WebCore::Database::DatabaseOpenTask::DatabaseOpenTask):
603         (WebCore::Database::DatabaseOpenTask::doPerformTask):
604         (WebCore::Database::DatabaseOpenTask::debugTaskName):
605         (WebCore::Database::DatabaseCloseTask::DatabaseCloseTask):
606         (WebCore::Database::DatabaseCloseTask::doPerformTask):
607         (WebCore::Database::DatabaseCloseTask::debugTaskName):
608         (WebCore::Database::DatabaseTransactionTask::DatabaseTransactionTask):
609         (WebCore::Database::DatabaseTransactionTask::doPerformTask):
610         (WebCore::Database::DatabaseTransactionTask::debugTaskName):
611         (WebCore::Database::DatabaseTableNamesTask::DatabaseTableNamesTask):
612         (WebCore::Database::DatabaseTableNamesTask::doPerformTask):
613         (WebCore::Database::DatabaseTableNamesTask::debugTaskName):
614         * storage/DatabaseTask.h:
615         (WebCore::Database::DatabaseOpenTask::create):
616         (WebCore::Database::DatabaseCloseTask::create):
617         (WebCore::Database::DatabaseTransactionTask::create):
618         (WebCore::Database::DatabaseTableNamesTask::create):
619         * storage/DatabaseThread.cpp:
620         (WebCore::DatabaseThread::databaseThread):
621         * storage/DatabaseTracker.cpp:
622         (WebCore::DatabaseTracker::addOpenDatabase):
623         * storage/SQLTransaction.cpp:
624         (WebCore::SQLTransaction::executeSQL):
625         (WebCore::SQLTransaction::checkAndHandleClosedDatabase):
626
627 2010-07-01  Kent Tamura  <tkent@chromium.org>
628
629         Reviewed by Darin Fisher.
630
631         [Chromium] Support indeterminate checkbox for Windows
632         https://bugs.webkit.org/show_bug.cgi?id=41444
633
634         * rendering/RenderThemeChromiumWin.cpp:
635         (WebCore::RenderThemeChromiumWin::determineState):
636          Check isIndeterminate() and set an appropriate flag value.
637
638 2010-07-01  Alexey Proskuryakov  <ap@apple.com>
639
640         Reviewed by Dan Bernstein.
641
642         https://bugs.webkit.org/show_bug.cgi?id=41488
643         <rdar://problem/7487420> Crash in SubresourceLoader::create when load is initiated from plug-in destructor
644
645         Test: plugins/js-from-destroy.html
646
647         * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::create): Null check active
648         document loader.
649
650 2010-07-01  Andy Estes  <aestes@apple.com>
651
652         Reviewed by Darin Adler.
653
654         <rdar://problem/8113003> Correctly fire beforeload events for images
655         added to the DOM using .innerHTML.
656         https://bugs.webkit.org/show_bug.cgi?id=40919
657
658         Test: fast/dom/beforeload/image-before-load-innerHTML.html
659
660         * html/LegacyHTMLDocumentParser.cpp:
661         (WebCore::LegacyHTMLDocumentParser::write): Do not fire synchronous
662         image beforeload events immediately after parsing a document fragment.
663         Let the events fire later, giving the fragment time to potentially be
664         inserted into the document.
665
666 2010-07-01  Andreas Kling  <andreas.kling@nokia.com>
667
668         Reviewed by Tor Arne Vestbø.
669
670         Canvas: bezierCurveTo() and quadraticCurveTo() must ensure subpaths
671         https://bugs.webkit.org/show_bug.cgi?id=41192
672
673         If the current path is empty, bezierCurveTo() and quadraticCurveTo() will now
674         move to the (first) control point before adding the curve.
675
676         Spec links:
677         http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-beziercurveto
678         http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-quadraticcurveto
679
680         * html/canvas/CanvasRenderingContext2D.cpp:
681         (WebCore::CanvasRenderingContext2D::quadraticCurveTo):
682         (WebCore::CanvasRenderingContext2D::bezierCurveTo):
683
684 2010-07-01  Andreas Kling  <andreas.kling@nokia.com>
685
686         Reviewed by Darin Adler.
687
688         Canvas element cannot have negative width or height (HTML5 spec 4.8.11)
689         https://bugs.webkit.org/show_bug.cgi?id=39149
690
691         If assigned a negative value, it should default to 300 for width and 150 for height.
692
693         Spec link:
694         http://www.whatwg.org/specs/web-apps/current-work/#attr-canvas-width
695
696         Test: fast/canvas/canvas-negative-size.html
697
698         * html/HTMLCanvasElement.cpp:
699         (WebCore::HTMLCanvasElement::reset):
700
701 2010-07-01  Darin Adler  <darin@apple.com>
702
703         Reviewed by Steve Falkenburg.
704
705         Turn on adoptRef assertion for TreeShared.
706
707         * platform/TreeShared.h: Remove LOOSE_TREE_SHARED and all the ifdefs.
708         Actually, I used LOOSE_REF_COUNTED by accident in a few places, but
709         removing them all now.
710
711         * rendering/ShadowElement.cpp:
712         (WebCore::ShadowBlockElement::create): Added adoptRef. This was a
713         storage leak before, probably recently introduced r61324.
714         (WebCore::ShadowInputElement::create): Ditto.
715
716 2010-07-01  Xan Lopez  <xlopez@igalia.com>
717
718         Reviewed by Gustavo Noronha.
719
720         Only include the geolocation IDL in the GObject DOM bindings set
721         if geolocation is enabled.
722
723         * GNUmakefile.am:
724
725 2010-07-01  Timothy Hatcher  <timothy@apple.com>
726
727         Provide a WebView preference to disable DNS prefetching.
728
729         https://bugs.webkit.org/show_bug.cgi?id=28825
730         rdar://problem/7181249
731
732         Reviewed by Darin Adler.
733
734         * WebCore.base.exp: Added Settings::setDNSPrefetchingEnabled.
735         * dom/Document.cpp:
736         (WebCore::Document::initDNSPrefetch): Check settings->dnsPrefetchingEnabled().
737         * page/Settings.cpp:
738         (WebCore::Settings::Settings): Set m_dnsPrefetchingEnabled to true.
739         (WebCore::Settings::setDNSPrefetchingEnabled): Added. Set m_dnsPrefetchingEnabled.
740         * page/Settings.h:
741         (WebCore::Settings::dnsPrefetchingEnabled): Added. Return m_dnsPrefetchingEnabled.
742
743 2010-07-01  Simon Fraser  <simon.fraser@apple.com>
744
745         Reviewed by Darin Adler.
746
747         Get accelerated compositing working with webkit2
748         https://bugs.webkit.org/show_bug.cgi?id=41084
749
750         Step 2: add a  method, syncCompositingStateForThisLayerOnly(), to GraphicsLayer to commit
751         batched changes non-recursively. This allows us to use GraphicsLayer in places where we
752         don't want to kick off a recursive commit of the entire tree.
753
754         * platform/graphics/GraphicsLayer.h:
755         (WebCore::GraphicsLayer::syncCompositingStateForThisLayerOnly):
756         * platform/graphics/mac/GraphicsLayerCA.h:
757         * platform/graphics/mac/GraphicsLayerCA.mm:
758         (WebCore::GraphicsLayerCA::syncCompositingStateForThisLayerOnly):
759         * WebCore.AcceleratedCompositing.exp: Export the new method for use in WebKit2.
760
761 2010-07-01  Simon Fraser  <simon.fraser@apple.com>
762
763         Reviewed by Sam Weinig.
764
765         Get accelerated compositing working with webkit2
766         https://bugs.webkit.org/show_bug.cgi?id=41084
767
768         Step 1: add a new .exp file for WebCore, which exports symbols only when USE(ACCELERATED_COMPOSITING)
769         is defined.
770         
771         Also export WebCore::FloatSize::FloatSize(WebCore::IntSize const&) from WebCore.
772
773         * DerivedSources.make:
774         * WebCore.AcceleratedCompositing.exp: Added.
775         * WebCore.base.exp:
776         * WebCore.xcodeproj/project.pbxproj:
777
778 2010-07-01  Alexey Proskuryakov  <ap@apple.com>
779
780         Reviewed by Darin Adler.
781
782         <rdar://problem/8148656> <https://bugs.webkit.org/show_bug.cgi?id=41431>
783         REGRESSION (r49411): Various crashes due to JavaScript execution during plug-in destruction
784
785         Test: plugins/write-xssauditor-from-destroy.html
786
787         Fix specific known cases that also crash in same process case. I don't know if there is
788         any rule for when documentLoader should be checked for being null, it looks like a mess.
789
790         * loader/FrameLoader.cpp:
791         (WebCore::FrameLoader::referrer):
792         * page/XSSAuditor.cpp:
793         (WebCore::XSSAuditor::findInRequest):
794
795 2010-07-01  Andreas Kling  <andreas.kling@nokia.com>
796
797         Reviewed by Darin Adler.
798
799         The HTML5 canvas 2d.drawImage.zerocanvas test does not pass
800         https://bugs.webkit.org/show_bug.cgi?id=40271
801
802         Throw INVALID_STATE_ERR when attempting to draw a canvas with zero width or height.
803
804         Spec link:
805         http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-drawimage
806
807         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
808         (WebCore::JSCanvasRenderingContext2D::drawImage): Call setDOMException after drawImage(canvas, x, y)
809         * html/canvas/CanvasRenderingContext2D.cpp:
810         (WebCore::CanvasRenderingContext2D::drawImage):
811
812 2010-07-01  Andreas Kling  <andreas.kling@nokia.com>
813
814         Reviewed by Oliver Hunt.
815
816         [Qt] Canvas: clip() should use non-zero winding rule
817         https://bugs.webkit.org/show_bug.cgi?id=41466
818
819         Use non-zero winding number rule when clipping a GraphicsContext from canvas.
820         Fixes appearance of the "pill" in the web inspector.
821
822         * platform/graphics/qt/GraphicsContextQt.cpp:
823         (WebCore::GraphicsContext::canvasClip):
824
825 2010-07-01  Sheriff Bot  <webkit.review.bot@gmail.com>
826
827         Unreviewed, rolling out r62246.
828         http://trac.webkit.org/changeset/62246
829         https://bugs.webkit.org/show_bug.cgi?id=41470
830
831         "Worker tests are broken in Chromium" (Requested by yurys on
832         #webkit).
833
834         * bindings/v8/ScriptController.cpp:
835         (WebCore::ScriptController::processingUserGesture):
836         * bindings/v8/V8AbstractEventListener.cpp:
837         (WebCore::V8AbstractEventListener::invokeEventHandler):
838         * bindings/v8/V8HiddenPropertyName.h:
839         * bindings/v8/custom/V8DOMWindowCustom.cpp:
840         (WebCore::V8DOMWindow::eventAccessorGetter):
841         (WebCore::V8DOMWindow::eventAccessorSetter):
842
843 2010-07-01  Andreas Kling  <andreas.kling@nokia.com>
844
845         Reviewed by Tor Arne Vestbø.
846
847         Canvas: Exception erroneously thrown for drawImage() when image.complete=false
848         https://bugs.webkit.org/show_bug.cgi?id=33968
849
850         Do nothing in drawImage() if called with an image whose 'complete'
851         attribute is false, or a video whose readyState is either HAVE_NOTHING
852         or HAVE_METADATA.
853
854         Spec link:
855         http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-drawimage
856
857         Test: fast/canvas/canvas-drawImage-incomplete.html
858
859         * html/canvas/CanvasRenderingContext2D.cpp:
860         (WebCore::CanvasRenderingContext2D::drawImage):
861
862 2010-07-01  Justin Schuh  <jschuh@chromium.org>
863
864         Reviewed by Dan Bernstein.
865
866         Prevent crash on counter destruction
867         https://bugs.webkit.org/show_bug.cgi?id=40032
868
869         Added counter destruction to RenderWidget::destroy()
870
871         Test: fast/css/counters/destroy-counter-crash.html
872
873         * rendering/RenderWidget.cpp:
874         (WebCore::RenderWidget::destroy):
875
876 2010-07-01  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
877
878         Unreviewed build fix after r62215.
879
880         No new functionality, so no new tests.
881
882         * CMakeLists.txt: Add missing files and re-sort.
883
884 2010-07-01  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
885
886         Reviewed by Kenneth Rohde Christiansen.
887
888         [Qt] Remove an unneeded assert.
889
890         This assert is triggered for example while showing the falling leaves demo.
891         GraphicsLayerQtImpl::toGraphicsLayerQtImpl asserts that its input
892         pointer is null. Looking at the uses of this method it seems like
893         it is expected to return null if a null pointer is given to it.
894
895         * platform/graphics/qt/GraphicsLayerQt.cpp:
896         (WebCore::toGraphicsLayerQtImpl):
897
898 2010-06-16  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
899
900         Reviewed by Simon Hausmann.
901
902         [Qt] Fix qmake vcproj generation for QtWebKit.
903
904         qmake use TARGET=/LIBS+= -lTARGET to create dependencies
905         between projects in a subdir template.
906
907         Since when compiling outside of Qt we hijack the target name of
908         QtWebKit to add the configuration and version suffix to the binary
909         filename, qmake can't establish the WebCore project as a dependency
910         to QtTestBrowser.
911
912         This patch makes sure that the target is not hijacked on the
913         first of the three passes where the dependencies are determined.
914
915         * WebCore.pro:
916
917 2010-07-01  Nikolas Zimmermann  <nzimmermann@rim.com>
918
919         Reviewed by Dirk Schulze.
920
921         SVGRenderStyle::diff() is missing
922         https://bugs.webkit.org/show_bug.cgi?id=41455
923
924         Don't just return StyleDifferenceLayout when two SVGRenderStyle objects differ.
925         Figure out when to repaint, and as last resort do a relayout.
926
927         Lively Kernel doesn't do any relayouts anymore, same for lots of demos in the IE9 testcenter.
928
929         * rendering/style/RenderStyle.cpp:
930         (WebCore::RenderStyle::diff):
931         * rendering/style/SVGRenderStyle.cpp:
932         (WebCore::SVGRenderStyle::diff):
933         * rendering/style/SVGRenderStyle.h:
934
935 2010-07-01  Antti Koivisto  <koivisto@iki.fi>
936
937         Revert accidental commit.
938
939         * platform/network/qt/ResourceRequestQt.cpp:
940         (WebCore::ResourceRequest::toNetworkRequest):
941
942 2010-07-01  Patrick Gansterer  <paroga@paroga.com>
943
944         Reviewed by Dirk Schulze.
945
946         Buildfix for !ENABLE(FILTERS) after r62238.
947         https://bugs.webkit.org/show_bug.cgi?id=41456
948
949         * rendering/SVGRenderSupport.cpp:
950         (WebCore::SVGRenderSupport::prepareToRenderSVGContent):
951
952 2010-07-01  MORITA Hajime  <morrita@google.com>
953
954         Unreviewed build fix.
955
956         * rendering/RenderInputSpeech.cpp:
957         (WebCore::RenderInputSpeech::paintInputFieldSpeechButton):
958         * rendering/RenderInputSpeech.h:
959         * rendering/RenderTheme.cpp:
960         (WebCore::RenderTheme::paintInputFieldSpeechButton):
961         * rendering/RenderTheme.h:
962
963 2010-07-01  Satish Sampath  <satish@chromium.org>
964
965         Reviewed by Kent Tamura.
966
967         Rendering the speech button in input elements.
968         https://bugs.webkit.org/show_bug.cgi?id=40984
969
970         The button currently has only one state and rendered as an image on all platforms. Subsequent
971         patches will add user input handling and more states + rendering code to the button. The
972         button's appearance can be customized by individual ports in their RenderTheme implementation
973         if required.
974
975         Tests: platform/mac/fast/forms/input-appearance-numberandspeech.html
976                platform/mac/fast/forms/input-appearance-searchandspeech.html
977                platform/mac/fast/forms/input-appearance-speechbutton.html
978
979         * GNUmakefile.am:
980         * Resources/inputSpeech.png: Added.
981         * Resources/inputSpeech.tiff: Added. Used by the Mac implementation.
982         * WebCore.gypi:
983         * WebCore.pro:
984         * WebCore.qrc:
985         * WebCore.xcodeproj/project.pbxproj:
986         * platform/graphics/qt/ImageQt.cpp:
987         (loadResourcePixmap): Load the speech button images for Qt port.
988         * rendering/RenderInputSpeech.cpp: Added.
989         (WebCore::RenderInputSpeech::adjustInputFieldSpeechButtonStyle): Sets the button's dimensions.
990         (WebCore::RenderInputSpeech::paintInputFieldSpeechButton):
991         * rendering/RenderInputSpeech.h: Added.
992         * rendering/RenderTextControlSingleLine.cpp:
993         (WebCore::RenderTextControlSingleLine::layout):
994         (WebCore::RenderTextControlSingleLine::forwardEvent):
995         (WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded): Create the speech button.
996         (WebCore::RenderTextControlSingleLine::createInnerBlockStyle):
997         * rendering/RenderTheme.cpp:
998         (WebCore::RenderTheme::adjustStyle):
999         (WebCore::RenderTheme::paint):
1000         (WebCore::RenderTheme::adjustInputFieldSpeechButtonStyle):
1001         (WebCore::RenderTheme::paintInputFieldSpeechButton):
1002         * rendering/RenderTheme.h:
1003         * rendering/RenderThemeMac.mm:
1004         (WebCore::RenderThemeMac::paintSearchFieldCancelButton): Get cancel button to render to the left of
1005         speech button when enabled.
1006
1007 2010-07-01  Mario Sanchez Prada  <msanchez@igalia.com>
1008
1009         Reviewed by Xan Lopez.
1010
1011         [GTK] Extra nullcheck needed at SelectionControllerGtk.cpp
1012         https://bugs.webkit.org/show_bug.cgi?id=41447
1013
1014         Extra null check added.
1015
1016         * editing/gtk/SelectionControllerGtk.cpp:
1017         (WebCore::SelectionController::notifyAccessibilityForSelectionChange):
1018
1019 2010-07-01  Yury Semikhatsky  <yurys@chromium.org>
1020
1021         Reviewed by Adam Barth.
1022
1023         [v8] Web Inspector: inspected page crashes on attempt to change iframe's src attribute
1024         https://bugs.webkit.org/show_bug.cgi?id=41350
1025
1026         Tests: fast/events/popup-blocked-from-fake-user-gesture.html
1027                http/tests/inspector/change-iframe-src.html
1028
1029         * bindings/v8/ScriptController.cpp:
1030         (WebCore::ScriptController::processingUserGesture): use V8Proxy from the ScriptController instead of one
1031         from the call stack. Get event directly from hidden property to avoid unnecessary checks.
1032         * bindings/v8/V8AbstractEventListener.cpp:
1033         (WebCore::V8AbstractEventListener::invokeEventHandler):
1034         * bindings/v8/V8HiddenPropertyName.h:
1035         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1036         (WebCore::V8DOMWindow::eventAccessorGetter):
1037         (WebCore::V8DOMWindow::eventAccessorSetter):
1038
1039 2010-07-01  Nikolas Zimmermann  <nzimmermann@rim.com>
1040
1041         Reviewed by Dirk Schulze.
1042
1043         RenderSVGContainer/RenderSVGRoot report wrong strokeBoundingBox()
1044         https://bugs.webkit.org/show_bug.cgi?id=41450
1045
1046         strokeBoundingBox() was reporting the repaintRectInLocalCoordinates() for children of a container,
1047         instead of the actual strokeBoundingBox(). Only visible in WebInspector when looking at a container
1048         which has a resource applied and contains a children which also has a resource applied.
1049
1050         Doesn't affect any test results.
1051
1052         * rendering/RenderSVGContainer.cpp:
1053         (WebCore::RenderSVGContainer::objectBoundingBox):
1054         (WebCore::RenderSVGContainer::strokeBoundingBox):
1055         (WebCore::RenderSVGContainer::repaintRectInLocalCoordinates):
1056         * rendering/RenderSVGRoot.cpp:
1057         (WebCore::RenderSVGRoot::objectBoundingBox): Deinlined this functions, it's virtual so there's no gain.
1058         (WebCore::RenderSVGRoot::strokeBoundingBox): Ditto.
1059         (WebCore::RenderSVGRoot::repaintRectInLocalCoordinates):
1060         * rendering/RenderSVGRoot.h:
1061         * rendering/SVGRenderSupport.cpp:
1062         (WebCore::SVGRenderSupport::computeContainerBoundingBox):
1063         * rendering/SVGRenderSupport.h: Add enum controlling the mode of container bounding box mode calculation.
1064
1065 2010-07-01  Zoltan Herczeg  <zherczeg@webkit.org>
1066
1067         Reviewed by Nikolas Zimmermann.
1068
1069         Implementing feConvolveMatrix svg filter
1070         https://bugs.webkit.org/show_bug.cgi?id=5861
1071
1072         The implementation is optimized for speed, and uses
1073         multiple algorithms for different parts of the image.
1074         See SVGFEConvolveMatrixElement.cpp for a detailed
1075         description.
1076
1077         * svg/SVGFEConvolveMatrixElement.cpp:
1078         (WebCore::SVGFEConvolveMatrixElement::build):
1079         * svg/graphics/filters/SVGFEConvolveMatrix.cpp:
1080         (WebCore::clampRGBAValue):
1081         (WebCore::FEConvolveMatrix::fastSetInteriorPixels):
1082         (WebCore::FEConvolveMatrix::getPixelValue):
1083         (WebCore::FEConvolveMatrix::fastSetOuterPixels):
1084         (WebCore::FEConvolveMatrix::setInteriorPixels):
1085         (WebCore::FEConvolveMatrix::setOuterPixels):
1086         (WebCore::FEConvolveMatrix::apply):
1087         * svg/graphics/filters/SVGFEConvolveMatrix.h:
1088         (WebCore::FEConvolveMatrix::uniteChildEffectSubregions):
1089
1090 2010-07-01  Adam Barth  <abarth@webkit.org>
1091
1092         Reviewed by Eric Seidel.
1093
1094         Abstract 'a'-'z' checks into a function
1095         https://bugs.webkit.org/show_bug.cgi?id=41438
1096
1097         Hopefully this version is more readable.
1098
1099         * html/HTMLTokenizer.cpp:
1100         (WebCore::HTMLTokenizer::nextToken):
1101
1102 2010-07-01  Adam Barth  <abarth@webkit.org>
1103
1104         Reviewed by Eric Seidel.
1105
1106         Parameter names in frame src URLs parsed incorrectly if resembles HTML entity code followed by underscore
1107         https://bugs.webkit.org/show_bug.cgi?id=41345
1108
1109         Apparently whether an HTML entity requires a trailing semicolon varies
1110         depending on the entity.  The full table is in the spec:
1111
1112         http://www.whatwg.org/specs/web-apps/current-work/multipage/named-character-references.html#named-character-references
1113
1114         I believe branch added in this patch is accurate.  At some point, I'll
1115         add a full test suite for all the named entities.
1116
1117         * html/HTMLEntityParser.cpp:
1118         (WebCore::consumeHTMLEntity):
1119
1120 2010-07-01  Eric Seidel  <eric@webkit.org>
1121
1122         Unreviewed.  Fix paste-o in Gtk build file.
1123
1124         Split out HTMLFormattingElementList into its own file
1125         https://bugs.webkit.org/show_bug.cgi?id=41440
1126
1127         * GNUmakefile.am:
1128
1129 2010-07-01  Nikolas Zimmermann  <nzimmermann@rim.com>
1130
1131         Reviewed by Eric Seidel & Dirk Schulze.
1132
1133         Performance regression for setting content of <text> in SVG
1134         https://bugs.webkit.org/show_bug.cgi?id=36564
1135
1136         Dramatically reducing the number of repaintRectInLocalCoordinates() calls needed while painting.
1137         Do not pass the repaintRect to prepareToRenderSVGContent, only calculate it if opacity < 1 or -webkit-svg-shadow is set.
1138         Most noticeable is that RenderSVGRoot had to visit all children, before actually painting, just to calculate the repaint rect.
1139         And as RenderSVGRoot never carries shadow or opacity it was completly useless.
1140
1141         RenderSVGContainer also called repaintRectInLocalCoordinates, but the result is only needed when painting outlines, which is a rare case.
1142         These modifications fix the performance regression and the number of repaintRectInLocalCoordinate calls for the complex example in
1143         the bug report with 500 runs shrinks from 1.7 million calls to less than 105.000.
1144
1145         50 runs without the patch: ~ 520.8ms
1146         50 runs with the patch   : ~ 501.8ms
1147
1148         The test calls setTimeout(0) 50 times, that already accounts for the 500ms. So setting the content of a <text>
1149         element withs clippers applied, is very cheap now.
1150
1151         Also remove the need to pass in a filter argument to prepareToRenderSVGContent/finishRenderSVGContent, it can easily be grabbed
1152         of the cache - just like all other resources are handled, simplifying the code.
1153
1154         * rendering/RenderPath.cpp:
1155         (WebCore::RenderPath::paint):
1156         * rendering/RenderSVGContainer.cpp:
1157         (WebCore::RenderSVGContainer::paint):
1158         (WebCore::RenderSVGContainer::repaintRectInLocalCoordinates):
1159         * rendering/RenderSVGImage.cpp:
1160         (WebCore::RenderSVGImage::paint):
1161         * rendering/RenderSVGRoot.cpp:
1162         (WebCore::RenderSVGRoot::paint):
1163         * rendering/SVGInlineFlowBox.cpp:
1164         (WebCore::SVGInlineFlowBox::paint):
1165         * rendering/SVGRenderSupport.cpp:
1166         (WebCore::SVGRenderSupport::prepareToRenderSVGContent):
1167         (WebCore::SVGRenderSupport::finishRenderSVGContent):
1168         * rendering/SVGRenderSupport.h:
1169         * rendering/SVGRootInlineBox.cpp:
1170         (WebCore::SVGRootInlineBox::paint):
1171
1172 2010-07-01  Eric Seidel  <eric@webkit.org>
1173
1174         Reviewed by Adam Barth.
1175
1176         Split out HTMLFormattingElementList into its own file
1177         https://bugs.webkit.org/show_bug.cgi?id=41440
1178
1179         No functional changes, thus no tests.
1180
1181         * Android.mk:
1182         * CMakeLists.txt:
1183         * GNUmakefile.am:
1184         * WebCore.gypi:
1185         * WebCore.pro:
1186         * WebCore.vcproj/WebCore.vcproj:
1187         * WebCore.xcodeproj/project.pbxproj:
1188         * html/HTMLTreeBuilder.cpp:
1189         (WebCore::HTMLTreeBuilder::processEndTag):
1190         (WebCore::HTMLTreeBuilder::indexOfFirstUnopenFormattingElement):
1191         (WebCore::HTMLTreeBuilder::reconstructTheActiveFormattingElements):
1192         * html/HTMLTreeBuilder.h:
1193
1194 2010-07-01  Adam Barth  <abarth@webkit.org>
1195
1196         Reviewed by Eric Seidel.
1197
1198         BogusCommentState should come in from the cold
1199         https://bugs.webkit.org/show_bug.cgi?id=41439
1200
1201         The BogusCommentState has always been wrong.  The proximate issue is
1202         that it didn't handle resuming correctly when parsing a partial input
1203         stream.  Now that we have EOF working properly, we can actually
1204         implement this state correctly.
1205
1206         We need to distinguish when we enter this state from when we continue
1207         in this state.  We could do that with a branch for each character, but
1208         it seemed easier to split the state in two, even though that leaves us
1209         with one more state in our tokenizer than we have in the HTML5 spec.
1210
1211         * html/HTMLTokenizer.cpp:
1212         (WebCore::HTMLTokenizer::nextToken):
1213         * html/HTMLTokenizer.h:
1214         (WebCore::HTMLTokenizer::):
1215
1216 2010-06-30  Adam Barth  <abarth@webkit.org>
1217
1218         Reviewed by Eric Seidel.
1219
1220         HTMLTokenizer's whitespace checks are very redundant
1221         https://bugs.webkit.org/show_bug.cgi?id=41434
1222
1223         This patch adds isTokenizerWhitespace, which replaces a lot of
1224         redundant logic in nextToken.
1225
1226         * html/HTMLTokenizer.cpp:
1227         (WebCore::HTMLTokenizer::nextToken):
1228
1229 2010-06-30  Andreas Kling  <andreas.kling@nokia.com>
1230
1231         Reviewed by Kenneth Rohde Christiansen.
1232
1233         [Qt] Crash when uploading document to Google Docs
1234         https://bugs.webkit.org/show_bug.cgi?id=40795
1235
1236         Fix bug where the local file wasn't opened (for POSTing)
1237         if it were the first element in the form.
1238
1239         * platform/network/qt/QNetworkReplyHandler.cpp:
1240         (WebCore::FormDataIODevice::FormDataIODevice):
1241         (WebCore::FormDataIODevice::moveToNextElement):
1242         (WebCore::FormDataIODevice::openFileForCurrentElement):
1243         * platform/network/qt/QNetworkReplyHandler.h:
1244
1245 2010-06-30  Eric Seidel  <eric@webkit.org>
1246
1247         Reviewed by Adam Barth.
1248
1249         Implement generateImpliedEndTags and deploy to steps which were blocked on it
1250         https://bugs.webkit.org/show_bug.cgi?id=41432
1251
1252         This fixes one subtest in html5lib/runner.html and positively
1253         effects a couple others.
1254
1255         More code sharing will be needed here.  For the moment
1256         we're using copy/paste code, but that will soon be shared.
1257
1258         * html/HTMLTreeBuilder.cpp:
1259         (WebCore::HTMLTreeBuilder::processEndTag):
1260         (WebCore::HTMLTreeBuilder::generateImpliedEndTagsWithExclusion):
1261         (WebCore::HTMLTreeBuilder::generateImpliedEndTags):
1262         * html/HTMLTreeBuilder.h:
1263
1264 2010-06-30  Csaba Osztrogonác  <ossy@webkit.org>
1265
1266         Unreviewed buildfix after r62196 and r62214.
1267
1268         * html/HTMLElementStack.cpp: Put !ENABLE(SVG) guard instead of 
1269         !ENABLE(SVG_FOREIGN_OBJECT) around include of SVGNames.h.
1270
1271 2010-06-30  Sam Weinig  <sam@webkit.org>
1272
1273         Really fix the windows build.
1274
1275         * bindings/js/JSBindingsAllInOne.cpp:
1276
1277 2010-06-30  Sam Weinig  <sam@webkit.org>
1278
1279         Another Chromium build fix.
1280
1281         * page/DOMWindow.idl:
1282
1283 2010-06-30  Sam Weinig  <sam@webkit.org>
1284
1285         Fix Chromium build.
1286
1287         * WebCore.gyp/WebCore.gyp:
1288
1289 2010-06-30  Sam Weinig  <sam@webkit.org>
1290
1291         Fix Windows build.
1292
1293         * bindings/js/JSBindingsAllInOne.cpp:
1294
1295 2010-06-30  Sam Weinig  <sam@webkit.org>
1296
1297         Fix Gtk build.
1298
1299         * GNUmakefile.am:
1300
1301 2010-06-29  Sam Weinig  <sam@webkit.org>
1302
1303         Reviewed by Dan Bernstein.
1304
1305         Patch for https://bugs.webkit.org/show_bug.cgi?id=41146
1306         <rdar://problem/8126069>
1307         Implement the .dataset DOM property
1308
1309         Tests: fast/dom/dataset-xhtml.xhtml
1310                fast/dom/dataset.html
1311
1312         * DerivedSources.cpp:
1313         * DerivedSources.make:
1314         * GNUmakefile.am:
1315         * WebCore.gypi:
1316         * WebCore.pro:
1317         * WebCore.vcproj/WebCore.vcproj:
1318         * WebCore.xcodeproj/project.pbxproj:
1319         * bindings/js/JSDOMStringMapCustom.cpp: Added.
1320         (WebCore::JSDOMStringMap::canGetItemsForName):
1321         (WebCore::JSDOMStringMap::nameGetter):
1322         (WebCore::JSDOMStringMap::getOwnPropertyNames):
1323         (WebCore::JSDOMStringMap::deleteProperty):
1324         (WebCore::JSDOMStringMap::putDelegate):
1325         * bindings/js/JSDOMStringMapCustom.h: Added.
1326         * dom/DOMStringMap.cpp: Added.
1327         (WebCore::DOMStringMap::~DOMStringMap):
1328         * dom/DOMStringMap.h: Added.
1329         (WebCore::DOMStringMap::DOMStringMap):
1330         * dom/DOMStringMap.idl: Added.
1331         * dom/DatasetDOMStringMap.cpp: Added.
1332         (WebCore::isValidAttributeName):
1333         (WebCore::convertAttributeNameToPropertyName):
1334         (WebCore::propertyNameMatchesAttributeName):
1335         (WebCore::isValidPropertyName):
1336         (WebCore::convertPropertyNameToAttributeName):
1337         (WebCore::DatasetDOMStringMap::ref):
1338         (WebCore::DatasetDOMStringMap::deref):
1339         (WebCore::DatasetDOMStringMap::getNames):
1340         (WebCore::DatasetDOMStringMap::item):
1341         (WebCore::DatasetDOMStringMap::contains):
1342         (WebCore::DatasetDOMStringMap::setItem):
1343         (WebCore::DatasetDOMStringMap::deleteItem):
1344         * dom/DatasetDOMStringMap.h: Added.
1345         (WebCore::DatasetDOMStringMap::create):
1346         (WebCore::DatasetDOMStringMap::DatasetDOMStringMap):
1347         * dom/Element.cpp:
1348         (WebCore::Element::dataset):
1349         * dom/Element.h:
1350         * dom/Element.idl:
1351         * dom/ElementRareData.h:
1352         * page/DOMWindow.idl:
1353
1354 2010-06-30  Darin Adler  <darin@apple.com>
1355
1356         More Qt build fix.
1357
1358         * html/HTMLElementStack.cpp: Put !ENABLE(SVG_FOREIGN_OBJECT) around
1359         include of SVGNames.h too.
1360
1361 2010-06-30  Darin Adler  <darin@apple.com>
1362
1363         Reviewed by Adam Barth.
1364
1365         Add assertion, off by default, for when you forget to do adoptRef
1366         https://bugs.webkit.org/show_bug.cgi?id=41422
1367
1368         * platform/TreeShared.h: Added code to require adoption and assert if
1369         you don't call adoptRef. For now, it is turned off because of the
1370         LOOSE_TREE_SHARED define in this header. Later we can turn it on
1371         once we get everything working without asserting. Note also that it
1372         only works for objects with an initial reference count of 1.
1373
1374 2010-06-30  Patrick Gansterer  <paroga@paroga.com>
1375
1376         Reviewed by Darin Adler.
1377
1378         Buildfix for !ENABLE(SVG_FOREIGN_OBJECT) after r62196.
1379         https://bugs.webkit.org/show_bug.cgi?id=41429
1380
1381         * html/HTMLElementStack.cpp:
1382
1383 2010-06-30  Eric Seidel  <eric@webkit.org>
1384
1385         Reviewed by Adam Barth.
1386
1387         Add new popUntil(tagName) function and deploy
1388         https://bugs.webkit.org/show_bug.cgi?id=41405
1389
1390         Add a new popUntil function to share some common code
1391         between states.  There is more code to share here, but this
1392         is a start.
1393
1394         I also filled in a couple similar states to these with the
1395         hope of sharing more code, but decided to wait for a later
1396         patch.
1397
1398         No test changes, since this code doesn't do enough yet to
1399         pass any more subtests.  Lack of generateImpliedEndTags is the main
1400         blocking issue.
1401
1402         * html/HTMLElementStack.cpp:
1403         (WebCore::HTMLElementStack::popUntil):
1404         * html/HTMLElementStack.h:
1405         * html/HTMLTreeBuilder.cpp:
1406         (WebCore::HTMLTreeBuilder::processEndTag):
1407
1408 2010-06-30  Xan Lopez  <xlopez@igalia.com>
1409
1410         Reviewed by Gustavo Noronha.
1411
1412         [GTK] Unit test for DOM insertion methods
1413         https://bugs.webkit.org/show_bug.cgi?id=40495
1414
1415         Fix typo in custom function detection method.
1416
1417         * bindings/scripts/CodeGeneratorGObject.pm:
1418
1419 2010-06-30  Eric Seidel  <eric@webkit.org>
1420
1421         Reviewed by Adam Barth.
1422
1423         Implement HTML5 "in scope" algorithm and attempt to use it
1424         https://bugs.webkit.org/show_bug.cgi?id=41402
1425
1426         Implemented the 4 needed "in scope" functions for HTML5.
1427         3 for the different sets of scope markers, and one for
1428         doing exact element comparisons instead of tag name searches.
1429
1430         I deployed inScope("body") for </body> and </html> in InBody.
1431
1432         Adds two new (expected) failures, since we're now
1433         switching out of InBody to AfterBody when seeing
1434         </html>.  We don't implement AfterBody yet, so
1435         the rest of the content after </html> is ignored.
1436
1437         * html/HTMLElementStack.cpp:
1438         (WebCore::inScopeCommon):
1439         (WebCore::HTMLElementStack::inScope):
1440         (WebCore::HTMLElementStack::inListItemScope):
1441         (WebCore::HTMLElementStack::inTableScope):
1442         * html/HTMLElementStack.h:
1443         * html/HTMLTreeBuilder.cpp:
1444         (WebCore::HTMLTreeBuilder::processBodyEndTagForInBody):
1445         (WebCore::HTMLTreeBuilder::processEndTag):
1446         * html/HTMLTreeBuilder.h:
1447
1448 2010-06-30  Eric Seidel  <eric@webkit.org>
1449
1450         Reviewed by Adam Barth.
1451
1452         Split HTMLElementStack out into its own file
1453         https://bugs.webkit.org/show_bug.cgi?id=41399
1454
1455         No functional change, thus no tests.
1456
1457         * Android.mk:
1458         * CMakeLists.txt:
1459         * GNUmakefile.am:
1460         * WebCore.gypi:
1461         * WebCore.pro:
1462         * WebCore.vcproj/WebCore.vcproj:
1463         * WebCore.xcodeproj/project.pbxproj:
1464         * html/HTMLElementStack.cpp: Added.
1465         (WebCore::HTMLElementStack::ElementRecord::ElementRecord):
1466         (WebCore::HTMLElementStack::ElementRecord::element):
1467         (WebCore::HTMLElementStack::ElementRecord::next):
1468         (WebCore::HTMLElementStack::ElementRecord::releaseNext):
1469         (WebCore::HTMLElementStack::ElementRecord::setNext):
1470         (WebCore::HTMLElementStack::HTMLElementStack):
1471         (WebCore::HTMLElementStack::~HTMLElementStack):
1472         (WebCore::HTMLElementStack::popHTMLHeadElement):
1473         (WebCore::HTMLElementStack::pop):
1474         (WebCore::HTMLElementStack::pushHTMLHtmlElement):
1475         (WebCore::HTMLElementStack::pushHTMLHeadElement):
1476         (WebCore::HTMLElementStack::pushHTMLBodyElement):
1477         (WebCore::HTMLElementStack::push):
1478         (WebCore::HTMLElementStack::top):
1479         (WebCore::HTMLElementStack::removeHTMLHeadElement):
1480         (WebCore::HTMLElementStack::remove):
1481         (WebCore::HTMLElementStack::contains):
1482         (WebCore::HTMLElementStack::inScope):
1483         (WebCore::HTMLElementStack::htmlElement):
1484         (WebCore::HTMLElementStack::headElement):
1485         (WebCore::HTMLElementStack::bodyElement):
1486         (WebCore::HTMLElementStack::pushCommon):
1487         (WebCore::HTMLElementStack::popCommon):
1488         (WebCore::HTMLElementStack::removeNonFirstCommon):
1489         * html/HTMLElementStack.h: Added.
1490         * html/HTMLTreeBuilder.h:
1491
1492 2010-06-30  Kenneth Russell  <kbr@google.com>
1493
1494         Reviewed by Oliver Hunt.
1495
1496         WebCore::WebGLArrayInternal::lengthAttrGetter ReadAV@NULL (b1a3e1a3e9d01f17fd493d68eeb2742f)
1497         https://bugs.webkit.org/show_bug.cgi?id=38040
1498
1499         Changed custom ArrayBufferView constructors to create a
1500         fully-initialized, zero-length array when called with zero
1501         arguments. This is the simplest fix which works identically in
1502         both the JSC and V8 bindings.
1503
1504         Test: fast/canvas/webgl/array-buffer-view-crash.html
1505
1506         * bindings/js/JSArrayBufferViewHelper.h:
1507         (WebCore::constructArrayBufferView):
1508         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
1509         (WebCore::constructWebGLArray):
1510
1511 2010-06-30  Victor Wang  <victorw@chromium.org>
1512
1513         Reviewed by Darin Fisher.
1514
1515         [chromium] update webcore gyp to use v8 dll for chromium multi dll build.
1516
1517         https://bugs.webkit.org/show_bug.cgi?id=41376
1518
1519         * WebCore.gyp/WebCore.gyp:
1520
1521 2010-06-30  Jeremy Moskovich  <jeremy@chromium.org>
1522
1523         Reviewed by Dimitri Glazkov.
1524
1525         [Chromium] Add OOP font loading to FontPlatformDataChromiumMac.
1526
1527         On OS X, with font management software installed. Fonts
1528         can reside in an arbitrary path on disk which is blocked by
1529         Chromium's sandbox.
1530
1531         This change adds hooks to FontPlaformData which allow cross-process
1532         font loading in case of need.
1533
1534         https://bugs.webkit.org/show_bug.cgi?id=41148
1535
1536         Not possible to test - requires sandboxing which DRT doesn't support.
1537
1538         * WebCore.gypi:
1539         * platform/graphics/chromium/FontPlatformDataChromiumMac.mm: Added.
1540         (WebCore::FontPlatformData::FontPlatformData):
1541         (WebCore::FontPlatformData::~FontPlatformData):
1542         (WebCore::FontPlatformData::operator=):
1543         (WebCore::FontPlatformData::setFont):
1544         (WebCore::FontPlatformData::roundsGlyphAdvances):
1545         (WebCore::FontPlatformData::allowsLigatures):
1546         (WebCore::FontPlatformData::description):
1547
1548 2010-06-30  Jeremy Moskovich  <jeremy@chromium.org>
1549
1550         Reviewed by Dan Bernstein.
1551
1552         Minor tweaks to FontPlatformDataMac & SimpleFontDataMac.mm
1553
1554         * Avoid an extra FontPlatformData copy in SimpleFontDataMac.mm
1555         * Fix a typo in FontPlatformDataMac.mm
1556
1557         https://bugs.webkit.org/show_bug.cgi?id=41152
1558
1559         No behavior changes so no new tests.
1560
1561         * platform/graphics/mac/FontPlatformDataMac.mm:
1562         (WebCore::FontPlatformData::description):
1563         * platform/graphics/mac/SimpleFontDataMac.mm:
1564         (WebCore::copyFontTableForTag):
1565
1566 2010-06-30  Andreas Kling  <andreas.kling@nokia.com>
1567
1568         Reviewed by Kenneth Rohde Christiansen.
1569
1570         [Qt] Make "disallow multiple calls to SetWindow" on windowed plugins a quirk
1571         https://bugs.webkit.org/show_bug.cgi?id=41407
1572
1573         Only disallow calling SetWindow more than once if we're using Flash 9 or older.
1574         This fixes resizing of YouTube videos via the player's own button.
1575
1576         Removed copy-pasted logic in PluginViewGtk since the issue only exists
1577         when running Flash with a non-Gtk toolkit.
1578
1579         * plugins/PluginPackage.cpp:
1580         (WebCore::PluginPackage::determineQuirks):
1581         * plugins/PluginQuirkSet.h:
1582         (WebCore::):
1583         * plugins/gtk/PluginViewGtk.cpp:
1584         (WebCore::PluginView::setNPWindowIfNeeded): Remove unnecessary logic copy-pasted from PluginViewQt.
1585         * plugins/qt/PluginViewQt.cpp:
1586         (WebCore::PluginView::setNPWindowIfNeeded):
1587
1588 2010-06-30  Andreas Kling  <andreas.kling@nokia.com>
1589
1590         Reviewed by Antti Koivisto.
1591
1592         [Qt, Gtk, Symbian] Mind the semantics of NPRect for windowed plugin clip rects
1593         https://bugs.webkit.org/show_bug.cgi?id=41406
1594
1595         NPRect has right/bottom instead of width/height.
1596         This was fixed in PluginViewMac with http://trac.webkit.org/changeset/45815
1597
1598         * plugins/gtk/PluginViewGtk.cpp:
1599         (WebCore::PluginView::setNPWindowIfNeeded):
1600         * plugins/qt/PluginViewQt.cpp:
1601         (WebCore::PluginView::setNPWindowIfNeeded):
1602         * plugins/symbian/PluginViewSymbian.cpp:
1603         (WebCore::PluginView::setNPWindowIfNeeded):
1604
1605 2010-06-30  Antonio Gomes  <tonikitoo@webkit.org>
1606
1607         Reviewed by Simon Fraser.
1608
1609         Spatial Navigation: make elements in inner frames nested more than 1 level deep focusable
1610         https://bugs.webkit.org/show_bug.cgi?id=41160
1611
1612         Patch addresses the problem of spatial navigation not work properly with nested
1613         inner frames by adding the isNodeDeepDescendantOfDocument method. It recursively checks
1614         if a give node is descendant of a given document or any parent of it.
1615
1616         Test: fast/events/spatial-navigation/snav-iframe-nested.html
1617
1618         * page/FocusController.cpp:
1619         (WebCore::FocusController::deepFindFocusableNodeInDirection):
1620         * page/SpatialNavigation.cpp:
1621         (WebCore::isNodeDeepDescendantOfDocument):
1622         * page/SpatialNavigation.h:
1623
1624 2010-06-30  Adam Barth  <abarth@webkit.org>
1625
1626         Reviewed by Eric Seidel.
1627
1628         HTMLTokenizer should use fewer macros
1629         https://bugs.webkit.org/show_bug.cgi?id=41397
1630
1631         Macros are sadness.  Inline functions are the new hotness.
1632
1633         * html/HTMLTokenizer.cpp:
1634         (WebCore::HTMLTokenizer::processEntity):
1635         (WebCore::HTMLTokenizer::emitAndResumeIn):
1636         (WebCore::HTMLTokenizer::emitAndReconsumeIn):
1637         (WebCore::HTMLTokenizer::emitEndOfFile):
1638         (WebCore::HTMLTokenizer::flushBufferedEndTag):
1639         (WebCore::HTMLTokenizer::flushEmitAndResumeIn):
1640         (WebCore::HTMLTokenizer::nextToken):
1641         (WebCore::HTMLTokenizer::bufferCharacter):
1642         (WebCore::HTMLTokenizer::bufferCodePoint):
1643         (WebCore::HTMLTokenizer::bufferParseError):
1644         (WebCore::HTMLTokenizer::bufferCurrentToken):
1645         (WebCore::HTMLTokenizer::bufferEndOfFile):
1646         * html/HTMLTokenizer.h:
1647
1648 2010-06-30  Justin Schuh  <jschuh@chromium.org>
1649
1650         Reviewed by Adam Barth.
1651
1652         Remove dead binding code
1653         https://bugs.webkit.org/show_bug.cgi?id=41388
1654
1655         Removed BindingElement because it was obsoleted by r59866.
1656
1657         * WebCore.gypi:
1658         * bindings/generic/BindingElement.h: Removed.
1659         * bindings/v8/SerializedScriptValue.cpp:
1660         * bindings/v8/V8Binding.h:
1661         * bindings/v8/custom/V8DatabaseCustom.cpp:
1662         * bindings/v8/custom/V8DatabaseSyncCustom.cpp:
1663         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
1664         * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
1665
1666 2010-06-30  Eric Seidel  <eric@webkit.org>
1667
1668         Reviewed by Adam Barth.
1669
1670         HTMLTokenizer needs EndOfFile support
1671         https://bugs.webkit.org/show_bug.cgi?id=41344
1672
1673         EndOfFile support uncovered a bug in our implementation of finish().
1674         finish() may be called more than once if the first call does not
1675         result in end() being called (and parsing thus actually stopping).
1676
1677         SegmentedString::close() should have ASSERTed that it was not already
1678         closed when close() is called.  I've added such an assert now.
1679
1680         * html/HTMLDocumentParser.cpp:
1681         (WebCore::HTMLDocumentParser::finish):
1682         * platform/text/SegmentedString.cpp:
1683         (WebCore::SegmentedString::close):
1684         * platform/text/SegmentedString.h:
1685
1686 2010-06-29  Eric Seidel  <eric@webkit.org>
1687
1688         Reviewed by Adam Barth.
1689
1690         HTMLTokenizer needs EndOfFile support
1691         https://bugs.webkit.org/show_bug.cgi?id=41344
1692
1693         We're using \0 as the EndOfFile marker as HTML5 replaces
1694         all other \0 with \0xFFFD.  Added some special case logic
1695         to InputStreamPreprocessor::peek not to replace \0 when
1696         its being used at the end of a stream.
1697
1698         This fixed 60 subtests in html5lib/runner.html.
1699
1700         There are still at least two states (BogusCommentState and
1701         CDATASectionState) which do not have proper EOF support.
1702
1703         * html/HTMLDocumentParser.cpp:
1704         (WebCore::HTMLDocumentParser::finish):
1705         (WebCore::HTMLDocumentParser::finishWasCalled):
1706         * html/HTMLInputStream.h:
1707         (WebCore::HTMLInputStream::markEndOfFile):
1708         (WebCore::HTMLInputStream::haveSeenEndOfFile):
1709         * html/HTMLToken.h:
1710         (WebCore::HTMLToken::makeEndOfFile):
1711         * html/HTMLTokenizer.cpp:
1712         (WebCore::HTMLTokenizer::nextToken):
1713         (WebCore::HTMLTokenizer::emitEndOfFile):
1714         * html/HTMLTokenizer.h:
1715         (WebCore::HTMLTokenizer::InputStreamPreprocessor::peek):
1716         (WebCore::HTMLTokenizer::InputStreamPreprocessor::shouldTreatNullAsEndOfFileMarker):
1717         * html/HTMLTreeBuilder.cpp:
1718         (WebCore::HTMLTreeBuilder::passTokenToLegacyParser):
1719
1720 2010-06-28  Eric Seidel  <eric@webkit.org>
1721
1722         Reviewed by Adam Barth.
1723
1724         Teach HTML5TreeBuilder how to merge attributes from extra html/body elements
1725         https://bugs.webkit.org/show_bug.cgi?id=41337
1726
1727         Had to teach ElementStack to store pointers to html, head, and body
1728         elements.
1729
1730         This fixed a few tests in LayoutTests/html5lib.
1731
1732         * html/HTMLTreeBuilder.cpp:
1733         (WebCore::HTMLTreeBuilder::insertHTMLStartTagBeforeHTML):
1734         (WebCore::HTMLTreeBuilder::mergeAttributesFromTokenIntoElement):
1735         (WebCore::HTMLTreeBuilder::insertHTMLStartTagInBody):
1736         (WebCore::HTMLTreeBuilder::processStartTag):
1737         (WebCore::HTMLTreeBuilder::processEndTag):
1738         (WebCore::HTMLTreeBuilder::createElementAndAttachToCurrent):
1739         (WebCore::HTMLTreeBuilder::insertHTMLHtmlElement):
1740         (WebCore::HTMLTreeBuilder::insertHTMLHeadElement):
1741         (WebCore::HTMLTreeBuilder::insertHTMLBodyElement):
1742         (WebCore::HTMLTreeBuilder::insertElement):
1743         (WebCore::HTMLTreeBuilder::insertGenericRCDATAElement):
1744         (WebCore::HTMLTreeBuilder::insertGenericRawTextElement):
1745         * html/HTMLTreeBuilder.h:
1746         (WebCore::HTMLTreeBuilder::ElementStack::ElementStack):
1747         (WebCore::HTMLTreeBuilder::ElementStack::popHTMLHeadElement):
1748         (WebCore::HTMLTreeBuilder::ElementStack::pop):
1749         (WebCore::HTMLTreeBuilder::ElementStack::pushHTMLHtmlElement):
1750         (WebCore::HTMLTreeBuilder::ElementStack::pushHTMLHeadElement):
1751         (WebCore::HTMLTreeBuilder::ElementStack::pushHTMLBodyElement):
1752         (WebCore::HTMLTreeBuilder::ElementStack::push):
1753         (WebCore::HTMLTreeBuilder::ElementStack::removeHTMLHeadElement):
1754         (WebCore::HTMLTreeBuilder::ElementStack::remove):
1755         (WebCore::HTMLTreeBuilder::ElementStack::htmlElement):
1756         (WebCore::HTMLTreeBuilder::ElementStack::headElement):
1757         (WebCore::HTMLTreeBuilder::ElementStack::bodyElement):
1758         (WebCore::HTMLTreeBuilder::ElementStack::pushCommon):
1759         (WebCore::HTMLTreeBuilder::ElementStack::popCommon):
1760         (WebCore::HTMLTreeBuilder::ElementStack::removeNonFirstCommon):
1761
1762 2010-06-30  José Millán Soto  <jmillan@igalia.com>
1763
1764         Reviewed by Xan Lopez.
1765
1766         [Gtk] Text attributes not exposed
1767         https://bugs.webkit.org/show_bug.cgi?id=25528
1768
1769         Implemented the get_run_attributes and get_default_attributes
1770         functions for the ATK_TEXT role.
1771
1772         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
1773         (getAttributeSetForAccessibilityObject):
1774         (compareAttribute):
1775         (attributeSetDifference):
1776         (accessibilityObjectLength):
1777         (getAccessibilityObjectForOffset):
1778         (getRunAttributesFromAccesibilityObject):
1779         (webkit_accessible_text_get_run_attributes):
1780         (webkit_accessible_text_get_default_attributes):
1781
1782 2010-06-30  Yuta Kitamura  <yutak@chromium.org>
1783
1784         Reviewed by Alexey Proskuryakov.
1785
1786         Fix Sec-WebSocketKey{1,2} headers.
1787
1788         According to WebSocket specification, a value of Sec-WebSocketKey{1,2} header
1789         should not start or end with a space.
1790
1791         WebSocket: Malformed handshake headers in a worker due to rand_s failing
1792         https://bugs.webkit.org/show_bug.cgi?id=41327
1793
1794         No new tests. ASSERT should catch the problem.
1795
1796         * websockets/WebSocketHandshake.cpp:
1797         (WebCore::generateSecWebSocketKey):
1798
1799 2010-06-30  Yuzo Fujishima  <yuzo@google.com>
1800
1801         Reviewed by Dan Bernstein.
1802
1803         Fix for Bug 41339 - unicode-range property only with a descending range
1804         causes a crash
1805
1806         https://bugs.webkit.org/show_bug.cgi?id=41339
1807
1808         Test: fast/css/font-face-descending-unicode-range.html
1809
1810         * css/CSSParser.cpp:
1811         (WebCore::CSSParser::parseFontFaceUnicodeRange):
1812
1813 2010-06-29  Abhinav Mithal <abhinav.mithal@nokia.com>
1814
1815         Reviewed by Laszlo Gombos.
1816
1817         [Qt] [Symbian] Fix doube-deallocation while destroying PluginContainerSymbian
1818         https://bugs.webkit.org/show_bug.cgi?id=37303
1819
1820         * plugins/symbian/PluginViewSymbian.cpp:
1821         (WebCore::PluginView::platformDestroy):
1822
1823 2010-06-29  Zhenyao Mo  <zmo@google.com>
1824
1825         Reviewed by Dimitri Glazkov.
1826
1827         Implement getAttachedShaders
1828         https://bugs.webkit.org/show_bug.cgi?id=31172
1829
1830         * bindings/js/JSWebGLRenderingContextCustom.cpp: JS binding for getAttachedShaders().
1831         (WebCore::JSWebGLRenderingContext::getAttachedShaders):
1832         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: V8 binding for getAttachedShaders().
1833         (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):
1834         * html/canvas/WebGLRenderingContext.cpp:
1835         (WebCore::WebGLRenderingContext::getAttachedShaders): Implementation of getAttachedShaders().
1836         (WebCore::WebGLRenderingContext::findShader): Helper function to find a shader object from its name.
1837         * html/canvas/WebGLRenderingContext.h: Declaration of getAttachedShaders().
1838         * html/canvas/WebGLRenderingContext.idl: Ditto.
1839         * platform/graphics/GraphicsContext3D.h: Ditto.
1840         * platform/graphics/mac/GraphicsContext3DMac.mm:
1841         (WebCore::GraphicsContext3D::getAttachedShaders): Implementation of getAttachedShaders().
1842
1843 2010-06-29  MORITA Hajime  <morrita@google.com>
1844
1845         Reviewed by Kent Tamura.
1846
1847         REGRESSION: [Chromium] <progress> appearance on windows looks not good
1848         https://bugs.webkit.org/show_bug.cgi?id=41343
1849         
1850         RenderThemeChromiumWin::paintProgressBar() should return false,
1851         which indicates the widget is painted.
1852         
1853         Test: fast/dom/HTMLProgressElement/progress-element.html
1854               * rebaselined with a wrong expectation.
1855
1856         * rendering/RenderThemeChromiumWin.cpp:
1857         (WebCore::RenderThemeChromiumWin::paintProgressBar):
1858
1859 2010-06-29  Kinuko Yasuda  <kinuko@chromium.org>
1860
1861         Reviewed by Jian Li.
1862
1863         Fix http/tests/local/blob/send-data-blob.html on Windows
1864         https://bugs.webkit.org/show_bug.cgi?id=41228
1865
1866         Fix a regression bug in the line-conversion code.
1867         Rewrite the line-conversion function with simpler functions to
1868         make it less error prone.
1869
1870         No new tests as this is for bug fixes.
1871
1872         * platform/BlobItem.cpp:
1873         (WebCore::StringBlobItem::convertToCString):
1874
1875 2010-06-29  Dumitru Daniliuc  <dumi@chromium.org>
1876
1877         Reviewed by Darin Fisher.
1878
1879         Implementing DatabaseSync::openDatabaseSync().
1880         https://bugs.webkit.org/show_bug.cgi?id=40607
1881
1882         1. Moved some common code from Database to AbstractDatabase.
1883         2. Made performOpenAndVerify() virtual, since DatabaseSync doesn't
1884            need to interact with DatabaseThread.
1885         3. Removed the m_creationCallback field, since it's only needed in
1886            the openDatabase{Sync} methods.
1887
1888         * storage/AbstractDatabase.cpp:
1889         (WebCore::retrieveTextResultFromDatabase):
1890         (WebCore::setTextValueInDatabase):
1891         (WebCore::guidMutex):
1892         (WebCore::guidToVersionMap):
1893         (WebCore::updateGuidVersionMap):
1894         (WebCore::guidToDatabaseMap):
1895         (WebCore::guidForOriginAndName):
1896         (WebCore::AbstractDatabase::databaseInfoTableName):
1897         (WebCore::AbstractDatabase::AbstractDatabase):
1898         (WebCore::AbstractDatabase::closeDatabase):
1899         (WebCore::AbstractDatabase::version):
1900         (WebCore::AbstractDatabase::performOpenAndVerify):
1901         (WebCore::AbstractDatabase::scriptExecutionContext):
1902         (WebCore::AbstractDatabase::securityOrigin):
1903         (WebCore::AbstractDatabase::stringIdentifier):
1904         (WebCore::AbstractDatabase::displayName):
1905         (WebCore::AbstractDatabase::estimatedSize):
1906         (WebCore::AbstractDatabase::fileName):
1907         (WebCore::AbstractDatabase::databaseVersionKey):
1908         (WebCore::AbstractDatabase::getVersionFromDatabase):
1909         (WebCore::AbstractDatabase::setVersionInDatabase):
1910         (WebCore::AbstractDatabase::versionMatchesExpected):
1911         (WebCore::AbstractDatabase::setExpectedVersion):
1912         (WebCore::AbstractDatabase::disableAuthorizer):
1913         (WebCore::AbstractDatabase::enableAuthorizer):
1914         (WebCore::AbstractDatabase::setAuthorizerReadOnly):
1915         (WebCore::AbstractDatabase::lastActionChangedDatabase):
1916         (WebCore::AbstractDatabase::lastActionWasInsert):
1917         (WebCore::AbstractDatabase::resetDeletes):
1918         (WebCore::AbstractDatabase::hadDeletes):
1919         (WebCore::AbstractDatabase::resetAuthorizer):
1920         * storage/AbstractDatabase.h:
1921         (WebCore::AbstractDatabase::opened):
1922         (WebCore::AbstractDatabase::isNew):
1923         (WebCore::AbstractDatabase::databaseDebugName):
1924         * storage/Database.cpp:
1925         (WebCore::DatabaseCreationCallbackTask::create):
1926         (WebCore::DatabaseCreationCallbackTask::performTask):
1927         (WebCore::DatabaseCreationCallbackTask::DatabaseCreationCallbackTask):
1928         (WebCore::Database::openDatabase):
1929         (WebCore::Database::Database):
1930         (WebCore::Database::version):
1931         (WebCore::Database::openAndVerifyVersion):
1932         (WebCore::Database::close):
1933         (WebCore::Database::stop):
1934         (WebCore::Database::performOpenAndVerify):
1935         * storage/Database.h:
1936         (WebCore::Database::sqliteDatabase):
1937         * storage/DatabaseAuthorizer.cpp:
1938         (WebCore::DatabaseAuthorizer::create):
1939         (WebCore::DatabaseAuthorizer::DatabaseAuthorizer):
1940         (WebCore::DatabaseAuthorizer::denyBasedOnTableName):
1941         * storage/DatabaseAuthorizer.h:
1942         * storage/DatabaseSync.cpp:
1943         (WebCore::DatabaseSync::openDatabaseSync):
1944         (WebCore::DatabaseSync::DatabaseSync):
1945         (WebCore::DatabaseSync::~DatabaseSync):
1946         (WebCore::DatabaseSync::markAsDeletedAndClose):
1947         (WebCore::CloseSyncDatabaseOnContextThreadTask::create):
1948         (WebCore::CloseSyncDatabaseOnContextThreadTask::performTask):
1949         (WebCore::CloseSyncDatabaseOnContextThreadTask::CloseSyncDatabaseOnContextThreadTask):
1950         (WebCore::DatabaseSync::closeImmediately):
1951         * storage/DatabaseSync.h:
1952         * storage/DatabaseTask.cpp:
1953         (WebCore::DatabaseOpenTask::DatabaseOpenTask):
1954         (WebCore::DatabaseOpenTask::doPerformTask):
1955         * storage/DatabaseTask.h:
1956         (WebCore::DatabaseOpenTask::create):
1957
1958 2010-06-29  François Sausset  <sausset@gmail.com>
1959
1960         Reviewed by Darin Adler.
1961
1962         Fix a bug when a msubsup element is inside a mrow element
1963         https://bugs.webkit.org/show_bug.cgi?id=36525
1964
1965         Test: mathml/presentation/subsup.xhtml
1966
1967         * mathml/RenderMathMLSubSup.cpp:
1968         (WebCore::RenderMathMLSubSup::stretchToHeight):
1969
1970 2010-06-29  Zhenyao Mo  <zmo@google.com>
1971
1972         Reviewed by Dimitri Glazkov.
1973
1974         uniformmatrix* should generate INVALID_VALUE with transpose = true
1975         https://bugs.webkit.org/show_bug.cgi?id=41235
1976
1977         Test: fast/canvas/webgl/gl-uniformmatrix4fv.html
1978
1979         * html/canvas/WebGLRenderingContext.cpp:
1980         (WebCore::WebGLRenderingContext::uniformMatrix2fv): Call validateUniformMatrixParameters instead.
1981         (WebCore::WebGLRenderingContext::uniformMatrix3fv): Ditto.
1982         (WebCore::WebGLRenderingContext::uniformMatrix4fv): Ditto.
1983         (WebCore::WebGLRenderingContext::validateUniformMatrixParameters): Validate input parameters for uniformMatrix*().
1984         * html/canvas/WebGLRenderingContext.h: Declare validateUniformMatrixParameters().
1985
1986 2010-06-29  Kenneth Russell  <kbr@google.com>
1987
1988         Reviewed by Dimitri Glazkov.
1989
1990         Support UNPACK_FLIP_Y_WEBGL and UNPACK_PREMULTIPLY_ALPHA_WEBGL for texImage2D taking ArrayBufferView
1991         https://bugs.webkit.org/show_bug.cgi?id=40398
1992
1993         Added support for UNPACK_FLIP_Y_WEBGL and UNPACK_PREMULTIPLY_ALPHA_WEBGL pixel store
1994         parameters to texImage2D and texSubImage2D entry points taking ArrayBufferView.
1995         More cleanly separated the unpacking and packing phases of user-supplied pixel data
1996         in GraphicsContext3D, and added support for unpack alignment. Fixed bug in handling
1997         of unpackAlignment in GraphicsContext3D::flipVertically. Necessarily added
1998         validation of the amount of data passed to texImage2D and texSubImage2D. Modified
1999         fast/canvas/webgl/tex-image-with-format-and-type.html to include premultiplied alpha
2000         tests for relevant source formats; added new test which exercises all combinations
2001         of UNPACK_FLIP_Y_WEBGL, UNPACK_PREMULTIPLY_ALPHA_WEBGL, and UNPACK_ALIGNMENT pixel
2002         store parameters.
2003
2004         Test: fast/canvas/webgl/tex-image-and-sub-image-2d-with-array-buffer-view.html
2005
2006         * html/canvas/WebGLRenderingContext.cpp:
2007         (WebCore::WebGLRenderingContext::texImage2D):
2008         (WebCore::WebGLRenderingContext::texSubImage2D):
2009         (WebCore::WebGLRenderingContext::validateTexFuncData):
2010         * html/canvas/WebGLRenderingContext.h:
2011         * platform/graphics/GraphicsContext3D.cpp:
2012         (WebCore::GraphicsContext3D::extractImageData):
2013         (WebCore::GraphicsContext3D::extractTextureData):
2014         (WebCore::GraphicsContext3D::flipVertically):
2015         (WebCore::doUnpackingAndPacking):
2016         (WebCore::computeIncrementParameters):
2017         (WebCore::doPacking):
2018         (WebCore::GraphicsContext3D::packPixels):
2019         * platform/graphics/GraphicsContext3D.h:
2020         (WebCore::GraphicsContext3D::):
2021         * platform/graphics/cg/GraphicsContext3DCG.cpp:
2022         (WebCore::GraphicsContext3D::getImageData):
2023         * platform/graphics/qt/GraphicsContext3DQt.cpp:
2024         (WebCore::GraphicsContext3D::getImageData):
2025         * platform/graphics/skia/GraphicsContext3DSkia.cpp:
2026         (WebCore::GraphicsContext3D::getImageData):
2027
2028 2010-06-29  Patrick Gansterer  <paroga@paroga.com>
2029
2030         Reviewed by Dirk Schulze.
2031
2032         Buildfix for !ENABLE(SVG_FOREIGN_OBJECT) after r61667.
2033         https://bugs.webkit.org/show_bug.cgi?id=41367
2034
2035         * svg/SVGSVGElement.cpp:
2036         (WebCore::SVGSVGElement::isOutermostSVG): Add missing ENABLE(SVG_FOREIGN_OBJECT).
2037
2038 2010-06-29  Patrick Gansterer  <paroga@paroga.com>
2039
2040         Reviewed by Darin Adler.
2041
2042         Buildfix after r62118.
2043         https://bugs.webkit.org/show_bug.cgi?id=41365
2044
2045         * rendering/RenderSVGRoot.cpp: Inlude missing RenderSVGResource.h.
2046
2047 2010-06-29  Sheriff Bot  <webkit.review.bot@gmail.com>
2048
2049         Unreviewed, rolling out r62052.
2050         http://trac.webkit.org/changeset/62052
2051         https://bugs.webkit.org/show_bug.cgi?id=41357
2052
2053         Causes crashes in JSLazyEventListener::initializeFunction (see
2054         bug 41352) (Requested by aroben on #webkit).
2055
2056         * bindings/js/ScriptEventListener.cpp:
2057         (WebCore::createAttributeEventListener):
2058         * bindings/js/ScriptEventListener.h:
2059         * bindings/v8/ScriptEventListener.cpp:
2060         (WebCore::createAttributeEventListener):
2061         * bindings/v8/ScriptEventListener.h:
2062         * html/HTMLBodyElement.cpp:
2063         (WebCore::HTMLBodyElement::parseMappedAttribute):
2064         * html/HTMLFrameSetElement.cpp:
2065         (WebCore::HTMLFrameSetElement::parseMappedAttribute):
2066         * svg/SVGSVGElement.cpp:
2067         (WebCore::SVGSVGElement::parseMappedAttribute):
2068
2069 2010-06-29  Sheriff Bot  <webkit.review.bot@gmail.com>
2070
2071         Unreviewed, rolling out r62129.
2072         http://trac.webkit.org/changeset/62129
2073         https://bugs.webkit.org/show_bug.cgi?id=41362
2074
2075         Needed to roll out r62052 (see bug 41357) (Requested by aroben
2076         on #webkit).
2077
2078         * bindings/js/ScriptEventListener.cpp:
2079         (WebCore::createWindowAttributeEventListener):
2080
2081 2010-06-29  Beth Dakin  <bdakin@apple.com>
2082
2083         Reviewed by Darin Adler.
2084
2085         Speculative fix for <rdar://problem/8071558> CrashTracer: [USER] 
2086         2300+ crashes in Safari at com.apple.WebCore: 
2087         WebCore::FrameView::scheduleRelayout + 352
2088
2089         Unfortunately, we don't have a reproducible case for this bug, and 
2090         therefore, we do not have a layout test either. It is pretty clear 
2091         from the logs that m_frame->settings() is null in 
2092         FrameView::scheduleRelayout() in the crashing case. 
2093         m_frame->settings() is null whenever page is null. Everywhere else 
2094         in FrameView.cpp we null-check either page or settings before using 
2095         settings. It seems plausible to me that scheduleRelayout could be 
2096         called when page is null, so the fix is just to add null-checks. 
2097
2098         * page/FrameView.cpp:
2099         (WebCore::FrameView::layout):
2100         (WebCore::FrameView::scheduleRelayout):
2101
2102 2010-06-29  Dan Bernstein  <mitz@apple.com>
2103
2104         Reviewed by Darin Adler.
2105
2106         <rdar://problem/7975842> Certain text is repeated after using splitText()
2107
2108         Tests: fast/text/setData-dirty-lines.html
2109                fast/text/splitText-dirty-lines.html
2110
2111         * dom/CharacterData.cpp:
2112         (WebCore::CharacterData::setData): Call RenderText::setTextWithOffset() rather than
2113         setText(), because only the former correctly dirties line boxes.
2114         * dom/Text.cpp:
2115         (WebCore::Text::splitText): Ditto.
2116
2117 2010-06-29  Sheriff Bot  <webkit.review.bot@gmail.com>
2118
2119         Unreviewed, rolling out r62073.
2120         http://trac.webkit.org/changeset/62073
2121         https://bugs.webkit.org/show_bug.cgi?id=41359
2122
2123         Necessary to fix chromium build when r62052 is rolled out.
2124         (Requested by dave_levin on #webkit).
2125
2126         * bindings/v8/ScriptEventListener.h:
2127
2128 2010-06-29  Vangelis Kokkevis  <vangelis@chromium.org>
2129
2130         Reviewed by Darin Fisher.
2131
2132         [Chromium] Hooking up WebGL layers to the gpu-compositor. Implement missing
2133         methods to set the contents of a GraphicsLayer with a platform specific WebGL
2134         Layer, and to update the contents of the WebGL Layer when needed.
2135         https://bugs.webkit.org/show_bug.cgi?id=41243
2136
2137         * platform/graphics/GraphicsContext3D.h:
2138         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
2139         (WebCore::GraphicsLayerChromium::setContentsToWebGL):
2140         * platform/graphics/chromium/GraphicsLayerChromium.h:
2141         * platform/graphics/chromium/LayerChromium.cpp:
2142         (WebCore::LayerChromium::removeAllSublayers):
2143           No need to call setNeedsCommit() from here as the previous call to
2144           layer->removeFromSuperlayer() will have that effect (and we only need
2145           to notify the owner if there were actually any sublayers removed).
2146         * platform/graphics/chromium/LayerChromium.h:
2147         * platform/graphics/chromium/LayerRendererChromium.cpp:
2148         (WebCore::LayerRendererChromium::drawLayer):
2149         * platform/graphics/chromium/WebGLLayerChromium.cpp:
2150         (WebCore::WebGLLayerChromium::create):
2151         (WebCore::WebGLLayerChromium::updateTextureContents):
2152         (WebCore::WebGLLayerChromium::setContext):
2153
2154 2010-06-29  Csaba Osztrogonác  <ossy@webkit.org>
2155
2156         Reviewed by Nikolas Zimmermann.
2157
2158         Buildfix for --minimal build after r62052
2159         https://bugs.webkit.org/show_bug.cgi?id=41338
2160
2161         * bindings/js/ScriptEventListener.cpp: #if ENABLE(SVG) guards added.
2162         (WebCore::createWindowAttributeEventListener):
2163
2164 2010-06-29  Brent Fulgham  <bfulgham@webkit.org>
2165
2166         Build fix. Not reviewd.
2167
2168         CGColor is only used for PLATFORM(CG).  Conditionalize include
2169         to correct build failure for WinCairo.
2170
2171         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
2172         Conditionalize use of CGColor.
2173
2174 2010-06-29  Martin Robinson  <mrobinson@igalia.com>
2175
2176         Reviewed by Xan Lopez.
2177
2178         [GTK] Clean up the source lists in the GNUMakefile.am files
2179         https://bugs.webkit.org/show_bug.cgi?id=41229
2180
2181         Clean up the GNUMakefile.am a little bit. Alphabetize and conglomerate
2182         the source lists.
2183
2184         * GNUmakefile.am:
2185
2186 2010-06-29  Martin Robinson  <mrobinson@igalia.com>
2187
2188         Reviewed by Xan Lopez.
2189
2190         [GTK] DragDataGtk should use DataObjectGtk as the platformDragData
2191         https://bugs.webkit.org/show_bug.cgi?id=40307
2192
2193         Use DataObjectGtk as the platformDragData for DragDataGtk. DataObjectGtk
2194         contains all the information necessary to keep track of drops in progress.
2195
2196         * platform/DragData.h: Use a DataObjectGtk* as the platform drag data.
2197         * platform/gtk/DragDataGtk.cpp:
2198         (WebCore::DragData::containsFiles): Retrieve information via platformDragData.
2199         (WebCore::DragData::asFilenames): Ditto.
2200         (WebCore::DragData::containsPlainText): Ditto.
2201         (WebCore::DragData::asPlainText): Ditto.
2202         (WebCore::DragData::createClipboard): Create the Clipboard with the platformDragData.
2203         (WebCore::DragData::containsCompatibleContent): Retrieve information via platformDragData.
2204         (WebCore::DragData::containsURL): Ditto.
2205         (WebCore::DragData::asURL): Ditto.
2206         (WebCore::DragData::asFragment): Ditto.
2207
2208 2010-06-29  Adam Langley  <agl@chromium.org>
2209
2210         Build fix. Not reviewd.
2211
2212         * platform/graphics/chromium/FontPlatformDataLinux.cpp:
2213         (WebCore::FontPlatformData::setupPaint):
2214           The name of the Skia function changed between writing this patch and
2215           commiting it.
2216
2217 2010-06-29  Adam Langley  <agl@chromium.org>
2218
2219         Reviewed by Kent Tamura.
2220
2221         [chromium] Support forced autohinting.
2222
2223         https://bugs.webkit.org/show_bug.cgi?id=40493
2224
2225         Freetype (the typical font rendering on Linux) includes an 'autohinter':
2226         an algorithm for hinting glyph shapes without using the embedded hinting
2227         bytecode in a font.
2228
2229         Some people prefer the autohinter's results, so we support forcing its
2230         use.
2231
2232         This change also fixes a bug where two FontPlatformData structures would
2233         compare equal, even if their rendering styles were different.
2234
2235         * platform/graphics/chromium/FontPlatformDataLinux.cpp:
2236         (WebCore::FontPlatformData::setupPaint):
2237           In order to compare FontPlatformData structures we need to make sure
2238           that they are initialised.
2239         (WebCore::FontPlatformData::operator==):
2240         * platform/graphics/chromium/FontRenderStyle.h:
2241         (WebCore::FontRenderStyle::FontRenderStyle):
2242         (WebCore::FontRenderStyle::operator==):
2243           This fixes the case where two FontPlatformData structures, differing
2244           only by rendering style, would compare equal.
2245
2246 2010-06-29  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2247
2248         Unreviewed, Symbian build fix.
2249
2250         Add more directories to USERINCLUDE so that they get included
2251         before the Symbian system headers.
2252
2253         This is a workaround to some toolchain problems; bug 31273 is used to
2254         find a better solution.
2255
2256         No new tests as there is no new functionality.
2257
2258         * WebCore.pro:
2259
2260 2010-06-29  Nikolas Zimmermann  <nzimmermann@rim.com>
2261
2262         Reviewed by Dirk Schulze.
2263
2264         Cleanup SVGRenderSupport
2265         https://bugs.webkit.org/show_bug.cgi?id=41347
2266
2267         Remove SVGRenderBase base class from all SVG renderers. It was meant as temporary solution until all SVG renderers inherit from RenderSVGModelObject,
2268         though this is not going to happen. RenderSVGModelObject inherits from RenderObject, making it impossible to inherit eg. RenderSVGImage from it, as
2269         it already indirectly inherits from RenderObject, through RenderImage. Other examples are RenderForeignObject (RenderBlock inheritance),
2270         RenderSVGInlineText (RenderText inheritance) etc.
2271
2272         Rename SVGRenderBase to SVGRenderSupport, just like the file is named, remove all free functions, and make them all static functions in SVGRenderSupport.
2273         We can still share code between all SVG renderers, but don't need a special base class for all renderers -> shrink size of all SVG renderers.
2274
2275         Doesn't affect any test.
2276
2277         * rendering/RenderBox.cpp: Remove localTransform() override, not needed at all.
2278         * rendering/RenderBox.h: Ditto.
2279         * rendering/RenderForeignObject.cpp: s/SVGRenderBase/SVGRenderSupport/
2280         (WebCore::RenderForeignObject::paint):
2281         (WebCore::RenderForeignObject::clippedOverflowRectForRepaint):
2282         (WebCore::RenderForeignObject::computeRectForRepaint):
2283         (WebCore::RenderForeignObject::nodeAtFloatPoint):
2284         (WebCore::RenderForeignObject::mapLocalToContainer):
2285         * rendering/RenderPath.cpp:
2286         (WebCore::BoundingRectStrokeStyleApplier::strokeStyle): applyStrokeStyleToContext is a static function in SVGRenderSupport now.
2287         (WebCore::RenderPath::paint): s/SVGRenderBase/SVGRenderSupport/
2288         (WebCore::RenderPath::nodeAtFloatPoint): Ditto.
2289         (WebCore::RenderPath::updateCachedBoundaries): Ditto.
2290         * rendering/RenderSVGBlock.h: Remove SVGRenderBase inheritance.
2291         * rendering/RenderSVGContainer.cpp:
2292         (WebCore::RenderSVGContainer::layout): layoutChildren is a static function in SVGRenderSupport now.
2293         (WebCore::RenderSVGContainer::paint): prepareToRenderSVGContent/finishRenderSVGContent are now static functions in SVGRenderSupport.
2294         (WebCore::RenderSVGContainer::objectBoundingBox): computeContainerBoundingBox is a static function in SVGRenderSupport now.
2295         (WebCore::RenderSVGContainer::strokeBoundingBox): Ditto.
2296         (WebCore::RenderSVGContainer::repaintRectInLocalCoordinates): Remove call to computeContainerBoundingBox, use strokeBoundingBox instead, for consistency.
2297         (WebCore::RenderSVGContainer::nodeAtFloatPoint): pointInClippingArea is a static function in SVGRenderSupport now.
2298         * rendering/RenderSVGHiddenContainer.cpp:
2299         (WebCore::RenderSVGHiddenContainer::layout): layoutChildren is a static function in SVGRenderSupport now.
2300         * rendering/RenderSVGImage.cpp:
2301         (WebCore::RenderSVGImage::paint): prepareToRenderSVGContent/finishRenderSVGContent are static functions in SVGRenderSupport now.
2302         (WebCore::RenderSVGImage::destroy): deregisterResource was renamed to invalidateAllResourcesOfRenderer and is a static function in SVGRenderSupport. 
2303         (WebCore::RenderSVGImage::nodeAtFloatPoint): pointInClippingArea is a static function in SVGRenderSupport now.
2304         (WebCore::RenderSVGImage::repaintRectInLocalCoordinates): intersectRepaintRectWithResources is a static function in SVGRenderSupport now.
2305         (WebCore::RenderSVGImage::clippedOverflowRectForRepaint): s/SVGRenderBase/SVGRenderSupport/
2306         (WebCore::RenderSVGImage::computeRectForRepaint): Ditto.
2307         (WebCore::RenderSVGImage::mapLocalToContainer): Ditto.
2308         * rendering/RenderSVGImage.h: Remove SVGRenderBase inheritance.
2309         * rendering/RenderSVGInline.cpp:
2310         (WebCore::RenderSVGInline::objectBoundingBox): findTextRootObject is a static function in SVGRenderSupport now.
2311         (WebCore::RenderSVGInline::strokeBoundingBox): Ditto.
2312         (WebCore::RenderSVGInline::repaintRectInLocalCoordinates): Ditto.
2313         (WebCore::RenderSVGInline::clippedOverflowRectForRepaint): s/SVGRenderBase/SVGRenderSupport/
2314         (WebCore::RenderSVGInline::computeRectForRepaint): Ditto,.
2315         (WebCore::RenderSVGInline::mapLocalToContainer): Ditto.
2316         (WebCore::RenderSVGInline::absoluteQuads): findTextRootObject is a static function in SVGRenderSupport now.
2317         * rendering/RenderSVGInline.h: Remove SVGRenderBase inheritance.
2318         * rendering/RenderSVGModelObject.cpp:
2319         (WebCore::RenderSVGModelObject::clippedOverflowRectForRepaint): s/SVGRenderBase/SVGRenderSupport/
2320         (WebCore::RenderSVGModelObject::computeRectForRepaint): Ditto.
2321         (WebCore::RenderSVGModelObject::mapLocalToContainer): Ditto.
2322         (WebCore::RenderSVGModelObject::destroy): deregisterResource was renamed to invalidateAllResourcesOfRenderer and is a static function in SVGRenderSupport.
2323         * rendering/RenderSVGModelObject.h: Remove SVGRenderBase inheritance.
2324         * rendering/RenderSVGResource.cpp:
2325         (WebCore::invalidatePaintingResource): Moved here from SVGRenderSupport (static inline helper function).
2326         (WebCore::RenderSVGResource::invalidateAllResourcesOfRenderer): Moved here from SVGRenderSupport and renamed from deregisterFromResources.
2327         * rendering/RenderSVGResource.h: Expose invalidateAllResourcesOfRenderer function.
2328         * rendering/RenderSVGResourceClipper.cpp:
2329         (WebCore::RenderSVGResourceClipper::createClipData): renderSubtreeToImage is a static function in SVGRenderSupport now.
2330         (WebCore::RenderSVGResourceClipper::hitTestClipContent): Ditto.
2331         * rendering/RenderSVGResourceGradient.cpp:
2332         (WebCore::createMaskAndSwapContextForTextGradient): findTextRootObject is a static function in SVGRenderSupport now.
2333         (WebCore::clipToTextMask): Ditto.
2334         (WebCore::RenderSVGResourceGradient::applyResource): applyStrokeStyleToContext is a static function in SVGRenderSupport now.
2335         (WebCore::RenderSVGResourceGradient::postApplyResource): findTextRootObject is a static function in SVGRenderSupport now.
2336         * rendering/RenderSVGResourceMarker.cpp:
2337         (WebCore::RenderSVGResourceMarker::applyViewportClip): s/SVGRenderBase/SVGRenderSupport/
2338         * rendering/RenderSVGResourceMasker.cpp:
2339         (WebCore::RenderSVGResourceMasker::createMaskImage): renderSubtreeToImage is a static function in SVGRenderSupport now.
2340         * rendering/RenderSVGResourcePattern.cpp:
2341         (WebCore::RenderSVGResourcePattern::applyResource): applyStrokeStyleToContext is a static function in SVGRenderSupport now.
2342         (WebCore::clampImageBufferSizeToViewport): Moved here from SVGRenderSupport.
2343         (WebCore::RenderSVGResourcePattern::createTileImage): renderSubtreeToImage is a static function in SVGRenderSupport now.
2344         * rendering/RenderSVGResourceSolidColor.cpp:
2345         (WebCore::RenderSVGResourceSolidColor::applyResource): applyStrokeStyleToContext is a static function in SVGRenderSupport now
2346         * rendering/RenderSVGRoot.cpp:
2347         (WebCore::RenderSVGRoot::layout): layoutChildren is a static function in SVGRenderSupport now.
2348         (WebCore::RenderSVGRoot::paint): prepareToRenderSVGContent/finishRenderSVGContent are now static functions in SVGRenderSupport.
2349         (WebCore::RenderSVGRoot::destroy): deregisterResource was renamed to invalidateAllResourcesOfRenderer and is a static function in SVGRenderSupport.
2350         (WebCore::RenderSVGRoot::repaintRectInLocalCoordinates): Remove call to computeContainerBoundingBox, use strokeBoundingBox instead, for consistency.
2351         * rendering/RenderSVGRoot.h: Remove localTransform() override, no longer needed. Remove SVGRenderBase inheritance.
2352         (WebCore::RenderSVGRoot::objectBoundingBox): Inlined for speeed. 
2353         (WebCore::RenderSVGRoot::strokeBoundingBox): computeContainerBoundingBox is a static function in SVGRenderSupport now.
2354         * rendering/RenderSVGText.cpp: 
2355         (WebCore::RenderSVGText::clippedOverflowRectForRepaint): s/SVGRenderBase/SVGRenderSupport/
2356         (WebCore::RenderSVGText::computeRectForRepaint): Ditto.
2357         (WebCore::RenderSVGText::mapLocalToContainer): Ditto.
2358         (WebCore::RenderSVGText::nodeAtFloatPoint): pointInClippingArea is a static function in SVGRenderSupport now.
2359         (WebCore::RenderSVGText::destroy): deregisterResource was renamed to invalidateAllResourcesOfRenderer and is a static function in SVGRenderSupport.
2360         (WebCore::RenderSVGText::repaintRectInLocalCoordinates): intersectRepaintRectWithResources is a static function in SVGRenderSupport now.
2361         * rendering/RenderSVGViewportContainer.cpp:
2362         (WebCore::RenderSVGViewportContainer::applyViewportClip): s/SVGRenderBase/SVGRenderSupport/
2363         (WebCore::RenderSVGViewportContainer::pointIsInsideViewportClip): pointInClippingArea is a static function in SVGRenderSupport now.
2364         * rendering/SVGInlineFlowBox.cpp:
2365         (WebCore::SVGInlineFlowBox::paint): prepareToRenderSVGContent/finishRenderSVGContent are now static functions in SVGRenderSupport.
2366         * rendering/SVGRenderSupport.cpp: Make it impossible to construct the class. Remove virtual destructor, made all methods static.
2367         (WebCore::SVGRenderSupport::clippedOverflowRectForRepaint): s/SVGRenderBase/SVGRenderSupport/
2368         (WebCore::SVGRenderSupport::computeRectForRepaint): Ditto.
2369         (WebCore::SVGRenderSupport::mapLocalToContainer): Ditto.
2370         (WebCore::SVGRenderSupport::prepareToRenderSVGContent): Ditto.
2371         (WebCore::SVGRenderSupport::finishRenderSVGContent): Ditto.
2372         (WebCore::SVGRenderSupport::renderSubtreeToImage): Made static.
2373         (WebCore::SVGRenderSupport::computeContainerBoundingBox): Ditto.
2374         (WebCore::SVGRenderSupport::layoutChildren): Ditto.
2375         (WebCore::SVGRenderSupport::isOverflowHidden): s/SVGRenderBase/SVGRenderSupport/
2376         (WebCore::SVGRenderSupport::intersectRepaintRectWithResources): Ditto.
2377         (WebCore::SVGRenderSupport::pointInClippingArea): Made static.
2378         (WebCore::SVGRenderSupport::dashArrayFromRenderingStyle): Ditto.
2379         (WebCore::SVGRenderSupport::applyStrokeStyleToContext): Ditto.
2380         (WebCore::SVGRenderSupport::findTextRootObject): Ditto.
2381         * rendering/SVGRenderSupport.h:
2382         * rendering/SVGRenderTreeAsText.cpp:
2383         (WebCore::writeStyle): dashArrayFromRenderingStyle is a static function in SVGRenderSupport now.
2384         * rendering/SVGRootInlineBox.cpp:
2385         (WebCore::SVGRootInlineBox::paint): s/SVGRenderBase/SVGRenderSupport/
2386         * rendering/SVGRootInlineBox.h: Remove SVGRenderBase inheritance.
2387         * svg/SVGFEImageElement.cpp: Add RenderObject.h include, otherwhise it won't build anymore.
2388         (WebCore::SVGFEImageElement::build): renderSubtreeToImage is a static function in SVGRenderSupport now.
2389         * svg/SVGStyledElement.cpp: 
2390         (WebCore::SVGStyledElement::svgAttributeChanged): deregisterResource was renamed to invalidateAllResourcesOfRenderer and is a static function in SVGRenderSupport.
2391
2392 2010-06-21  Philippe Normand  <pnormand@igalia.com>
2393
2394         Reviewed by Xan Lopez.
2395
2396         [PNG decoder] direct access to jmpbuf is deprecated in libpng >= 1.4.0beta103
2397         https://bugs.webkit.org/show_bug.cgi?id=40907
2398
2399         Define a JMPBUF macro to cope with deprecation of the jmpbuf
2400         attribute in libpng >= 1.4.
2401
2402         * platform/image-decoders/png/PNGImageDecoder.cpp:
2403         (WebCore::decodingFailed):
2404         (WebCore::PNGImageReader::decode):
2405         (WebCore::PNGImageDecoder::headerAvailable):
2406         (WebCore::PNGImageDecoder::rowAvailable):
2407
2408 2010-06-29  Kristian Amlie  <kristian.amlie@nokia.com>
2409
2410         Reviewed by Simon Hausmann.
2411
2412         [Qt/Symbian] Fixed deployment paths for WebKit declarative plugin.
2413
2414         * WebCore.pro:
2415
2416 2010-06-29  Yury Semikhatsky  <yurys@chromium.org>
2417
2418         Unreviewed: Chromium Win and Mac build fix.
2419
2420         * bindings/v8/ScriptDebugServer.cpp:
2421         (WebCore::ScriptDebugServer::setBreakpoint):
2422
2423 2010-06-29  Nikolas Zimmermann  <nzimmermann@rim.com>
2424
2425         Reviewed by Dirk Schulze.
2426
2427         Move PaintInfo/PaintPhase into their own headers, out of RenderObject
2428         https://bugs.webkit.org/show_bug.cgi?id=41342
2429
2430         1) Move enums PaintPhase/PaintBehaviorFlags and the PaintBehaviour typedef from RenderObject into PaintPhase.h.
2431            Move PaintInfo from RenderObject into PaintInfo.h. Replace s/RenderObject::PaintInfo/PaintInfo/ throughout WebCore/.
2432            Also move the OverlapTestRequestMap typedef into PaintInfo.h, and replace s/RenderObject::OverlapTestRequestMap/OverlapTestRequestMap/ everywhere.
2433
2434         2) Move "RenderObject* paintingRootForChildren(PaintInfo& paintInfo) const" from RenderObject to PaintInfo
2435            and modify it to take a renderer: "void updatePaintingRootForChildren(const RenderObject* renderer)".
2436
2437         This changes a common idiom:
2438         -    info.paintingRoot = paintingRootForChildren(paintInfo);
2439         +    info.updatePaintingRootForChildren(this);
2440
2441         We save resetting the paintingRoot to 0 if it was 0 already and thus do less work.
2442
2443         3) Move "bool shouldPaintWithinRoot(PaintInfo& paintInfo) const" from RenderObject to PaintInfo
2444            and modify it to take a renderer: "bool shouldPaintWithinRoot(const RenderObject* renderer) const".
2445
2446         This changes a common idiom:
2447         -    if (!shouldPaintWithinRoot(paintInfo))
2448         +    if (!paintInfo.shouldPaintWithinRoot(this))
2449
2450         4) Move "void applyTransformToPaintInfo(RenderObject::PaintInfo&, const AffineTransform& localToChildTransform)"
2451            from SVGRenderSupport to PaintInfo and rename it to "applyTransform", guarded with ENABLE(SVG) blocks.
2452
2453         This changes a common idiom:
2454         -    applyTransformToPaintInfo(childPaintInfo, localToParentTransform());
2455         +    childPaintInfo.applyTransform(localToParentTransform());
2456
2457         Add PaintInfo.h / PaintPhase.h to all build systems that list headers.
2458
2459         * GNUmakefile.am:
2460         * WebCore.gypi:
2461         * WebCore.pro:
2462         * WebCore.vcproj/WebCore.vcproj:
2463         * WebCore.xcodeproj/project.pbxproj:
2464         * platform/android/RenderThemeAndroid.cpp:
2465         (WebCore::getCanvasFromInfo):
2466         (WebCore::RenderThemeAndroid::paintCheckbox):
2467         (WebCore::RenderThemeAndroid::paintButton):
2468         (WebCore::RenderThemeAndroid::paintRadio):
2469         (WebCore::RenderThemeAndroid::paintTextField):
2470         (WebCore::RenderThemeAndroid::paintTextArea):
2471         (WebCore::RenderThemeAndroid::paintSearchField):
2472         (WebCore::RenderThemeAndroid::paintCombo):
2473         (WebCore::RenderThemeAndroid::paintMenuList):
2474         (WebCore::RenderThemeAndroid::paintMenuListButton):
2475         * platform/android/RenderThemeAndroid.h:
2476         * platform/efl/RenderThemeEfl.cpp:
2477         (WebCore::RenderThemeEfl::paintThemePart):
2478         (WebCore::RenderThemeEfl::paintCheckbox):
2479         (WebCore::RenderThemeEfl::paintRadio):
2480         (WebCore::RenderThemeEfl::paintButton):
2481         (WebCore::RenderThemeEfl::paintMenuList):
2482         (WebCore::RenderThemeEfl::paintTextField):
2483         (WebCore::RenderThemeEfl::paintTextArea):
2484         (WebCore::RenderThemeEfl::paintSearchFieldDecoration):
2485         (WebCore::RenderThemeEfl::paintSearchFieldResultsButton):
2486         (WebCore::RenderThemeEfl::paintSearchFieldResultsDecoration):
2487         (WebCore::RenderThemeEfl::paintSearchFieldCancelButton):
2488         (WebCore::RenderThemeEfl::paintSearchField):
2489         * platform/efl/RenderThemeEfl.h:
2490         * platform/gtk/RenderThemeGtk.cpp:
2491         (WebCore::paintMozillaGtkWidget):
2492         (WebCore::RenderThemeGtk::paintCheckbox):
2493         (WebCore::RenderThemeGtk::paintRadio):
2494         (WebCore::RenderThemeGtk::paintButton):
2495         (WebCore::RenderThemeGtk::paintMenuList):
2496         (WebCore::RenderThemeGtk::paintTextField):
2497         (WebCore::RenderThemeGtk::paintTextArea):
2498         (WebCore::RenderThemeGtk::paintSearchFieldResultsButton):
2499         (WebCore::RenderThemeGtk::paintSearchFieldResultsDecoration):
2500         (WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
2501         (WebCore::RenderThemeGtk::paintSearchField):
2502         (WebCore::RenderThemeGtk::paintSliderTrack):
2503         (WebCore::RenderThemeGtk::paintSliderThumb):
2504         (WebCore::RenderThemeGtk::paintMediaFullscreenButton):
2505         (WebCore::RenderThemeGtk::paintMediaMuteButton):
2506         (WebCore::RenderThemeGtk::paintMediaPlayButton):
2507         (WebCore::RenderThemeGtk::paintMediaSeekBackButton):
2508         (WebCore::RenderThemeGtk::paintMediaSeekForwardButton):
2509         (WebCore::RenderThemeGtk::paintMediaSliderTrack):
2510         (WebCore::RenderThemeGtk::paintMediaSliderThumb):
2511         (WebCore::RenderThemeGtk::paintProgressBar):
2512         * platform/gtk/RenderThemeGtk.h:
2513         * platform/haiku/RenderThemeHaiku.cpp:
2514         (WebCore::RenderThemeHaiku::paintCheckbox):
2515         (WebCore::RenderThemeHaiku::paintRadio):
2516         (WebCore::RenderThemeHaiku::paintMenuList):
2517         * platform/haiku/RenderThemeHaiku.h:
2518         * platform/qt/RenderThemeQt.cpp:
2519         (WebCore::StylePainter::StylePainter):
2520         (WebCore::RenderThemeQt::paintCheckbox):
2521         (WebCore::RenderThemeQt::paintRadio):
2522         (WebCore::RenderThemeQt::paintButton):
2523         (WebCore::RenderThemeQt::paintTextField):
2524         (WebCore::RenderThemeQt::paintTextArea):
2525         (WebCore::RenderThemeQt::paintMenuList):
2526         (WebCore::RenderThemeQt::paintMenuListButton):
2527         (WebCore::RenderThemeQt::paintProgressBar):
2528         (WebCore::RenderThemeQt::paintSliderTrack):
2529         (WebCore::RenderThemeQt::paintSliderThumb):
2530         (WebCore::RenderThemeQt::paintSearchField):
2531         (WebCore::RenderThemeQt::paintSearchFieldCancelButton):
2532         (WebCore::RenderThemeQt::paintSearchFieldDecoration):
2533         (WebCore::RenderThemeQt::paintSearchFieldResultsDecoration):
2534         (WebCore::RenderThemeQt::paintMediaFullscreenButton):
2535         (WebCore::RenderThemeQt::paintMediaMuteButton):
2536         (WebCore::RenderThemeQt::paintMediaPlayButton):
2537         (WebCore::RenderThemeQt::paintMediaSeekBackButton):
2538         (WebCore::RenderThemeQt::paintMediaSeekForwardButton):
2539         (WebCore::RenderThemeQt::paintMediaCurrentTime):
2540         (WebCore::RenderThemeQt::paintMediaVolumeSliderTrack):
2541         (WebCore::RenderThemeQt::paintMediaVolumeSliderThumb):
2542         (WebCore::RenderThemeQt::paintMediaSliderTrack):
2543         (WebCore::RenderThemeQt::paintMediaSliderThumb):
2544         * platform/qt/RenderThemeQt.h:
2545         * platform/wx/RenderThemeWx.cpp:
2546         (WebCore::RenderThemeWx::paintCheckbox):
2547         (WebCore::RenderThemeWx::paintRadio):
2548         (WebCore::RenderThemeWx::paintButton):
2549         (WebCore::RenderThemeWx::paintTextField):
2550         (WebCore::RenderThemeWx::paintMenuList):
2551         (WebCore::RenderThemeWx::paintMenuListButton):
2552         * rendering/EllipsisBox.cpp:
2553         (WebCore::EllipsisBox::paint):
2554         * rendering/EllipsisBox.h:
2555         * rendering/InlineBox.cpp:
2556         (WebCore::InlineBox::paint):
2557         * rendering/InlineBox.h:
2558         * rendering/InlineFlowBox.cpp:
2559         (WebCore::InlineFlowBox::paint):
2560         (WebCore::InlineFlowBox::paintFillLayers):
2561         (WebCore::InlineFlowBox::paintFillLayer):
2562         (WebCore::InlineFlowBox::paintBoxDecorations):
2563         (WebCore::InlineFlowBox::paintMask):
2564         (WebCore::InlineFlowBox::paintTextDecorations):
2565         * rendering/InlineFlowBox.h:
2566         * rendering/InlineTextBox.cpp:
2567         (WebCore::InlineTextBox::paint):
2568         * rendering/InlineTextBox.h:
2569         * rendering/PaintInfo.h: Added.
2570         (WebCore::PaintInfo::PaintInfo):
2571         (WebCore::PaintInfo::updatePaintingRootForChildren):
2572         (WebCore::PaintInfo::shouldPaintWithinRoot):
2573         (WebCore::PaintInfo::applyTransform):
2574         * rendering/PaintPhase.h: Added.
2575         (WebCore::):
2576         * rendering/RenderBlock.cpp:
2577         (WebCore::RenderBlock::paint):
2578         (WebCore::RenderBlock::paintChildren):
2579         (WebCore::RenderBlock::paintEllipsisBoxes):
2580         (WebCore::clipOutPositionedObjects):
2581         (WebCore::RenderBlock::layoutColumns):
2582         * rendering/RenderBox.cpp:
2583         (WebCore::RenderBox::paint):
2584         (WebCore::RenderBox::paintBoxDecorations):
2585         (WebCore::RenderBox::paintMask):
2586         * rendering/RenderFieldset.cpp:
2587         (WebCore::RenderFieldset::paintBoxDecorations):
2588         * rendering/RenderForeignObject.cpp:
2589         (WebCore::RenderForeignObject::paint):
2590         * rendering/RenderLayer.cpp:
2591         (WebCore::RenderLayer::paint):
2592         (WebCore::performOverlapTests):
2593         (WebCore::RenderLayer::paintLayer):
2594         (WebCore::RenderLayer::paintList):
2595         (WebCore::RenderLayer::paintPaginatedChildLayer):
2596         (WebCore::RenderLayer::paintChildLayerIntoColumns):
2597         * rendering/RenderLayer.h:
2598         * rendering/RenderLayerBacking.cpp:
2599         (WebCore::RenderLayerBacking::paintIntoLayer):
2600         * rendering/RenderLineBoxList.cpp:
2601         (WebCore::RenderLineBoxList::paint):
2602         * rendering/RenderLineBoxList.h:
2603         * rendering/RenderMediaControls.cpp:
2604         (WebCore::RenderMediaControls::paintMediaControlsPart):
2605         * rendering/RenderMediaControls.h:
2606         * rendering/RenderMediaControlsChromium.cpp:
2607         (WebCore::paintMediaMuteButton):
2608         (WebCore::paintMediaPlayButton):
2609         (WebCore::paintMediaSlider):
2610         (WebCore::paintMediaSliderThumb):
2611         (WebCore::paintMediaVolumeSlider):
2612         (WebCore::paintMediaVolumeSliderThumb):
2613         (WebCore::paintMediaTimelineContainer):
2614         (WebCore::RenderMediaControlsChromium::paintMediaControlsPart):
2615         * rendering/RenderMediaControlsChromium.h:
2616         * rendering/RenderObject.h:
2617         * rendering/RenderPath.cpp:
2618         (WebCore::RenderPath::paint):
2619         * rendering/RenderReplaced.cpp:
2620         (WebCore::RenderReplaced::paint):
2621         (WebCore::RenderReplaced::shouldPaint):
2622         * rendering/RenderSVGContainer.cpp:
2623         (WebCore::RenderSVGContainer::paint):
2624         * rendering/RenderSVGResourceMarker.cpp:
2625         (WebCore::RenderSVGResourceMarker::draw):
2626         * rendering/RenderSVGResourceMarker.h:
2627         * rendering/RenderSVGRoot.cpp:
2628         (WebCore::RenderSVGRoot::paint):
2629         * rendering/RenderSVGText.cpp:
2630         (WebCore::RenderSVGText::paint):
2631         * rendering/RenderScrollbarPart.cpp:
2632         (WebCore::RenderScrollbarPart::paintIntoRect):
2633         * rendering/RenderTable.cpp:
2634         (WebCore::RenderTable::paintObject):
2635         (WebCore::RenderTable::paintBoxDecorations):
2636         * rendering/RenderTableCell.cpp:
2637         (WebCore::RenderTableCell::paint):
2638         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
2639         (WebCore::RenderTableCell::paintBoxDecorations):
2640         * rendering/RenderTheme.cpp:
2641         (WebCore::RenderTheme::paint):
2642         (WebCore::RenderTheme::paintBorderOnly):
2643         (WebCore::RenderTheme::paintDecorations):
2644         (WebCore::RenderTheme::paintMeter):
2645         * rendering/RenderTheme.h:
2646         (WebCore::RenderTheme::paintCapsLockIndicator):
2647         (WebCore::RenderTheme::paintCheckbox):
2648         (WebCore::RenderTheme::paintRadio):
2649         (WebCore::RenderTheme::paintButton):
2650         (WebCore::RenderTheme::paintInnerSpinButton):
2651         (WebCore::RenderTheme::paintOuterSpinButton):
2652         (WebCore::RenderTheme::paintTextField):
2653         (WebCore::RenderTheme::paintTextArea):
2654         (WebCore::RenderTheme::paintMenuList):
2655         (WebCore::RenderTheme::paintMenuListButton):
2656         (WebCore::RenderTheme::paintProgressBar):
2657         (WebCore::RenderTheme::paintSliderTrack):
2658         (WebCore::RenderTheme::paintSliderThumb):
2659         (WebCore::RenderTheme::paintSearchField):
2660         (WebCore::RenderTheme::paintSearchFieldCancelButton):
2661         (WebCore::RenderTheme::paintSearchFieldDecoration):
2662         (WebCore::RenderTheme::paintSearchFieldResultsDecoration):
2663         (WebCore::RenderTheme::paintSearchFieldResultsButton):
2664         (WebCore::RenderTheme::paintMediaFullscreenButton):
2665         (WebCore::RenderTheme::paintMediaPlayButton):
2666         (WebCore::RenderTheme::paintMediaMuteButton):
2667         (WebCore::RenderTheme::paintMediaSeekBackButton):
2668         (WebCore::RenderTheme::paintMediaSeekForwardButton):
2669         (WebCore::RenderTheme::paintMediaSliderTrack):
2670         (WebCore::RenderTheme::paintMediaSliderThumb):
2671         (WebCore::RenderTheme::paintMediaVolumeSliderContainer):
2672         (WebCore::RenderTheme::paintMediaVolumeSliderTrack):
2673         (WebCore::RenderTheme::paintMediaVolumeSliderThumb):
2674         (WebCore::RenderTheme::paintMediaRewindButton):
2675         (WebCore::RenderTheme::paintMediaReturnToRealtimeButton):
2676         (WebCore::RenderTheme::paintMediaToggleClosedCaptionsButton):
2677         (WebCore::RenderTheme::paintMediaControlsBackground):
2678         (WebCore::RenderTheme::paintMediaCurrentTime):
2679         (WebCore::RenderTheme::paintMediaTimeRemaining):
2680         * rendering/RenderThemeChromiumMac.h:
2681         * rendering/RenderThemeChromiumMac.mm:
2682         (WebCore::RenderThemeChromiumMac::paintMediaPlayButton):
2683         (WebCore::RenderThemeChromiumMac::paintMediaMuteButton):
2684         (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack):
2685         (WebCore::RenderThemeChromiumMac::paintMediaControlsBackground):
2686         (WebCore::RenderThemeChromiumMac::paintMediaVolumeSliderTrack):
2687         (WebCore::RenderThemeChromiumMac::paintMediaVolumeSliderThumb):
2688         * rendering/RenderThemeChromiumSkia.cpp:
2689         (WebCore::RenderThemeChromiumSkia::paintCheckbox):
2690         (WebCore::RenderThemeChromiumSkia::paintRadio):
2691         (WebCore::paintButtonLike):
2692         (WebCore::RenderThemeChromiumSkia::paintButton):
2693         (WebCore::RenderThemeChromiumSkia::paintTextField):
2694         (WebCore::RenderThemeChromiumSkia::paintTextArea):
2695         (WebCore::RenderThemeChromiumSkia::paintSearchField):
2696         (WebCore::RenderThemeChromiumSkia::paintSearchFieldCancelButton):
2697         (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsDecoration):
2698         (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton):
2699         (WebCore::RenderThemeChromiumSkia::paintMediaControlsBackground):
2700         (WebCore::RenderThemeChromiumSkia::paintMediaSliderTrack):
2701         (WebCore::RenderThemeChromiumSkia::paintMediaVolumeSliderTrack):
2702         (WebCore::RenderThemeChromiumSkia::paintMediaSliderThumb):
2703         (WebCore::RenderThemeChromiumSkia::paintMediaVolumeSliderThumb):
2704         (WebCore::RenderThemeChromiumSkia::paintMediaPlayButton):
2705         (WebCore::RenderThemeChromiumSkia::paintMediaMuteButton):
2706         (WebCore::RenderThemeChromiumSkia::paintMenuList):
2707         (WebCore::RenderThemeChromiumSkia::paintMenuListButton):
2708         (WebCore::RenderThemeChromiumSkia::paintSliderTrack):
2709         (WebCore::RenderThemeChromiumSkia::paintSliderThumb):
2710         (WebCore::RenderThemeChromiumSkia::paintProgressBar):
2711         * rendering/RenderThemeChromiumSkia.h:
2712         * rendering/RenderThemeChromiumWin.cpp:
2713         (WebCore::RenderThemeChromiumWin::paintCheckbox):
2714         (WebCore::RenderThemeChromiumWin::paintRadio):
2715         (WebCore::RenderThemeChromiumWin::paintButton):
2716         (WebCore::RenderThemeChromiumWin::paintTextField):
2717         (WebCore::RenderThemeChromiumWin::paintSliderTrack):
2718         (WebCore::RenderThemeChromiumWin::paintSliderThumb):
2719         (WebCore::RenderThemeChromiumWin::paintMenuList):
2720         (WebCore::RenderThemeChromiumWin::paintTextFieldInternal):
2721         (WebCore::RenderThemeChromiumWin::paintProgressBar):
2722         * rendering/RenderThemeChromiumWin.h:
2723         * rendering/RenderThemeMac.h:
2724         * rendering/RenderThemeMac.mm:
2725         (WebCore::RenderThemeMac::paintTextField):
2726         (WebCore::RenderThemeMac::paintCapsLockIndicator):
2727         (WebCore::RenderThemeMac::paintTextArea):
2728         (WebCore::RenderThemeMac::paintMenuList):
2729         (WebCore::RenderThemeMac::paintMeter):
2730         (WebCore::RenderThemeMac::paintProgressBar):
2731         (WebCore::RenderThemeMac::paintMenuListButtonGradients):
2732         (WebCore::RenderThemeMac::paintMenuListButton):
2733         (WebCore::RenderThemeMac::paintSliderTrack):
2734         (WebCore::RenderThemeMac::paintSliderThumb):
2735         (WebCore::RenderThemeMac::paintSearchField):
2736         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
2737         (WebCore::RenderThemeMac::paintSearchFieldDecoration):
2738         (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration):
2739         (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
2740         (WebCore::getUnzoomedRectAndAdjustCurrentContext):
2741         (WebCore::RenderThemeMac::paintMediaFullscreenButton):
2742         (WebCore::RenderThemeMac::paintMediaMuteButton):
2743         (WebCore::RenderThemeMac::paintMediaPlayButton):
2744         (WebCore::RenderThemeMac::paintMediaSeekBackButton):
2745         (WebCore::RenderThemeMac::paintMediaSeekForwardButton):
2746         (WebCore::RenderThemeMac::paintMediaSliderTrack):
2747         (WebCore::RenderThemeMac::paintMediaSliderThumb):
2748         (WebCore::RenderThemeMac::paintMediaRewindButton):
2749         (WebCore::RenderThemeMac::paintMediaReturnToRealtimeButton):
2750         (WebCore::RenderThemeMac::paintMediaToggleClosedCaptionsButton):
2751         (WebCore::RenderThemeMac::paintMediaControlsBackground):
2752         (WebCore::RenderThemeMac::paintMediaCurrentTime):
2753         (WebCore::RenderThemeMac::paintMediaTimeRemaining):
2754         * rendering/RenderThemeSafari.cpp:
2755         (WebCore::RenderThemeSafari::paintCheckbox):
2756         (WebCore::RenderThemeSafari::paintRadio):
2757         (WebCore::RenderThemeSafari::paintButton):
2758         (WebCore::RenderThemeSafari::paintTextField):
2759         (WebCore::RenderThemeSafari::paintCapsLockIndicator):
2760         (WebCore::RenderThemeSafari::paintTextArea):
2761         (WebCore::RenderThemeSafari::paintMenuList):
2762         (WebCore::RenderThemeSafari::paintMenuListButtonGradients):
2763         (WebCore::RenderThemeSafari::paintMenuListButton):
2764         (WebCore::RenderThemeSafari::paintSliderTrack):
2765         (WebCore::RenderThemeSafari::paintSliderThumb):
2766         (WebCore::RenderThemeSafari::paintSearchField):
2767         (WebCore::RenderThemeSafari::paintSearchFieldCancelButton):
2768         (WebCore::RenderThemeSafari::paintSearchFieldDecoration):
2769         (WebCore::RenderThemeSafari::paintSearchFieldResultsDecoration):
2770         (WebCore::RenderThemeSafari::paintSearchFieldResultsButton):
2771         (WebCore::RenderThemeSafari::paintMediaFullscreenButton):
2772         (WebCore::RenderThemeSafari::paintMediaMuteButton):
2773         (WebCore::RenderThemeSafari::paintMediaPlayButton):
2774         (WebCore::RenderThemeSafari::paintMediaSeekBackButton):
2775         (WebCore::RenderThemeSafari::paintMediaSeekForwardButton):
2776         (WebCore::RenderThemeSafari::paintMediaSliderTrack):
2777         (WebCore::RenderThemeSafari::paintMediaSliderThumb):
2778         * rendering/RenderThemeSafari.h:
2779         * rendering/RenderThemeWin.cpp:
2780         (WebCore::RenderThemeWin::paintButton):
2781         (WebCore::RenderThemeWin::paintTextField):
2782         (WebCore::RenderThemeWin::paintMenuList):
2783         (WebCore::RenderThemeWin::paintMenuListButton):
2784         (WebCore::RenderThemeWin::paintSliderTrack):
2785         (WebCore::RenderThemeWin::paintSliderThumb):
2786         (WebCore::RenderThemeWin::paintSearchField):
2787         (WebCore::RenderThemeWin::paintSearchFieldCancelButton):
2788         (WebCore::RenderThemeWin::paintSearchFieldResultsDecoration):
2789         (WebCore::RenderThemeWin::paintSearchFieldResultsButton):
2790         (WebCore::RenderThemeWin::paintMediaFullscreenButton):
2791         (WebCore::RenderThemeWin::paintMediaMuteButton):
2792         (WebCore::RenderThemeWin::paintMediaPlayButton):
2793         (WebCore::RenderThemeWin::paintMediaSeekBackButton):
2794         (WebCore::RenderThemeWin::paintMediaSeekForwardButton):
2795         (WebCore::RenderThemeWin::paintMediaSliderTrack):
2796         (WebCore::RenderThemeWin::paintMediaSliderThumb):
2797         (WebCore::RenderThemeWin::paintMediaToggleClosedCaptionsButton):
2798         * rendering/RenderThemeWin.h:
2799         (WebCore::RenderThemeWin::paintCheckbox):
2800         (WebCore::RenderThemeWin::paintRadio):
2801         (WebCore::RenderThemeWin::paintTextArea):
2802         (WebCore::RenderThemeWin::paintSearchFieldDecoration):
2803         * rendering/RenderThemeWince.cpp:
2804         (WebCore::RenderThemeWince::paintButton):
2805         (WebCore::RenderThemeWince::paintTextField):
2806         (WebCore::RenderThemeWince::paintMenuList):
2807         (WebCore::RenderThemeWince::paintMenuListButton):
2808         (WebCore::RenderThemeWince::paintSearchField):
2809         (WebCore::RenderThemeWince::paintSearchFieldCancelButton):
2810         (WebCore::RenderThemeWince::paintSearchFieldResultsDecoration):
2811         (WebCore::RenderThemeWince::paintSearchFieldResultsButton):
2812         (WebCore::RenderThemeWince::paintSliderTrack):
2813         (WebCore::RenderThemeWince::paintSliderThumb):
2814         (WebCore::RenderThemeWince::paintMediaFullscreenButton):
2815         (WebCore::RenderThemeWince::paintMediaMuteButton):
2816         (WebCore::RenderThemeWince::paintMediaPlayButton):
2817         (WebCore::RenderThemeWince::paintMediaSeekBackButton):
2818         (WebCore::RenderThemeWince::paintMediaSeekForwardButton):
2819         (WebCore::RenderThemeWince::paintMediaSliderTrack):
2820         (WebCore::RenderThemeWince::paintMediaSliderThumb):
2821         * rendering/RenderThemeWince.h:
2822         (WebCore::RenderThemeWince::paintCheckbox):
2823         (WebCore::RenderThemeWince::paintRadio):
2824         (WebCore::RenderThemeWince::paintTextArea):
2825         (WebCore::RenderThemeWince::paintSearchFieldDecoration):
2826         * rendering/RootInlineBox.cpp:
2827         (WebCore::RootInlineBox::paintEllipsisBox):
2828         (WebCore::RootInlineBox::paintCustomHighlight):
2829         (WebCore::RootInlineBox::paint):
2830         (WebCore::RootInlineBox::fillLineSelectionGap):
2831         * rendering/RootInlineBox.h:
2832         * rendering/SVGInlineFlowBox.cpp:
2833         (WebCore::SVGInlineFlowBox::paint):
2834         * rendering/SVGInlineFlowBox.h:
2835         * rendering/SVGInlineTextBox.cpp:
2836         (WebCore::SVGInlineTextBox::paint):
2837         * rendering/SVGInlineTextBox.h:
2838         * rendering/SVGMarkerLayoutInfo.cpp:
2839         (WebCore::SVGMarkerLayoutInfo::drawMarkers):
2840         * rendering/SVGMarkerLayoutInfo.h:
2841         * rendering/SVGRenderSupport.cpp:
2842         (WebCore::SVGRenderBase::prepareToRenderSVGContent):
2843         (WebCore::SVGRenderBase::finishRenderSVGContent):
2844         (WebCore::renderSubtreeToImage):
2845         * rendering/SVGRenderSupport.h:
2846         * rendering/SVGRootInlineBox.cpp:
2847         (WebCore::SVGRootInlineBox::paint):
2848         * rendering/SVGRootInlineBox.h:
2849
2850 2010-06-29  Nikolas Zimmermann  <nzimmermann@rim.com>
2851
2852         Not reviewed. Sort Xcode project file.
2853
2854         * WebCore.xcodeproj/project.pbxproj:
2855
2856 2010-06-29  Nikolas Zimmermann  <nzimmermann@rim.com>
2857
2858         Reviewed by Dirk Schulze.
2859
2860         Provide floating-point support for text selection framework
2861         https://bugs.webkit.org/show_bug.cgi?id=40665
2862
2863         Rename 'glyphScale' to 'horizontalGlyphStretch' upon Dans' request.
2864         Also guard the variables in ENABLE(SVG) blocks. Initialize variable to 1 instead of 1.0f, as that's the new style rule.
2865
2866         No functional changes, thus no new tests.
2867
2868         * platform/graphics/TextRun.h:
2869         (WebCore::TextRun::TextRun):
2870         (WebCore::TextRun::horizontalGlyphStretch):
2871         (WebCore::TextRun::setHorizontalGlyphStretch):
2872         (WebCore::TextRun::spacingDisabled):
2873         * platform/graphics/WidthIterator.cpp:
2874         (WebCore::WidthIterator::advance):
2875         * rendering/SVGInlineTextBox.cpp:
2876         (WebCore::SVGInlineTextBox::offsetForPosition):
2877
2878 2010-06-29  Nikolas Zimmermann  <nzimmermann@rim.com>
2879
2880         Reviewed by Dirk Schulze.
2881
2882         REGRESSION: text-shadow CSS applied to SVG no longer works
2883         https://bugs.webkit.org/show_bug.cgi?id=40960
2884
2885         Readd text-shadow support, this time supporting multiple shadows.
2886         It's not exactly like HTML, because SVG draws fill/stroke phases seperated - the png shows the difference.
2887
2888         Tests: svg/css/text-shadow-multiple.xhtml
2889
2890         * rendering/InlineTextBox.cpp:
2891         (WebCore::InlineTextBox::applyShadowToGraphicsContext): Refactored from paintTextWithShadows(), so SVG can reuse.
2892         (WebCore::paintTextWithShadows): Use refactored applyShadowToGraphicsContext() function.
2893         * rendering/InlineTextBox.h: 
2894         * rendering/SVGInlineTextBox.cpp:
2895         (WebCore::SVGInlineTextBox::paintTextWithShadows): Added.
2896         (WebCore::SVGInlineTextBox::paintText): Call paintTextWithShadows() instead of directly drawing the text.
2897         * rendering/SVGInlineTextBox.h:
2898
2899 2010-06-29  Pavel Podivilov  <podivilov@chromium.org>
2900
2901         Reviewed by Yury Semikhatsky.
2902
2903         Web Inspector: show actual breakpoint position in UI.
2904         When user sets breakpoint from UI, javascript engine may actually set
2905         it on a different line. If so, move breakpoint to the correct position
2906         in frontend.
2907         https://bugs.webkit.org/show_bug.cgi?id=40781
2908
2909         * bindings/js/ScriptDebugServer.cpp:
2910         (WebCore::ScriptDebugServer::setBreakpoint):
2911         (WebCore::ScriptDebugServer::dispatchDidPause):
2912         * bindings/js/ScriptDebugServer.h:
2913         * bindings/v8/ScriptDebugServer.cpp:
2914         (WebCore::ScriptDebugServer::setBreakpoint):
2915         (WebCore::ScriptDebugServer::currentCallFrame):
2916         * bindings/v8/ScriptDebugServer.h:
2917         * inspector/InspectorBackend.cpp:
2918         (WebCore::InspectorBackend::setBreakpoint):
2919         * inspector/InspectorBackend.h:
2920         * inspector/InspectorBackend.idl:
2921         * inspector/InspectorController.cpp:
2922         (WebCore::InspectorController::didCommitLoad):
2923         (WebCore::InspectorController::setBreakpoint):
2924         (WebCore::InspectorController::removeBreakpoint):
2925         (WebCore::InspectorController::didParseSource):
2926         * inspector/InspectorController.h:
2927         * inspector/InspectorFrontend.cpp:
2928         (WebCore::InspectorFrontend::didSetBreakpoint):
2929         * inspector/InspectorFrontend.h:
2930         * inspector/front-end/BreakpointManager.js:
2931         (WebInspector.BreakpointManager.prototype.setOneTimeBreakpoint):
2932         (WebInspector.BreakpointManager.prototype.removeOneTimeBreakpoint):
2933         (WebInspector.BreakpointManager.prototype.setBreakpoint):
2934         (WebInspector.BreakpointManager.prototype.restoredBreakpoint):
2935         (WebInspector.BreakpointManager.prototype.removeBreakpoint):
2936         (WebInspector.BreakpointManager.prototype._setBreakpoint):
2937         (WebInspector.BreakpointManager.prototype._removeBreakpoint):
2938         (WebInspector.BreakpointManager.prototype._setBreakpointOnBackend.didSetBreakpoint):
2939         (WebInspector.BreakpointManager.prototype._setBreakpointOnBackend):
2940         (WebInspector.Breakpoint.prototype.set enabled):
2941         (WebInspector.Breakpoint.prototype.set condition):
2942         * inspector/front-end/InspectorBackendStub.js:
2943         (.WebInspector.InspectorBackendStub.prototype.setBreakpoint):
2944         * inspector/front-end/ScriptView.js:
2945         (WebInspector.ScriptView.prototype._addBreakpoint):
2946         * inspector/front-end/SourceView.js:
2947         (WebInspector.SourceView.prototype._addBreakpoint):
2948
2949 2010-06-29  Dumitru Daniliuc  <dumi@chromium.org>
2950
2951         Reviewed by Adam Barth.
2952
2953         Catch toString() exceptions in all DB-related code.
2954         https://bugs.webkit.org/show_bug.cgi?id=41297
2955
2956         * bindings/v8/custom/V8BindingMacros.h:
2957         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2958         (WebCore::V8DOMWindow::openDatabaseCallback):
2959         * bindings/v8/custom/V8DatabaseCustom.cpp:
2960         (WebCore::V8Database::changeVersionCallback):
2961         * bindings/v8/custom/V8DatabaseSyncCustom.cpp:
2962         (WebCore::V8DatabaseSync::changeVersionCallback):
2963         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
2964         (WebCore::V8SQLTransaction::executeSqlCallback):
2965         * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
2966         (WebCore::V8SQLTransactionSync::executeSqlCallback):
2967         * bindings/v8/custom/V8WorkerContextCustom.cpp:
2968         (WebCore::V8WorkerContext::openDatabaseCallback):
2969         (WebCore::V8WorkerContext::openDatabaseSyncCallback):
2970
2971 2010-06-29  Herczeg Zoltan  <zherczeg@webkit.org>
2972
2973         Rubber-stamped by Nikolas Zimmermann.
2974
2975         Windows build fix.
2976         https://bugs.webkit.org/show_bug.cgi?id=5861
2977
2978         * svg/SVGFEConvolveMatrixElement.cpp:
2979         (WebCore::SVGFEConvolveMatrixElement::build):
2980
2981 2010-06-29  Zoltan Herczeg  <zherczeg@webkit.org>
2982
2983         Reviewed by Nikolas Zimmermann.
2984
2985         Add ConvolveMatrix SVG filter effect
2986         https://bugs.webkit.org/show_bug.cgi?id=5861
2987
2988         The patch was originally started by Dirk Schulze,
2989         and the .cpp and .h files are mostly his work.
2990         I updated the build systems and do some minor updates
2991         to the source files as well. The patch does not contain
2992         the implementation of the filter: this is intended,
2993         and will be landed in a follow-up patch.
2994
2995         * Android.derived.jscbindings.mk:
2996         * Android.derived.v8bindings.mk:
2997         * Android.mk:
2998         * CMakeLists.txt:
2999         * DerivedSources.cpp:
3000         * DerivedSources.make:
3001         * GNUmakefile.am:
3002         * WebCore.gypi:
3003         * WebCore.pri:
3004         * WebCore.pro:
3005         * WebCore.vcproj/WebCore.vcproj:
3006         * WebCore.xcodeproj/project.pbxproj:
3007         * bindings/objc/DOM.mm:
3008         (WebCore::createElementClassMap):
3009         * bindings/objc/DOMSVG.h:
3010         * page/DOMWindow.idl:
3011         * svg/SVGAllInOne.cpp:
3012         * svg/SVGFEConvolveMatrixElement.cpp: Added.
3013         (WebCore::SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement):
3014         (WebCore::SVGFEConvolveMatrixElement::~SVGFEConvolveMatrixElement):
3015         (WebCore::SVGFEConvolveMatrixElement::parseMappedAttribute):
3016         (WebCore::SVGFEConvolveMatrixElement::setOrder):
3017         (WebCore::SVGFEConvolveMatrixElement::setKernelUnitLength):
3018         (WebCore::SVGFEConvolveMatrixElement::build):
3019         * svg/SVGFEConvolveMatrixElement.h: Added.
3020         * svg/SVGFEConvolveMatrixElement.idl: Added.
3021         * svg/graphics/filters/SVGFEConvolveMatrix.cpp:
3022         (WebCore::FEConvolveMatrix::FEConvolveMatrix):
3023         (WebCore::FEConvolveMatrix::create):
3024         (WebCore::FEConvolveMatrix::kernelSize):
3025         (WebCore::FEConvolveMatrix::setKernelSize):
3026         (WebCore::FEConvolveMatrix::targetOffset):
3027         (WebCore::FEConvolveMatrix::setTargetOffset):
3028         (WebCore::operator<<):
3029         (WebCore::FEConvolveMatrix::externalRepresentation):
3030         * svg/graphics/filters/SVGFEConvolveMatrix.h:
3031         (WebCore::):
3032         * svg/svgattrs.in:
3033         * svg/svgtags.in:
3034
3035 2010-06-28  Adam Barth  <abarth@webkit.org>
3036
3037         Reviewed by Eric Seidel.
3038
3039         HTML5 tree builder shouldn't ASSERT on HTML5lib test suite
3040         https://bugs.webkit.org/show_bug.cgi?id=41335
3041
3042         Sketch out the EndTag handling for InBodyMode.
3043
3044         * html/HTMLTreeBuilder.cpp:
3045         (WebCore::HTMLTreeBuilder::processEndTag):
3046         * html/HTMLTreeBuilder.h:
3047         (WebCore::HTMLTreeBuilder::ElementStack::inScope):
3048         (WebCore::HTMLTreeBuilder::clearActiveFormatingElementsUpToLastMarker):
3049         (WebCore::HTMLTreeBuilder::generateImpliedEndTags):
3050
3051 2010-06-28  David Levin  <levin@chromium.org>
3052
3053         Reviewed by NOBODY (chromium build fix).
3054
3055         * rendering/RenderObject.h: Add missing forward declaration.
3056
3057 2010-06-28  Adam Barth  <abarth@webkit.org>
3058
3059         Unreviewed.
3060
3061         I accidently gave up my ref and tried to dereference a null pointer.
3062         This code is keeping an extra ref that it doesn't need, but that fact
3063         was somewhat hidden before.
3064
3065         * dom/ContainerNode.cpp:
3066         (WebCore::ContainerNode::addChildCommon):
3067         (WebCore::ContainerNode::parserAddChild):
3068         (WebCore::ContainerNode::legacyParserAddChild):
3069         * dom/ContainerNode.h:
3070
3071 2010-06-28  Adam Barth  <abarth@webkit.org>
3072
3073         Unreviewed.
3074
3075         Refactor common code into addChildCommon
3076         https://bugs.webkit.org/show_bug.cgi?id=41326
3077
3078         Eric asked that we share the common code between these codepaths.
3079
3080         * dom/ContainerNode.cpp:
3081         (WebCore::ContainerNode::addChildCommon):
3082         (WebCore::ContainerNode::parserAddChild):
3083         (WebCore::ContainerNode::addChild):
3084         * dom/ContainerNode.h:
3085
3086 2010-06-28  Eric Seidel  <eric@webkit.org>
3087
3088         Reviewed by Adam Barth.
3089
3090         Implement HTMLTreeBuilder::reconstructTheActiveFormattingElements
3091         https://bugs.webkit.org/show_bug.cgi?id=41319
3092
3093         Restructure the code to not use in-band data, which is what
3094         got us in trouble with a signed/unsigned mismatch before.
3095
3096         * html/HTMLTreeBuilder.cpp:
3097         (WebCore::HTMLTreeBuilder::indexOfFirstUnopenFormattingElement):
3098         (WebCore::HTMLTreeBuilder::reconstructTheActiveFormattingElements):
3099         * html/HTMLTreeBuilder.h:
3100
3101 2010-06-28  Daniel Bates  <dbates@rim.com>
3102
3103         Unreviewed, attempt to fix Qt bots.
3104
3105         Attempt to fix the build after changeset 62079 <http://trac.webkit.org/changeset/62079>
3106         (https://bugs.webkit.org/show_bug.cgi?id=41324).
3107
3108         Rename some more call sites that were missed in the initial landing.
3109
3110         * dom/XMLDocumentParserQt.cpp:
3111         (WebCore::XMLDocumentParser::parseStartElement):
3112         (WebCore::XMLDocumentParser::parseProcessingInstruction):
3113         (WebCore::XMLDocumentParser::parseCdata):
3114         (WebCore::XMLDocumentParser::parseComment):
3115         (WebCore::XMLDocumentParser::parseDtd):
3116
3117 2010-06-28  Daniel Bates  <dbates@rim.com>
3118
3119         Unreviewed, build fix.
3120
3121         Change return type of method HTMLTreeBuilder::reconstructTheActiveFormattingElements()
3122         from int to unsigned.
3123
3124         Attempt to fix the build after changeset 62077 <https://trac.webkit.org/changeset/62077>
3125         (https://bugs.webkit.org/show_bug.cgi?id=41319).
3126
3127         * html/HTMLTreeBuilder.cpp:
3128         (WebCore::HTMLTreeBuilder::indexOfLastOpenFormattingElementOrMarker):
3129         (WebCore::HTMLTreeBuilder::reconstructTheActiveFormattingElements):
3130         * html/HTMLTreeBuilder.h:
3131
3132 2010-06-28  Eric Seidel  <eric@webkit.org>
3133
3134         Reviewed by Adam Barth.
3135
3136         Rename ContainerNode::addChild to legacyParserAddChild to indicate its parser-only intended use
3137         https://bugs.webkit.org/show_bug.cgi?id=41324
3138
3139         A bunch of places in the code were calling ContainerNode::addChild.
3140         I don't think they actually want to be doing that, as it has special
3141         form-related handling which is part of LegacyHTMLTreeBuilder.
3142
3143         No functional changes, thus no tests.
3144
3145         * dom/ContainerNode.cpp:
3146         (WebCore::ContainerNode::legacyParserAddChild):
3147         * dom/ContainerNode.h:
3148         * dom/DOMImplementation.cpp:
3149         (WebCore::DOMImplementation::createDocument):
3150         * dom/Node.cpp:
3151         (WebCore::Node::legacyParserAddChild):
3152         * dom/Node.h:
3153         * html/HTMLKeygenElement.cpp:
3154         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
3155         * html/HTMLTableElement.cpp:
3156         (WebCore::HTMLTableElement::legacyParserAddChild):
3157         * html/HTMLTableElement.h:
3158         * html/HTMLTableRowElement.cpp:
3159         (WebCore::HTMLTableRowElement::legacyParserAddChild):
3160         * html/HTMLTableRowElement.h:
3161         * html/HTMLTableSectionElement.cpp:
3162         (WebCore::HTMLTableSectionElement::legacyParserAddChild):
3163         * html/HTMLTableSectionElement.h:
3164         * html/HTMLViewSourceDocument.cpp:
3165         (WebCore::HTMLViewSourceDocument::createContainingTable):
3166         (WebCore::HTMLViewSourceDocument::addSpanWithClassName):
3167         (WebCore::HTMLViewSourceDocument::addLine):
3168         (WebCore::HTMLViewSourceDocument::addText):
3169         (WebCore::HTMLViewSourceDocument::addLink):
3170
3171 2010-06-28  Eric Seidel  <eric@webkit.org>
3172
3173         Reviewed by Adam Barth.
3174
3175         Implement HTMLTreeBuilder::reconstructTheActiveFormattingElements
3176         https://bugs.webkit.org/show_bug.cgi?id=41319
3177
3178         This is basically a direct transcription of HTML5 TreeBuilder spec:
3179          http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#list-of-active-formatting-elements
3180
3181         This code is covered by various tests in html5lib/runner which we
3182         can't run yet due to other asserts.  Adam and I are working on
3183         getting rid of those ASSERTS so that this (and other code) will
3184         be better tested shortly.
3185
3186         * html/HTMLTreeBuilder.cpp:
3187         (WebCore::HTMLTreeBuilder::insertFormatingElement):
3188         (WebCore::HTMLTreeBuilder::reconstructTheActiveFormattingElements):
3189         * html/HTMLTreeBuilder.h:
3190         (WebCore::HTMLTreeBuilder::ElementStack::contains):
3191         (WebCore::HTMLTreeBuilder::FormatingElementEntry::FormatingElementEntry):
3192         (WebCore::HTMLTreeBuilder::FormatingElementEntry::):
3193         (WebCore::HTMLTreeBuilder::FormatingElementEntry::isMarker):
3194         (WebCore::HTMLTreeBuilder::FormatingElementEntry::element):
3195         (WebCore::HTMLTreeBuilder::FormatingElementEntry::replaceElement):
3196
3197 2010-06-28  Adam Barth  <abarth@webkit.org>
3198
3199         Reviewed by Eric Seidel.
3200
3201         Fix ASSERT so we can run more HTML5lib tests
3202         https://bugs.webkit.org/show_bug.cgi?id=41325
3203
3204         We can't call Node::addChild because that function contains a bunch of
3205         logic from the old parser.  Instead, this patch creates a new version
3206         of addChild that's does less validating (that's the tree builder's
3207         job).
3208
3209         * dom/ContainerNode.cpp:
3210         (WebCore::ContainerNode::parserAddChild):
3211         * dom/ContainerNode.h:
3212         * dom/Node.cpp:
3213         (WebCore::Node::parserAddChild):
3214         * dom/Node.h:
3215         * html/HTMLTreeBuilder.h:
3216         (WebCore::HTMLTreeBuilder::attach):
3217
3218 2010-06-28  David Levin  <levin@chromium.org>
3219
3220         Reviewed by NOBODY (chromium build fix).
3221
3222         * bindings/v8/ScriptEventListener.h: Changed forward declaration
3223           to correspond to the code change doing in r62052.
3224
3225 2010-06-28  Brady Eidson  <beidson@apple.com>
3226
3227         Reviewed by Alexey Proskuryakov.
3228
3229         Support for https://bugs.webkit.org/show_bug.cgi?id=40484
3230
3231         In working on adding beforeProcess, it becomes necessary for JSLazyEventListeners to always know what their
3232         original Node* was, even if it was a window event listener.
3233
3234         For HTMLFrameSet, HTMLBody, and SVGSVG elements, a second form of createAttributeEventListener was used that
3235         took a Frame* argument and didn't set the original Node* on the JSLazyEventListener.
3236
3237         This patch changes that form of the function to createWindowAttributeEventListener, and passes the Node* along
3238         for later use by the beforeProcess mechanism.
3239
3240         No new tests. (No change in behavior)
3241
3242         * bindings/js/ScriptEventListener.cpp:
3243         (WebCore::createWindowAttributeEventListener): Renamed from createAttributeEventListener, takes a Node* instead
3244           of a Frame*, and figures out the Frame* itself internally.
3245         * bindings/js/ScriptEventListener.h:
3246
3247         * bindings/v8/ScriptEventListener.cpp:
3248         (WebCore::createWindowAttributeEventListener): Renamed from createAttributeEventListener, takes a Node* instead
3249           of a Frame*, and figures out the Frame* itself internally. Note that V8LazyEventListener doesn't allow us to
3250           pass the Element* argument in so this beforeprocess feature won't fully work on V8 builds until this is changed.
3251         * bindings/v8/ScriptEventListener.h:
3252
3253         * html/HTMLBodyElement.cpp:
3254         (WebCore::HTMLBodyElement::parseMappedAttribute): Use createWindowAttributeEventListener instead.
3255         * html/HTMLFrameSetElement.cpp:
3256         (WebCore::HTMLFrameSetElement::parseMappedAttribute): Ditto.
3257         * svg/SVGSVGElement.cpp:
3258         (WebCore::SVGSVGElement::parseMappedAttribute): Ditto. Also add some missing copyright dates that `svn log` proves
3259           should be there.
3260
3261 2010-06-28  John Gregg  <johnnyg@google.com>
3262
3263         Reviewed by Kent Tamura.
3264
3265         add ENABLE_DIRECTORY_UPLOAD build support
3266         https://bugs.webkit.org/show_bug.cgi?id=41100
3267
3268         * Configurations/FeatureDefines.xcconfig:
3269         * GNUmakefile.am:
3270         * WebCore.pri:
3271
3272 2010-06-28  Adam Barth  <abarth@webkit.org>
3273
3274         Reviewed by Eric Seidel.
3275
3276         Don't use the new tree builder for fragments
3277         https://bugs.webkit.org/show_bug.cgi?id=41316
3278
3279         We need to walk before we can run.  After this change, we can run the
3280         runner.html tests (with the ASSERT caveat).
3281
3282         * html/HTMLTreeBuilder.cpp:
3283         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
3284
3285 2010-06-28  Adam Barth  <abarth@webkit.org>
3286
3287         Reviewed by Eric Seidel.
3288
3289         The new tree builder should actually finish building the tree
3290         https://bugs.webkit.org/show_bug.cgi?id=41314
3291
3292         Again, this patch makes progress on runner.html, but I haven't removed
3293         the ASSERT yet.
3294
3295         * html/HTMLTreeBuilder.cpp:
3296         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
3297         (WebCore::HTMLTreeBuilder::finished):
3298         * html/HTMLTreeBuilder.h:
3299
3300 2010-06-28  Dumitru Daniliuc  <dumi@chromium.org>
3301
3302         Reviewed by Eric Seidel.
3303
3304         Fix a race condition that can happen when using DBs in workers.
3305         https://bugs.webkit.org/show_bug.cgi?id=41105
3306
3307         * storage/DatabaseTracker.cpp:
3308         (WebCore::DatabaseTracker::addOpenDatabase):
3309         * storage/DatabaseTracker.h:
3310
3311 2010-06-28  Adam Barth  <abarth@webkit.org>
3312
3313         Reviewed by Eric Seidel.
3314
3315         Add text nodes to the DOM
3316         https://bugs.webkit.org/show_bug.cgi?id=41306
3317
3318         Actually add some text nodes to the DOM when parsing a document.  We're
3319         going to need to do something fancier here eventually, but this gets us
3320         past the error we're seeing currently in runner.html.
3321
3322         Unfortunately, this patch "regresses" runner.html in the sense that we
3323         now hit an assert, but it's still an improvement...  I'll update the
3324         HTML5 expectations once we get past the assert.
3325
3326         * html/HTMLTreeBuilder.cpp:
3327         (WebCore::HTMLTreeBuilder::processCharacter):
3328         (WebCore::HTMLTreeBuilder::insertTextNode):
3329         * html/HTMLTreeBuilder.h:
3330
3331 2010-06-28  Beth Dakin  <bdakin@apple.com>
3332
3333         Build fix for non-PATH_BASED_BORDER_RADIUS_DRAWING platforms.
3334
3335         * rendering/RenderBoxModelObject.cpp:
3336
3337 2010-06-28  Andreas Kling  <andreas.kling@nokia.com>
3338
3339         Reviewed by Kenneth Rohde Christiansen.
3340
3341         [Qt] Use HTML5-conformant gradient interpolation mode
3342         https://bugs.webkit.org/show_bug.cgi?id=41298
3343
3344         Change the Qt Gradient implementation to use ComponentInterpolation mode.
3345
3346         Spec link:
3347         http://www.whatwg.org/specs/web-apps/current-work/#colors-and-styles
3348
3349         * platform/graphics/qt/GradientQt.cpp:
3350         (WebCore::Gradient::platformGradient):
3351
3352 2010-06-28  Beth Dakin  <bdakin@apple.com>
3353
3354         Reviewed by Sam Weinig.
3355
3356         Fix for https://bugs.webkit.org/show_bug.cgi?id=9197 CSS3: Borders 
3357         with border-radius and double, groove, or ridge styles should look 
3358         better
3359
3360         This patch re-works border radius painting to stroke paths instead 
3361         of arcs. 
3362
3363         Added new function clipConvexPolygon(). Added static 
3364         addConvexPolygonToContext so that code can be shared between 
3365         drawConvexPolygon() and clipConvexPolygon().
3366         * platform/graphics/GraphicsContext.h:
3367         * platform/graphics/cg/GraphicsContextCG.cpp:
3368         (WebCore::addConvexPolygonToContext):
3369         (WebCore::GraphicsContext::drawConvexPolygon):
3370         (WebCore::GraphicsContext::clipConvexPolygon):
3371
3372         Shells of implementations on non-CG platforms.
3373         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3374         (WebCore::GraphicsContext::clipConvexPolygon):
3375         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
3376         (WebCore::GraphicsContext::clipConvexPolygon):
3377         * platform/graphics/qt/GraphicsContextQt.cpp:
3378         (WebCore::GraphicsContext::clipConvexPolygon):
3379         * platform/graphics/skia/GraphicsContextSkia.cpp:
3380         (WebCore::GraphicsContext::clipConvexPolygon):
3381         * platform/graphics/wince/GraphicsContextWince.cpp:
3382         (WebCore::GraphicsContext::clipConvexPolygon):
3383         * platform/graphics/wx/GraphicsContextWx.cpp:
3384         (WebCore::GraphicsContext::clipConvexPolygon):
3385
3386         This new helper function determines if the inner corners of the 
3387         border will arch in or meet at a right angle. 
3388         * rendering/RenderBoxModelObject.cpp:
3389         (WebCore::borderWillArcInnerEdge):
3390
3391         This function is re-written so that, for each side of the border, 
3392         if borderWillArcInnerEdge() is true, we go down a brand new code 
3393         path of clipping to a convex polygon for the border side and then 
3394         we paint the side using the new function drawBoxSideFromPath(). If 
3395         borderWillArcInnerEdge() is false, then we call into the old 
3396         familiar drawLineForBoxSide() which relies on the rounder clip 
3397         rects we have set up to arch the outer edge of the border.
3398         (WebCore::RenderBoxModelObject::paintBorder):
3399
3400         This new function does the math to figure out the convex polygon 
3401         to clip to in the case where we need to arch the inner edge of the 
3402         border. This calls into a new GraphicsContext function that is only 
3403         implemented on CG at this time. This is the reason we are keeping 
3404         around an old version of paintBorder() for now.
3405         (WebCore::RenderBoxModelObject::clipBorderSidePolygon):
3406         * rendering/RenderBoxModelObject.h:
3407
3408         borderInnerRect() is a new convenience function called from 
3409         RenderObject and RenderBoxModelObject to determine the rect of the 
3410         inside edge of the border.
3411         * rendering/RenderObject.cpp:
3412         (WebCore::RenderObject::borderInnerRect):
3413
3414         This new function re-works drawArcForBoxSide to draw from Paths 
3415         when appropriate instead of stroking arcs. 
3416         (WebCore::RenderObject::drawBoxSideFromPath):
3417
3418         Keep this around for that do not HAVE(PATH_BASED_BORDER_RADIUS_DRAWING) until 
3419         GraphicsContext::clipConvexPolygon() is implemented.
3420         (WebCore::RenderObject::drawArcForBoxSide):
3421         * rendering/RenderObject.h:
3422
3423         New function 
3424         RenderStyle::getInnerBorderRadiiForRectWithBorderWidths() gets the 
3425         inner radius values for a rect. It takes border widths a parameters 
3426         rather than using the style's border widths so that it can be used 
3427         in inner radius calculations for double and groove/ridge 
3428         calculations. The W3C corner constraining rules were moved to a 
3429         static function that can be called from both getBorderRadiiForRect
3430         () and getInnerBorderRadiiForRectWithBorderWidths().
3431         * rendering/style/RenderStyle.cpp:
3432         (WebCore::constrainCornerRadiiForRect):
3433         (WebCore::RenderStyle::getBorderRadiiForRect):
3434         (WebCore::RenderStyle::getInnerBorderRadiiForRectWithBorderWidths):
3435         * rendering/style/RenderStyle.h:
3436
3437 2010-06-28  Martin Robinson  <mrobinson@igalia.com>
3438
3439         Reviewed by Xan Lopez.
3440
3441         [GTK] Add support for the progress bar tag
3442         https://bugs.webkit.org/show_bug.cgi?id=41014
3443
3444         Add support for rendering the progress tag for WebKit GTK+.
3445
3446         * GNUmakefile.am:
3447         * platform/gtk/RenderThemeGtk.cpp:
3448         (WebCore::RenderThemeGtk::animationRepeatIntervalForProgressBar):
3449         Added. Currently progress bar animations are disabled. As it looks like
3450         there may not be a good way to support this with Mozilla's theme drawing code.
3451         (WebCore::RenderThemeGtk::animationDurationForProgressBar): Ditto.
3452         (WebCore::RenderThemeGtk::adjustProgressBarStyle): Added.
3453         (WebCore::RenderThemeGtk::paintProgressBar): Added.
3454         * platform/gtk/RenderThemeGtk.h: Add declarations for new methods.
3455         * platform/gtk/gtk2drawing.c: 
3456         (moz_gtk_get_progress_widget): Expose the progress widget so that the chunk can be positioned properly.
3457         * platform/gtk/gtkdrawing.h: Added declaration for moz_gtk_get_progress_widget.
3458
3459 2010-06-28  Adam Barth  <abarth@webkit.org>
3460
3461         Reviewed by Eric Seidel.
3462
3463         HTML5 Regression: Crash in insert()
3464         https://bugs.webkit.org/show_bug.cgi?id=41281
3465
3466         We need to call endIfDelayed() outside of the script nesting block
3467         because endIfDelayed() might call end(), which deletes the
3468         HTMLDocumentParser.  If we try to exit the script nesting block after
3469         the HTMLDocumentParser has been deleted, we'll decrement unallocated
3470         memory, which is bad times.
3471
3472         Moving endIfDelayed outside of the script nesting block also lets us
3473         avoid ending if inWrite() is true.  If we're inWrite(), then there's
3474         folks above us on the stack who will crash of the HTMLDocumentParser is
3475         deallocated.  Adding this check matches the LegacyHTMLDocumentParser
3476         and the logic in attemptToEnd, facilitating a small refactoring of the
3477         common logic for improved readability.
3478
3479         I don't know of any test case that changes in behavior because of this
3480         patch, but this bug exists on the same line of code that the reliablity
3481         tests crashed.  I'm not sure whether this patch will fix that crash,
3482         but removing bugs (even theoretical ones) seems like a good idea.
3483
3484         * html/HTMLDocumentParser.cpp:
3485         (WebCore::HTMLDocumentParser::insert):
3486         (WebCore::HTMLDocumentParser::append):
3487         (WebCore::HTMLDocumentParser::attemptToEnd):
3488         (WebCore::HTMLDocumentParser::endIfDelayed):
3489         (WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution):
3490         * html/HTMLDocumentParser.h:
3491         (WebCore::HTMLDocumentParser::shouldDelayEnd):
3492
3493 2010-06-28  Eric Carlson  <eric.carlson@apple.com>
3494
3495         Reviewed by Sam Weinig.
3496
3497         MediaPlayerPrivate::getSupportedTypes does not return "modern" MIME types
3498         https://bugs.webkit.org/show_bug.cgi?id=41287
3499         <rdar://problem/8137402>
3500
3501         No new test because getSupportedTypes is used privately by MediaPlayer.
3502
3503         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3504         (WebCore::MediaPlayerPrivate::getSupportedTypes): Build hash set with both common and
3505         modern types.
3506
3507 2010-06-28  James Robinson  <jamesr@chromium.org>
3508
3509         Reviewed by Darin Adler.
3510
3511         REGRESSION(53790): Neopets page with mismatched elements misrenders
3512         https://bugs.webkit.org/show_bug.cgi?id=41181
3513
3514         Misnested formatting tags require fixup in order to create a valid DOM.  Because this takes
3515         O(N^2) time in some cases, http://trac.webkit.org/changeset/53790 added an iteration limit
3516         of 5 to this algorithm to avoid hangs.  This limit is too low for neopets, but a limit of
3517         7 is sufficient.  This raises the limit to 10 to have a bit of breathing room.  HTML5
3518         defines the fixup algorithm http://www.whatwg.org/specs/web-apps/current-work/#adoptionAgency
3519         but doesn't specify any particular iteration limit.
3520
3521         * html/LegacyHTMLTreeBuilder.cpp:
3522
3523 2010-06-28  Adam Barth  <abarth@webkit.org>
3524
3525         Reviewed by Eric Seidel.
3526
3527         The new tree builder needs to call attach() on elements it attaches to
3528         the DOM
3529         https://bugs.webkit.org/show_bug.cgi?id=41293
3530
3531         Apparently Nodes expect to have their attach() method called when they
3532         are attached to the DOM.  The new tree builder is happy to oblige.
3533         Making this call requires some fancy footwork with RefPtr/PassRefPtr to
3534         avoid extra ref churn while keeping each function small.
3535
3536         * html/HTMLTreeBuilder.cpp:
3537         (WebCore::HTMLTreeBuilder::insertHTMLStartTagBeforeHTML):
3538         (WebCore::HTMLTreeBuilder::processCharacter):
3539         (WebCore::HTMLTreeBuilder::insertDoctype):
3540         (WebCore::HTMLTreeBuilder::insertComment):
3541         (WebCore::HTMLTreeBuilder::insertCommentOnDocument):
3542         (WebCore::HTMLTreeBuilder::insertElement):
3543         (WebCore::HTMLTreeBuilder::insertSelfClosingElement):
3544         (WebCore::HTMLTreeBuilder::insertScriptElement):
3545         * html/HTMLTreeBuilder.h:
3546         (WebCore::HTMLTreeBuilder::attach):
3547
3548 2010-06-28  Xan Lopez  <xlopez@igalia.com>
3549
3550         Fix distcheck.
3551
3552         * GNUmakefile.am:
3553
3554 2010-06-28  Kenneth Russell  <kbr@google.com>
3555
3556         Reviewed by Dimitri Glazkov.
3557
3558         Index validation caches buffer size information too aggressively
3559         https://bugs.webkit.org/show_bug.cgi?id=41092
3560
3561         Test: fast/canvas/webgl/index-validation-with-resized-buffer.html
3562
3563         * html/canvas/WebGLRenderingContext.cpp:
3564         (WebCore::WebGLRenderingContext::validateRenderingState):
3565          - Compute the number of valid elements each time based on the latched buffer.
3566         (WebCore::WebGLRenderingContext::vertexAttribPointer):
3567          - Do not cache the buffer size, only the attributes used to
3568            compute the number of required elements.
3569         * html/canvas/WebGLRenderingContext.h:
3570         (WebCore::WebGLRenderingContext::VertexAttribState::VertexAttribState):
3571          - Ditto.
3572
3573 2010-06-28  Andreas Kling  <andreas.kling@nokia.com>
3574
3575         Reviewed by Simon Hausmann.
3576
3577         [Qt] Replace single treat-as-space characters with normal space
3578         https://bugs.webkit.org/show_bug.cgi?id=41278
3579
3580         This keeps Qt from attempting glyph substitution and loading a bunch
3581         of extra fonts when encountering &nbsp; entities.
3582
3583         * platform/graphics/qt/FontQt.cpp:
3584         (WebCore::Font::floatWidthForComplexText):
3585
3586 2010-06-28  Robin Cao  <robin.cao@torchmobile.com.cn>
3587
3588         Reviewed by Dan Bernstein.
3589
3590         canvas fillText with @font-face crashes
3591         https://bugs.webkit.org/show_bug.cgi?id=35486
3592
3593         The font object in CanvasRenderingContext2D may become invalid at some point.
3594         Override recalcStyle() in HTMLCanvasElement, and update the font object from there if needed.
3595
3596         A test already exists: canvas/philip/tests/2d.text.draw.fontface.repeat.html
3597
3598         * html/HTMLCanvasElement.cpp:
3599         (WebCore::HTMLCanvasElement::recalcStyle):
3600         * html/HTMLCanvasElement.h:
3601         * html/canvas/CanvasRenderingContext2D.cpp:
3602         (WebCore::CanvasRenderingContext2D::updateFont):
3603         * html/canvas/CanvasRenderingContext2D.h:
3604
3605 2010-06-28  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
3606
3607         Unreviewed build fix.
3608
3609         [EFL] Build fix for latest version of Ecore library.
3610         Ecore recently changed return type of callbacks from int to Eina_Bool.
3611
3612         No new functionality, so no new tests.
3613
3614         * platform/efl/SharedTimerEfl.cpp:
3615         (WebCore::timerEvent): Return Eina_Bool instead of int.
3616
3617 2010-06-28  Xan Lopez  <xlopez@igalia.com>
3618
3619         Fix build with GTK+ older than 2.18
3620
3621         * platform/gtk/ScrollViewGtk.cpp:
3622         (WebCore::ScrollView::visibleContentRect):
3623
3624 2010-06-28  Xan Lopez  <xlopez@igalia.com>
3625
3626         Reviewed by Adam Barth.
3627
3628         [GTK] Push NULL context on every DOM bindings entry point
3629         https://bugs.webkit.org/show_bug.cgi?id=39967
3630
3631         Update GObject DOM bindings to push the NULL context on every API
3632         entry point, and update bindings test results.
3633
3634         * bindings/scripts/CodeGeneratorGObject.pm:
3635         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
3636         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
3637         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
3638
3639 2010-06-28  Martin Robinson  <martin.james.robinson@gmail.com>
3640
3641         Reviewed by Adam Roben.
3642
3643         [WinCairo] Text box backgrounds do not render in partially opaque layers
3644         https://bugs.webkit.org/show_bug.cgi?id=41113
3645
3646         Tests:
3647          manual-tests/partially-opaque-text-input.html
3648
3649         * platform/graphics/win/GraphicsContextCairoWin.cpp:
3650         (WebCore::GraphicsContext::releaseWindowsContext):