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