Unreviewed complementary fix for r61818. It added StaticHashSetListNode.cpp|h to...
[WebKit.git] / WebCore / ChangeLog
1 2010-06-25  Antonio Gomes  <tonikitoo@webkit.org>
2
3         Unreviewed complementary fix for r61818. It added StaticHashSetListNode.cpp|h to the system,
4         but did not added it to chromium build system.
5
6         * WebCore.gypi:
7
8 2010-06-26  Pavel Feldman  <pfeldman@chromium.org>
9
10         Reviewed by Yury Semikhatsky.
11
12         Web Inspector: ScripsPanel.prototype.editScriptSource uses old addBreakpoint signature.
13
14         https://bugs.webkit.org/show_bug.cgi?id=41247
15
16         * inspector/front-end/BreakpointManager.js:
17         (WebInspector.BreakpointManager.prototype.removeBreakpoint):
18         (WebInspector.Breakpoint.prototype.set enabled):
19         (WebInspector.Breakpoint.prototype.set condition):
20         * inspector/front-end/Object.js:
21         (WebInspector.Object.prototype.addEventListener):
22         (WebInspector.Object.prototype.removeEventListener):
23         (WebInspector.Object.prototype.removeAllListeners):
24         * inspector/front-end/ScriptsPanel.js:
25         (WebInspector.ScriptsPanel.prototype.editScriptSource.mycallback):
26         (WebInspector.ScriptsPanel.prototype.editScriptSource):
27
28 2010-06-26  Tony Gentilcore  <tonyg@chromium.org>
29
30         Reviewed by Dimitri Glazkov.
31
32         Add a guarded window.performance.timing binding which is disabled by default.
33         https://bugs.webkit.org/show_bug.cgi?id=38924
34
35         This is where Web Timing support will be implemented. Web Timing is a
36         draft spec for exposing load times to web pages. It will be enabled
37         once the spec and implementaiton are solidified. See:
38         http://dev.w3.org/2006/webapi/WebTiming/
39
40         No new tests because guarded behind a #DEFINE. Will add tests as
41         functionality is landed.
42
43         * Android.mk:
44         * CMakeLists.txt:
45         * Configurations/FeatureDefines.xcconfig:
46         * DerivedSources.cpp:
47         * DerivedSources.make:
48         * GNUmakefile.am:
49         * WebCore.gypi:
50         * WebCore.pri:
51         * WebCore.pro:
52         * WebCore.vcproj/WebCore.vcproj:
53         * WebCore.xcodeproj/project.pbxproj:
54         * page/DOMWindow.cpp:
55         (WebCore::DOMWindow::clear):
56         (WebCore::DOMWindow::performance):
57         * page/DOMWindow.h:
58         (WebCore::DOMWindow::optionalPerformance):
59         * page/DOMWindow.idl:
60         * page/NavigationTiming.cpp: Added.
61         (WebCore::NavigationTiming::NavigationTiming):
62         (WebCore::NavigationTiming::frame):
63         (WebCore::NavigationTiming::disconnectFrame):
64         (WebCore::NavigationTiming::navigationStart):
65         * page/NavigationTiming.h: Added.
66         (WebCore::NavigationTiming::create):
67         * page/NavigationTiming.idl: Added.
68         * page/Performance.cpp: Added.
69         (WebCore::Performance::Performance):
70         (WebCore::Performance::frame):
71         (WebCore::Performance::disconnectFrame):
72         (WebCore::Performance::timing):
73         * page/Performance.h: Added.
74         (WebCore::Performance::create):
75         * page/Performance.idl: Added.
76
77 2010-06-25  Zhenyao Mo  <zmo@google.com>
78
79         Reviewed by Dimitri Glazkov.
80
81         activeTexture wrongly generates error with legal input.
82         https://bugs.webkit.org/show_bug.cgi?id=41227
83
84         Test: fast/canvas/webgl/texture-active-bind.html
85
86         * html/canvas/WebGLRenderingContext.cpp:
87         (WebCore::WebGLRenderingContext::activeTexture): Fix the upper limit test for test units.
88
89 2010-06-25  Johnny Ding  <jnd@chromium.org>
90
91         Reviewed by Adam Barth.
92
93         https://bugs.webkit.org/show_bug.cgi?id=41061
94         Make sure Chromium's ScriptController::processingUserGesture follows the JSC's behavior.
95         Set right value in UserGestureIndicator when handling events in PopupMenuList in chromium.
96
97         Test: fast/events/popup-when-select-change.html
98
99         * bindings/v8/ScriptController.cpp:
100         (WebCore::ScriptController::processingUserGesture):
101         * platform/chromium/PopupMenuChromium.cpp:
102         (WebCore::PopupContainer::handleMouseDownEvent):
103         (WebCore::PopupContainer::handleMouseMoveEvent):
104         (WebCore::PopupContainer::handleMouseReleaseEvent):
105         (WebCore::PopupContainer::handleWheelEvent):
106         (WebCore::PopupContainer::handleKeyEvent):
107
108 2010-06-25  Tony Gentilcore  <tonyg@chromium.org>
109
110         Reviewed by Eric Seidel.
111
112         Make PendingScript hold a CachedResourceClient open for its lifetime
113         https://bugs.webkit.org/show_bug.cgi?id=40968
114
115         This replaces the mechanism introduced in r61374 with a simpler
116         appraoch for preventing unexpected purges: always keep a client open.
117         This approach will allow deferred scripts to add a client after
118         the resource may have already been loaded without having to worry about
119         the buffer being purged in the meantime.
120
121         No new tests because making a CachedResource purse itself is not
122         testable from a LayoutTest.
123
124         * html/HTMLDocumentParser.cpp:
125         (WebCore::HTMLDocumentParser::watchForLoad):
126         (WebCore::HTMLDocumentParser::notifyFinished):
127         * html/HTMLScriptRunner.cpp:
128         (WebCore::HTMLScriptRunner::~HTMLScriptRunner):
129         (WebCore::HTMLScriptRunner::sourceFromPendingScript):
130         (WebCore::HTMLScriptRunner::isPendingScriptReady):
131         (WebCore::HTMLScriptRunner::executePendingScript):
132         (WebCore::HTMLScriptRunner::watchForLoad):
133         (WebCore::HTMLScriptRunner::stopWatchingForLoad):
134         (WebCore::HTMLScriptRunner::executeScriptsWaitingForLoad):
135         (WebCore::HTMLScriptRunner::requestScript):
136         (WebCore::HTMLScriptRunner::PendingScript::~PendingScript):
137         (WebCore::HTMLScriptRunner::PendingScript::releaseElementAndClear):
138         (WebCore::HTMLScriptRunner::PendingScript::setCachedScript):
139         (WebCore::HTMLScriptRunner::PendingScript::cachedScript):
140         * html/HTMLScriptRunner.h:
141         (WebCore::HTMLScriptRunner::PendingScript::PendingScript):
142         (WebCore::HTMLScriptRunner::PendingScript::watchingForLoad):
143         (WebCore::HTMLScriptRunner::PendingScript::setWatchingForLoad):
144         (WebCore::HTMLScriptRunner::PendingScript::notifyFinished):
145         * html/HTMLScriptRunnerHost.h:
146
147 2010-06-25  Zhenyao Mo  <zmo@google.com>
148
149         Reviewed by Dimitri Glazkov.
150
151         getUniform will not work for fetching uniform array elements
152         https://bugs.webkit.org/show_bug.cgi?id=34508
153
154         Test: fast/canvas/webgl/gl-uniform-arrays.html
155
156         * html/canvas/WebGLRenderingContext.cpp:
157         (WebCore::WebGLRenderingContext::attachShader): Generate correct errors.
158         (WebCore::WebGLRenderingContext::getUniform): Dealing with array elements.
159         (WebCore::WebGLRenderingContext::useProgram): Deal with program==null.
160         (WebCore::WebGLRenderingContext::validateProgram): Generate correct errors.
161         * platform/graphics/mac/GraphicsContext3DMac.mm:
162         (WebCore::GraphicsContext3D::useProgram): Deal with program==null.
163
164 2010-06-25  Zhenyao Mo  <zmo@google.com>
165
166         Reviewed by Dimitri Glazkov.
167
168         Bring set/get state functions to GLES2 conformance
169         https://bugs.webkit.org/show_bug.cgi?id=41095
170
171         Tests: fast/canvas/webgl/gl-enable-enum-test.html
172                fast/canvas/webgl/gl-enum-tests.html
173
174         * html/canvas/WebGLRenderingContext.cpp: Check input parameters according to GLES2 spec.
175         (WebCore::WebGLRenderingContext::blendEquation):
176         (WebCore::WebGLRenderingContext::blendEquationSeparate):
177         (WebCore::WebGLRenderingContext::disable):
178         (WebCore::WebGLRenderingContext::enable):
179         (WebCore::WebGLRenderingContext::hint):
180         (WebCore::WebGLRenderingContext::isEnabled):
181         (WebCore::WebGLRenderingContext::pixelStorei):
182         (WebCore::WebGLRenderingContext::validateBlendEquation):
183         (WebCore::WebGLRenderingContext::validateCapability):
184         * html/canvas/WebGLRenderingContext.h: Add helper function declaration.
185
186 2010-06-25  Sterling Swigart  <sswigart@google.com>
187
188         Reviewed by David Levin.
189
190         Callback code generation fixed so that now string parameters are converted to JSString
191         using the jsString method instead of the toJS method which would not compile.
192         https://bugs.webkit.org/show_bug.cgi?id=41119
193         
194         * bindings/scripts/CodeGeneratorJS.pm: Now generates jsString for String parameters in callbacks.
195         * bindings/scripts/test/JS/JSTestCallback.cpp: Fixed test for above.
196         (WebCore::JSTestCallback::callbackWithClass2Param): Ditto.
197
198 2010-06-25  Zhenyao Mo  <zmo@google.com>
199
200         Reviewed by Dimitri Glazkov.
201
202         A buffer should be bound to one target in its lifetime
203         https://bugs.webkit.org/show_bug.cgi?id=41108
204
205         Test: fast/canvas/webgl/buffer-bind-test.html
206
207         * html/canvas/WebGLBuffer.cpp:
208         (WebCore::WebGLBuffer::WebGLBuffer): Init target to 0. 
209         (WebCore::WebGLBuffer::associateBufferData): Remove target parameter, use one byteLength member.
210         (WebCore::WebGLBuffer::associateBufferSubData): Ditto.
211         (WebCore::WebGLBuffer::byteLength): Ditto.
212         (WebCore::WebGLBuffer::setTarget): Set target.
213         * html/canvas/WebGLBuffer.h: Cache target in the WebGLBuffer object, use one byteLength member.
214         (WebCore::WebGLBuffer::getTarget):
215         * html/canvas/WebGLRenderingContext.cpp:
216         (WebCore::WebGLRenderingContext::bindBuffer): Check if a buffer is bound to another target; set buffer object internal target.
217         (WebCore::WebGLRenderingContext::bufferData): Remove target parameter and use the WebGLBuffer cached target instead.
218         (WebCore::WebGLRenderingContext::bufferSubData): Ditto.
219         (WebCore::WebGLRenderingContext::validateElementArraySize): Ditto.
220         (WebCore::WebGLRenderingContext::validateIndexArrayConservative): Ditto.
221         (WebCore::WebGLRenderingContext::vertexAttribPointer): Ditto.
222
223 2010-06-25  Dean Jackson  <dino@apple.com>
224
225         Reviewed by Simon Fraser.
226
227         https://bugs.webkit.org/show_bug.cgi?id=41188
228         Animations should not require 0% and 100% keyframes
229
230         When we are generating the animation lists in CSSStyleSelector,
231         rather than bail if we notice that "from" or "to" are missing, we
232         now generate synthetic keyframes for those cases.
233
234         Tests: animations/missing-from-to-transforms.html
235                animations/missing-from-to.html
236                WebCore/manual-tests/animation-with-transition.html
237
238         * css/CSSStyleSelector.cpp:
239         (WebCore::CSSStyleSelector::styleForKeyframe):
240                 Moved individual keyframe generation into a new function.
241         (WebCore::CSSStyleSelector::keyframeStylesForAnimation):
242                 Call the new function above for regular keyframes, and
243                 also check for missing keyframes and generate them if
244                 necessary.
245         * css/CSSStyleSelector.h:
246
247 2010-06-25  Adam Barth  <abarth@webkit.org>
248
249         Reviewed by Eric Seidel.
250
251         We should parse <html>
252         https://bugs.webkit.org/show_bug.cgi?id=41239
253
254         This patch is hard to test, but I think this patch lets us parse a
255         document consisting of only an <html> start tag.
256
257         * html/HTMLTreeBuilder.cpp:
258         (WebCore::HTMLTreeBuilder::constructTreeFromToken):
259         (WebCore::HTMLTreeBuilder::insertHTMLStartTagBeforeHTML):
260         (WebCore::HTMLTreeBuilder::insertHTMLStartTagInBody):
261         (WebCore::HTMLTreeBuilder::processStartTag):
262         (WebCore::HTMLTreeBuilder::processDefaultForBeforeHTMLMode):
263         * html/HTMLTreeBuilder.h:
264         (WebCore::HTMLTreeBuilder::ElementStack::push):
265
266 2010-06-25  Dan Bernstein  <mitz@apple.com>
267
268         Reviewed by Sam Weinig.
269
270         <rdar://problem/8000667> Certain text is repeated before and after a line break
271
272         Test: fast/text/bidi-explicit-embedding-past-end.html
273
274         * platform/text/BidiResolver.h:
275         (WebCore::::createBidiRunsForLine): Committing explicit embedding past the end of the range
276         creates BidiRuns up to the end of the range, so at that point, we can stop iterating.
277
278 2010-06-25  Eric Seidel  <eric@webkit.org>
279
280         Reviewed by Adam Barth.
281
282         Move decoding into DocumentParser to further simplify RawDataDocumentParser and DocumentWriter
283         https://bugs.webkit.org/show_bug.cgi?id=41202
284
285         Hit the Windoze with the compile bat.
286
287         * WebCore.vcproj/WebCore.vcproj:
288
289 2010-06-25  Adam Barth  <abarth@webkit.org>
290
291         Reviewed by Eric Seidel.
292
293         HTMLTreeBuilder should branch first on token type and then on insertion mode
294         https://bugs.webkit.org/show_bug.cgi?id=41232
295
296         This is different than how the spec is written, but it lets us remove a
297         lot of redudancy in the algorithm.  We might even want to pull some of
298         the branches on token name outside the insertion mode branch, but I'll
299         leave that for a future patch.
300
301         Although this looks like a big patch, it's mostly just a mechanical
302         switch permutation.
303
304         * html/HTMLTreeBuilder.cpp:
305         (WebCore::HTMLTreeBuilder::constructTreeFromToken):
306         (WebCore::HTMLTreeBuilder::processToken):
307         (WebCore::HTMLTreeBuilder::processDoctypeToken):
308         (WebCore::HTMLTreeBuilder::processStartTag):
309         (WebCore::HTMLTreeBuilder::processEndTag):
310         (WebCore::HTMLTreeBuilder::processComment):
311         (WebCore::HTMLTreeBuilder::processCharacter):
312         (WebCore::HTMLTreeBuilder::processEndOfFile):
313         (WebCore::HTMLTreeBuilder::processDefaultForInitialMode):
314         (WebCore::HTMLTreeBuilder::processDefaultForBeforeHTMLMode):
315         (WebCore::HTMLTreeBuilder::processDefaultForBeforeHeadMode):
316         (WebCore::HTMLTreeBuilder::processDefaultForInHeadMode):
317         (WebCore::HTMLTreeBuilder::processDefaultForInHeadNoscriptMode):
318         (WebCore::HTMLTreeBuilder::processDefaultForAfterHeadMode):
319         * html/HTMLTreeBuilder.h:
320
321 2010-06-25  Adam Barth  <abarth@webkit.org>
322
323         Reviewed by Darin Adler.
324
325         Tree builder doesn't need to return a Node
326         https://bugs.webkit.org/show_bug.cgi?id=41225
327
328         The old tree builder returned the newly inserted Node, but the new tree
329         builder doesn't need to do that as far as I can tell.  Removing the
330         return value cuts down on a bunch of accounting.
331
332         * html/HTMLTreeBuilder.cpp:
333         (WebCore::HTMLTreeBuilder::passTokenToLegacyParser):
334         (WebCore::HTMLTreeBuilder::constructTreeFromToken):
335         (WebCore::HTMLTreeBuilder::processToken):
336         (WebCore::HTMLTreeBuilder::insertDoctype):
337         (WebCore::HTMLTreeBuilder::insertComment):
338         (WebCore::HTMLTreeBuilder::insertGenericRCDATAElement):
339         (WebCore::HTMLTreeBuilder::insertGenericRawTextElement):
340         (WebCore::HTMLTreeBuilder::insertScriptElement):
341         * html/HTMLTreeBuilder.h:
342
343 2010-06-25  Zhenyao Mo  <zmo@google.com>
344
345         Reviewed by Dimitri Glazkov.
346
347         getParameter(COLOR_WRITEMASK) needs to return Array
348         https://bugs.webkit.org/show_bug.cgi?id=40437
349
350         * bindings/js/JSWebGLRenderingContextCustom.cpp: Handling bool array.
351         (WebCore::toJS):
352         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: Handling bool array.
353         (WebCore::toV8Object):
354         * html/canvas/WebGLGetInfo.cpp: Handling bool array.
355         (WebCore::WebGLGetInfo::WebGLGetInfo):
356         (WebCore::WebGLGetInfo::getBoolArray):
357         * html/canvas/WebGLGetInfo.h: Handling bool array.
358         (WebCore::WebGLGetInfo::):
359         * html/canvas/WebGLRenderingContext.cpp: Handling bool array.
360         (WebCore::WebGLRenderingContext::getParameter):
361         (WebCore::WebGLRenderingContext::getBooleanArrayParameter):
362         * html/canvas/WebGLRenderingContext.h: Handling bool array.
363
364 2010-06-25  Evan Stade  <estade@chromium.org>
365
366         Reviewed by Darin Fisher.
367
368         [chromium linux] Improve look of scrollbars
369         https://bugs.webkit.org/show_bug.cgi?id=35775
370
371         This will affect layout pixel tests, which will need to be rebaselined.
372
373         * platform/Scrollbar.cpp: need the buttons to be invalidated when the
374         thumb moves as they paint differently if the thumb is at the top or
375         bottom
376         (WebCore::Scrollbar::updateThumbPosition):
377         (WebCore::Scrollbar::updateThumbProportion):
378         * platform/chromium/ScrollbarThemeChromium.cpp:
379         (WebCore::ScrollbarThemeChromium::trackRect): share code between
380         linux/windows
381         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
382         (WebCore::ScrollbarThemeChromiumLinux::scrollbarThickness):
383         (WebCore::outlineColor): up the contrast
384         (WebCore::ScrollbarThemeChromiumLinux::paintButton): add custom button
385         drawing implementation
386         (WebCore::ScrollbarThemeChromiumLinux::buttonSize): add buttons
387         * platform/chromium/ScrollbarThemeChromiumWin.cpp: share code between
388         linux/windows
389         * rendering/RenderThemeChromiumLinux.cpp: improve stock colors to get
390         better contrast and integration with stock chrome theme
391
392 2010-06-25  Eric Seidel  <eric@webkit.org>
393
394         Reviewed by Adam Barth.
395
396         Move decoding into DocumentParser to further simplify RawDataDocumentParser and DocumentWriter
397         https://bugs.webkit.org/show_bug.cgi?id=41202
398
399         The silly thing about this patch is that none of the
400         RawDataDocumentParser subclasses actually use any of the
401         data passed to them via appendBytes.
402
403         This makes the relationship between DocumentWriter and
404         DocumentParser slightly more confusing, however I think this
405         DocumentParser API is slightly nicer.
406
407         Next step is to split DecodedDataDocumentParser out from
408         DocumentParser, and then the base DocumentParser won't know
409         anything about decoding or SegmentedString.
410
411         No functional change, thus no tests.
412
413         * WebCore.xcodeproj/project.pbxproj:
414         * dom/DocumentParser.h:
415         * dom/RawDataDocumentParser.h:
416         * loader/DocumentWriter.cpp:
417         (WebCore::DocumentWriter::replaceDocument):
418         (WebCore::DocumentWriter::createDecoderIfNeeded):
419         (WebCore::DocumentWriter::reportDataRecieved):
420         (WebCore::DocumentWriter::addData):
421         * loader/DocumentWriter.h:
422         * loader/ImageDocument.cpp:
423         (WebCore::ImageDocumentParser::appendBytes):
424         * loader/MediaDocument.cpp:
425         (WebCore::MediaDocumentParser::appendBytes):
426         * loader/PluginDocument.cpp:
427         (WebCore::PluginDocumentParser::appendBytes):
428         * loader/SinkDocument.cpp:
429         (WebCore::SinkDocumentParser::SinkDocumentParser):
430         (WebCore::SinkDocumentParser::appendBytes):
431         (WebCore::SinkDocument::createParser):
432
433 2010-06-25  Eric Seidel  <eric@webkit.org>
434
435         Reviewed by Adam Barth.
436
437         Split DocumentParser::write into separate append and insert calls
438         https://bugs.webkit.org/show_bug.cgi?id=41197
439
440         Unfortunately this is still somewhat confusing as
441         "insert" means "insert this data at the current
442         insertion point and run the parser synchronously
443         unless we're in a nested write call" and "append"
444         means "append this data to the end and run the
445         parser if not in a nested call or until possibly yielding".
446
447         This at least makes clearer which document parsers implement
448         which behavior, and paves the way for moving the decoding
449         logic into DocumentParser from DocumentWriter.
450
451         No functional changes, thus no tests.
452
453         * dom/Document.cpp:
454         (WebCore::Document::write):
455         * dom/DocumentParser.h:
456         * dom/RawDataDocumentParser.h:
457         (WebCore::RawDataDocumentParser::insert):
458         (WebCore::RawDataDocumentParser::append):
459         * dom/XMLDocumentParser.cpp:
460         (WebCore::XMLDocumentParser::insert):
461         (WebCore::XMLDocumentParser::append):
462         * dom/XMLDocumentParser.h:
463         * dom/XMLDocumentParserLibxml2.cpp:
464         (WebCore::XMLDocumentParser::resumeParsing):
465         * html/HTMLDocumentParser.cpp:
466         (WebCore::HTMLDocumentParser::insert):
467         (WebCore::HTMLDocumentParser::append):
468         (WebCore::HTMLDocumentParser::parseDocumentFragment):
469         * html/HTMLDocumentParser.h:
470         * html/LegacyHTMLDocumentParser.cpp:
471         (WebCore::LegacyHTMLDocumentParser::insert):
472         (WebCore::LegacyHTMLDocumentParser::append):
473         * html/LegacyHTMLDocumentParser.h:
474         * loader/DocumentWriter.cpp:
475         (WebCore::DocumentWriter::replaceDocument):
476         (WebCore::DocumentWriter::addData):
477         * loader/FTPDirectoryDocument.cpp:
478         (WebCore::FTPDirectoryDocumentParser::FTPDirectoryDocumentParser):
479         (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
480         (WebCore::FTPDirectoryDocumentParser::append):
481         * loader/TextDocument.cpp:
482         (WebCore::TextDocumentParser::insert):
483         (WebCore::TextDocumentParser::append):
484         (WebCore::TextDocumentParser::finish):
485
486 2010-06-25  Daniel Cheng  <dcheng@chromium.org>
487
488         Reviewed by Darin Fisher.
489
490         [chromium] Add new stubs for querying platform drag-and-drop and copy-and-paste data.
491
492         This change adds new stubs for querying for data in a clipboard or drag operation. This is
493         so adding support for more data types in clipboard/drag operations doesn't become
494         increasingly expensive, since we currently copy all the drag data we need every time a new
495         web drop target is entered. It also adds a new mechanism to write back to the system
496         clipboard that isn't tied to one data type.
497
498         https://bugs.webkit.org/show_bug.cgi?id=40540
499
500         No new tests since we're just adding new ChromiumBridge APIs. When we switch to it, it will
501         be covered by the existing tests.
502
503         * platform/chromium/ChromiumBridge.h:
504         * platform/chromium/PasteboardPrivate.h:
505         (WebCore::PasteboardPrivate::):
506
507 2010-06-25  Mario Sanchez Prada  <msanchez@igalia.com>
508
509         Reviewed by Xan Lopez.
510
511         [Gtk] Implement atk_table_get_column_header
512         https://bugs.webkit.org/show_bug.cgi?id=30896
513
514         Implemented get_column_header and modified get_row_header
515         accordingly to keep them both coherent among themselves.
516         Based on a previous patch by Joanmarie Diggs.
517
518         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
519         (webkit_accessible_table_get_column_header):
520         (webkit_accessible_table_get_row_header):
521
522 2010-06-25  Martin Robinson  <mrobinson@igalia.com>
523
524         Reviewed by Xan Lopez.
525
526         [GTK] Pasteboard code does not take into account the nil character when getting and setting markup/netscape-url data
527         https://bugs.webkit.org/show_bug.cgi?id=41221
528
529         Take into account null-terminator when getting and setting markup and
530         Netscape URL pasteboard types. This means that if the selection data
531         contains the null terminator, it won't be included in the final String.
532         When setting the pasteboard data the null terminator is now included to
533         match the behavior of other applications.
534
535         * platform/gtk/PasteboardHelper.cpp:
536         (WebCore::PasteboardHelper::getClipboardContents):
537         Create the markup string after using g_strndup to protect against non-null-terminated
538         strings. Use String::fromUTF8 here to ensure that the string is not longer than the
539         first null-terminator. Also fix a small indentation issue.
540         (WebCore::PasteboardHelper::fillSelectionData):
541         Always include the null-terminator when setting pasteboard data manually. This matches
542         the behavior of other browser applications.
543
544 2010-06-25  Sam Magnuson  <smagnuson@netflix.com>
545
546         Reviewed by Kenneth Rohde Christiansen.
547
548         [Qt] When any geometry change happens to a node it will resize the
549         backing cache
550         https://bugs.webkit.org/show_bug.cgi?id=40378
551
552         Continue to grow the cache, but never toss it. When the pixmap
553         cache gets too big it will be lost and created at the right size
554         next time.
555
556         No new tests: this is an optimization.
557
558         * platform/graphics/qt/GraphicsLayerQt.cpp:
559         (WebCore::GraphicsLayerQtImpl::recache):
560         (WebCore::GraphicsLayerQtImpl::paint):
561         (WebCore::GraphicsLayerQtImpl::flushChanges):
562
563 2010-06-25  Andreas Kling  <andreas.kling@nokia.com>
564
565         Reviewed by Darin Adler.
566
567         https://bugs.webkit.org/show_bug.cgi?id=41019
568         Canvas: Remember verified clean origins for drawImage()
569
570         Made CanvasRenderingContext2D cache the KURLs of clean origins
571         for fast repeated lookup.
572
573         * html/canvas/CanvasRenderingContext2D.cpp:
574         (WebCore::CanvasRenderingContext2D::checkOrigin):
575         * html/canvas/CanvasRenderingContext2D.h:
576
577 2010-06-25  Robert Hogan  <robert@webkit.org>
578
579         Reviewed by Kenneth Rohde Christiansen.
580
581         [Qt] HTTP 307 after a 303 after a POST re-sends POST data from the original request
582
583         https://bugs.webkit.org/show_bug.cgi?id=35301
584
585         Qt needs to use ResourceRequest::request()->httpMethod()) in order to determine
586         the appropriate method for a 307 redirect request.
587
588         When deciding if it needs to override a POST method with a GET method during a
589         redirect chain, QNetworkReplyHandler needs to check the HTTP method stored
590         in ResourceRequest::request()->httpMethod(). This will always contain the
591         original request method in a redirect chain and, more importantly, is the
592         method that will be used for the request created from the redirect
593         if it is not overridden.
594
595         * platform/network/qt/QNetworkReplyHandler.cpp:
596         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
597
598 2010-06-25  Dan Bernstein  <mitz@apple.com>
599
600         Reviewed by Anders Carlsson.
601
602         Removed a one-line method that only had one internal caller.
603
604         * rendering/RenderBlock.h: Removed bidiReorderLine()
605         * rendering/RenderBlockLineLayout.cpp:
606         (WebCore::RenderBlock::layoutInlineChildren): Moved the implementation of
607         bidiReorderLine() inline here.
608
609 2010-06-25  Nate Chapin  <japhet@chromium.org>
610
611         Reviewed by Adam Barth.
612
613         Take a KURL parameter in Document's constructor.
614         This will remove the one case where Document::url() 
615         and FrameLoader::url() are not equal, allowing us to
616         remove FrameLoader::url().
617
618         https://bugs.webkit.org/show_bug.cgi?id=41166
619
620         Refactor only, no new tests.
621
622         * dom/DOMImplementation.cpp:
623         (WebCore::DOMImplementation::createDocument): Take a KURL and pass it through to Document.
624         (WebCore::DOMImplementation::createHTMLDocument):
625         * dom/DOMImplementation.h:
626         * dom/Document.cpp:
627         (WebCore::Document::Document): Call setURL() if a frame or a non-empty KURL is specified.
628         (WebCore::Document::initSecurityContext): m_url is now initialized, so use it instead
629             of m_frame->loader()->url() for initializing the SecurityOrigin.
630         * dom/Document.h:
631         (WebCore::Document::create):
632         (WebCore::Document::createXHTML):
633         * html/HTMLDocument.cpp:
634         * html/HTMLDocument.h: Add KURL parameter to create() and constructor.
635         * html/HTMLViewSourceDocument.cpp:
636         * html/HTMLViewSourceDocument.h: Add KURL parameter to create() and constructor.
637         * loader/CachedFont.cpp:
638         (WebCore::CachedFont::ensureSVGFontData):
639         * loader/DocumentWriter.cpp:
640         (WebCore::DocumentWriter::createDocument): Take a KURL and pass it through to Document.
641         (WebCore::DocumentWriter::begin): Pass existing url parameter to constructors, and remove
642             redundant Document::setURL() call.
643         * loader/DocumentWriter.h:
644         * loader/FTPDirectoryDocument.cpp:
645         * loader/FTPDirectoryDocument.h: Add KURL parameter to create() and constructor.
646         * loader/ImageDocument.cpp:
647         * loader/ImageDocument.h: Add KURL parameter to create() and constructor.
648         * loader/MediaDocument.cpp:
649         * loader/MediaDocument.h: Add KURL parameter to create() and constructor.
650         * loader/PlaceholderDocument.h: Add KURL parameter to create() and constructor.
651         * loader/PluginDocument.cpp:
652         * loader/PluginDocument.h: Add KURL parameter to create() and constructor.
653         * loader/SinkDocument.cpp:
654         * loader/SinkDocument.h: Add KURL parameter to create() and constructor.
655         * loader/TextDocument.cpp:
656         * loader/TextDocument.h: Add KURL parameter to create() and constructor.
657         * svg/SVGDocument.cpp:
658         * svg/SVGDocument.h: Add KURL parameter to create() and constructor.
659         * xml/DOMParser.cpp:
660         (WebCore::DOMParser::parseFromString):
661         * xml/XMLHttpRequest.cpp:
662         (WebCore::XMLHttpRequest::responseXML):
663         * xml/XSLTProcessor.cpp:
664         (WebCore::XSLTProcessor::createDocumentFromSource):
665
666 2010-06-25  Sheriff Bot  <webkit.review.bot@gmail.com>
667
668         Unreviewed, rolling out r61812.
669         http://trac.webkit.org/changeset/61812
670         https://bugs.webkit.org/show_bug.cgi?id=41216
671
672         breaks Chromium workers tests (Requested by mnaganov on
673         #webkit).
674
675         * storage/AbstractDatabase.cpp:
676         * storage/AbstractDatabase.h:
677         * storage/Database.cpp:
678         (WebCore::Database::databaseInfoTableName):
679         (WebCore::guidMutex):
680         (WebCore::guidToVersionMap):
681         (WebCore::updateGuidVersionMap):
682         (WebCore::guidToDatabaseMap):
683         (WebCore::databaseVersionKey):
684         (WebCore::DatabaseCreationCallbackTask::create):
685         (WebCore::DatabaseCreationCallbackTask::performTask):
686         (WebCore::DatabaseCreationCallbackTask::DatabaseCreationCallbackTask):
687         (WebCore::Database::openDatabase):
688         (WebCore::Database::Database):
689         (WebCore::Database::openAndVerifyVersion):
690         (WebCore::retrieveTextResultFromDatabase):
691         (WebCore::Database::getVersionFromDatabase):
692         (WebCore::setTextValueInDatabase):
693         (WebCore::Database::setVersionInDatabase):
694         (WebCore::Database::versionMatchesExpected):
695         (WebCore::Database::close):
696         (WebCore::Database::disableAuthorizer):
697         (WebCore::Database::enableAuthorizer):
698         (WebCore::Database::setAuthorizerReadOnly):
699         (WebCore::Database::lastActionChangedDatabase):
700         (WebCore::Database::lastActionWasInsert):
701         (WebCore::Database::resetDeletes):
702         (WebCore::Database::hadDeletes):
703         (WebCore::guidForOriginAndName):
704         (WebCore::Database::resetAuthorizer):
705         (WebCore::Database::performOpenAndVerify):
706         (WebCore::Database::performCreationCallback):
707         (WebCore::Database::version):
708         (WebCore::Database::setExpectedVersion):
709         (WebCore::Database::stringIdentifier):
710         (WebCore::Database::displayName):
711         (WebCore::Database::estimatedSize):
712         (WebCore::Database::fileName):
713         * storage/Database.h:
714         (WebCore::Database::scriptExecutionContext):
715         (WebCore::Database::opened):
716         (WebCore::Database::isNew):
717         (WebCore::Database::databaseDebugName):
718         * storage/DatabaseAuthorizer.cpp:
719         (WebCore::DatabaseAuthorizer::DatabaseAuthorizer):
720         (WebCore::DatabaseAuthorizer::denyBasedOnTableName):
721         * storage/DatabaseAuthorizer.h:
722         (WebCore::DatabaseAuthorizer::create):
723         * storage/DatabaseSync.cpp:
724         (WebCore::DatabaseSync::databaseInfoTableName):
725         (WebCore::DatabaseSync::openDatabaseSync):
726         (WebCore::DatabaseSync::DatabaseSync):
727         (WebCore::DatabaseSync::~DatabaseSync):
728         (WebCore::DatabaseSync::version):
729         (WebCore::DatabaseSync::changeVersion):
730         (WebCore::DatabaseSync::transaction):
731         (WebCore::DatabaseSync::scriptExecutionContext):
732         * storage/DatabaseSync.h:
733         (WebCore::DatabaseSync::databaseDebugName):
734         * storage/DatabaseTask.cpp:
735         (WebCore::DatabaseOpenTask::DatabaseOpenTask):
736         (WebCore::DatabaseOpenTask::doPerformTask):
737         * storage/DatabaseTask.h:
738         (WebCore::DatabaseOpenTask::create):
739
740 2010-06-25  Lei Zheng  <lzheng@chromium.org>
741
742         Reviewed by Dimitri Glazkov.
743
744         Add a flag to the ResourceResponse for tracking if a request was fetched when
745         Alternate-protocol is available.
746         https://bugs.webkit.org/show_bug.cgi?id=41001
747
748         No new tests. (This is just a setter and getter.)
749
750         * platform/network/chromium/ResourceResponse.h:
751         (WebCore::ResourceResponse::ResourceResponse):
752         (WebCore::ResourceResponse::wasAlternateProtocolAvailable):
753         (WebCore::ResourceResponse::setWasAlternateProtocolAvailable):
754
755 2010-06-25  Lyon Chen  <liachen@rim.com>
756
757         Reviewed by Darin Adler.
758
759         InspectorCSSStore.cpp is not surrounded with ENABLE(INSPECTOR)
760         https://bugs.webkit.org/show_bug.cgi?id=41004
761
762         Surround InspectorCSSStore.cpp code with ENABLE(INSPECTOR) so it will not
763         break the build when INSPECTOR is disabled.
764
765         * inspector/InspectorCSSStore.cpp:
766
767 2010-06-25  No'am Rosenthal  <noam.rosenthal@nokia.com>
768
769         Reviewed by Simon Hausmann.
770
771         [Qt] WebGL: missing file
772         https://bugs.webkit.org/show_bug.cgi?id=40998
773
774         Added a missing file to WebCore.pro
775
776         No new tests; build fix
777
778         * WebCore.pro:
779
780 2010-06-25  Adam Roben  <aroben@apple.com>
781
782         Windows build fix
783
784         * WebCore.vcproj/WebCore.vcproj: Added a missing </File> tag.
785
786 2010-06-25  Alex Milowski  <alex@milowski.com>
787
788         Reviewed by Kenneth Rohde Christiansen.
789
790         This patch changes the vertical alignment to rely upon baseline
791         alignment for all MathML rendering.  This fixes a number of layout
792         issues and the implementation is much more clean.
793
794         Also, this patch adds a horizontal green line in the debug layout
795         so you can see the top padding of any RenderMathMLBlock instance.
796
797         Test: mathml/presentation/row-alignment.xhtml
798
799         * css/mathml.css:
800         * mathml/RenderMathMLBlock.cpp:
801         * mathml/RenderMathMLFraction.cpp:
802         * mathml/RenderMathMLFraction.h:
803         * mathml/RenderMathMLOperator.cpp:
804         * mathml/RenderMathMLOperator.h:
805         * mathml/RenderMathMLRoot.cpp:
806         * mathml/RenderMathMLRow.cpp:
807         * mathml/RenderMathMLRow.h:
808         * mathml/RenderMathMLSquareRoot.cpp:
809         * mathml/RenderMathMLSubSup.cpp:
810         * mathml/RenderMathMLUnderOver.cpp:
811
812 2010-06-25  Yury Semikhatsky  <yurys@chromium.org>
813
814         Reviewed by Pavel Feldman.
815
816         Can't see source when hitting debugger statement in evaled source
817         https://bugs.webkit.org/show_bug.cgi?id=41058
818
819         Test: inspector/debugger-pause-in-eval-script.html
820
821         * bindings/js/ScriptDebugServer.cpp:
822         (WebCore::ScriptDebugServer::sourceParsed): use lexical global object to figure out
823         where the script is compiled. Otherwise scripts typed in Web Inspector console will
824         be treated as ones evaluated in the context of Web Inspector and won't appear in the
825         scripts list.
826         * inspector/InspectorController.cpp:
827         (WebCore::InspectorController::didParseSource): cache script sources for eval's too.
828
829 2010-06-25  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
830
831         Reviewed by Kenneth Rohde Christiansen.
832
833         [EFL] Use a descriptive string in FileChooser when multiple files can
834         be selected.
835         https://bugs.webkit.org/show_bug.cgi?id=40943
836
837         EFL port has no tests yet, so no new tests.
838
839         * platform/efl/FileChooserEfl.cpp:
840         (WebCore::FileChooser::basenameForWidth):
841
842 2010-06-25  Nikolas Zimmermann  <nzimmermann@rim.com>
843
844         Reviewed by Dirk Schulze.
845
846         SVG Text Highlighting not yet supported (in Safari)
847         https://bugs.webkit.org/show_bug.cgi?id=41200
848
849         Add text match marker highlighting support for SVG text - searching for SVG text in Safari now paints the nice yellow highlighting rect, and the
850         white rectangles for all text matches. Behaves exactly like HTML text, but respecting SVGs per-character/per-chunk transformations,
851         allowing to highlight textPaths, tspans with absolute per-character positions etc..
852
853         Only manually testable, thus no new tests.
854
855         * rendering/InlineBox.h: Expose calculateBoundaries() in non-SVG builds as well, now used by InlineTextBox too.
856         * rendering/InlineTextBox.h: Add calculateBoundaries(), which will be used to refactor some code in RenderText, see below.
857         (WebCore::InlineTextBox::calculateBoundaries): Just return a IntRect(x(), y(), width(), height()) here.
858         (WebCore::RenderObject::isSVGInlineText):
859         * rendering/RenderSVGInlineText.h:
860         (WebCore::RenderSVGInlineText::isSVGInlineText): Return true for isSVGInlineText(), return false for isSVGText() (default in RenderObject.h)
861         * rendering/RenderSVGRoot.cpp:
862         (WebCore::RenderSVGRoot::paint): Only paint box decorations in PaintPhase(Child)BlockBackground, exit afterwards just like RenderBlock does.
863                                          Otherwise the white text match marker rectangle gets drawn over the yellow highlight that Safari draws. 
864         * rendering/RenderSVGText.cpp:
865         (WebCore::RenderSVGText::paint): Accept a new painting phase: PaintPhaseSelection, used by Safari when drawing the yellow highlight rect.
866         * rendering/RenderText.cpp:
867         (WebCore::RenderText::absoluteQuads): Use calculateBoundaries() instead of IntRect(x(), y(), width(), height()). SVG provides different boundaries here.
868         (WebCore::RenderText::absoluteQuadsForRange): Ditto. This is the main change, leading to correct text highlight placement.
869         * rendering/SVGInlineFlowBox.cpp: Add assertion that painting is not disabled, for consistency. Change paint phase assertion to include PaintPhaseSelection.
870         (WebCore::SVGInlineFlowBox::paint):
871         * rendering/SVGInlineTextBox.cpp:
872         (WebCore::SVGInlineTextBox::selectionRectForTextChunkPart): Refactored from selectionRect(), to share code between selectionRect/computeTextMatchMarkerRect.
873         (WebCore::SVGInlineTextBox::selectionRect): Use new helper function selectionRectForTextChunkPart().
874         (WebCore::SVGInlineTextBox::paint): Ditto. Call new computeTextMatchMarkerRect() function.
875         (WebCore::SVGInlineTextBox::computeTextMatchMarkerRect): Implemented similar to HTML, but respecting SVGs concept of text chunk parts.
876         (WebCore::SVGInlineTextBox::paintText): In PaintPhaseSelection, only paint selected text, not anything before/after the selection start/end.
877         (WebCore::SVGInlineTextBox::calculateBoundaries): Early exit, if m_chunkTransformation is identity.
878         * rendering/SVGInlineTextBox.h: Added "bool paintSelectedTextOnly" to paintText() and add new computeTextMatchMarkerRect(RenderStyle*) function.
879         * rendering/SVGRootInlineBox.cpp:
880         (WebCore::SVGRootInlineBox::paint): Change paint phase assertion to include PaintPhaseSelection.
881
882 2010-06-25  John Gregg  <johnnyg@google.com>
883
884         Reviewed by Darin Fisher.
885
886         Notification should expose ltr/rtl as TextDirection, not String
887         https://bugs.webkit.org/show_bug.cgi?id=40871
888
889         No new tests; existing test covers this, just renaming a method.
890
891         * notifications/Notification.h:
892         (WebCore::Notification::direction):
893
894 2010-06-25  Sheriff Bot  <webkit.review.bot@gmail.com>
895
896         Unreviewed, rolling out r61842.
897         http://trac.webkit.org/changeset/61842
898         https://bugs.webkit.org/show_bug.cgi?id=41208
899
900         It broke Windows build (Requested by Ossy_ on #webkit).
901
902         * ForwardingHeaders/wtf/win/OwnPtrWin.h: Removed.
903
904 2010-06-25  Patrick Gansterer  <paroga@paroga.com>
905
906         Reviewed by Darin Adler.
907
908         Remove unneeded whitespace from svgtags.in.
909         https://bugs.webkit.org/show_bug.cgi?id=40912
910
911         make_names.pl throws an error at non-empty lines
912         when using cl.exe as preprocessor.
913
914         * svg/svgtags.in:
915
916 2010-06-25  Nikolas Zimmermann  <nzimmermann@rim.com>
917
918         Reviewed by Rob Buis.
919
920         Split up isSVGText() in isSVGText() / isSVGInlineText()
921         https://bugs.webkit.org/show_bug.cgi?id=41204
922
923         Introduce isSVGInlineText(), to provide a safe mechanism to differentiate between RenderSVGText / RenderSVGInlineText.
924         No change in functionality, thus no new tests.
925
926         * rendering/RenderBlockLineLayout.cpp:
927         (WebCore::shouldPreserveNewline): s/isSVGText/isSVGInlineText/
928         (WebCore::RenderBlock::findNextLineBreak): Ditto.
929         * rendering/RenderObject.h:
930         (WebCore::RenderObject::isSVGInlineText): Return false, by default.
931         * rendering/RenderSVGInlineText.h:
932         (WebCore::RenderSVGInlineText::isSVGInlineText): Return true here, don't return true anymore for isSVGText().
933         * rendering/RenderText.cpp:
934         (WebCore::RenderText::setTextInternal): s/isSVGText/isSVGInlineText/
935         * rendering/RenderTreeAsText.cpp: Remove hack, now that we can properly differentiate between RenderSVGText / RenderSVGInlineText.
936         (WebCore::write):
937
938 2010-06-25  Kwang Yul Seo  <skyul@company100.net>
939
940         Reviewed by Adam Barth.
941
942         Change OwnPtrCommon to include platform-specific headers
943         https://bugs.webkit.org/show_bug.cgi?id=40279
944
945         Adding new type to OwnPtrCommon needlessly causes all ports to do full rebuilds.
946         Change OwnPtrCommon to include platform-specific headers to avoid all ports rebuilds.
947
948         * ForwardingHeaders/wtf/win: Added.
949         * ForwardingHeaders/wtf/win/OwnPtrWin.h: Added.
950
951 2010-06-25  Patrick Gansterer  <paroga@paroga.com>
952
953         Reviewed by Adam Barth.
954
955         Implement TextCodecs for WinCE port.
956         https://bugs.webkit.org/show_bug.cgi?id=32169
957         Originally written by Yong Li <yong.li@torchmobile.com>
958
959         * platform/graphics/FontCache.h:
960         * platform/graphics/wince/FontCacheWince.cpp:
961         (WebCore::FontCache::getMultiLanguageInterface):
962         * platform/text/wince/TextCodecWinCE.cpp: Added.
963         (WebCore::codePageCharsets):
964         (WebCore::knownCharsets):
965         (WebCore::supportedCharsets):
966         (WebCore::languageManager):
967         (WebCore::addCharset):
968         (WebCore::LanguageManager::LanguageManager):
969         (WebCore::getCodePage):
970         (WebCore::newTextCodecWinCE):
971         (WebCore::TextCodecWinCE::TextCodecWinCE):
972         (WebCore::TextCodecWinCE::~TextCodecWinCE):
973         (WebCore::TextCodecWinCE::registerBaseEncodingNames):
974         (WebCore::TextCodecWinCE::registerBaseCodecs):
975         (WebCore::TextCodecWinCE::registerExtendedEncodingNames):
976         (WebCore::TextCodecWinCE::registerExtendedCodecs):
977         (WebCore::getCodePageFlags):
978         (WebCore::findFirstNonAsciiCharacter):
979         (WebCore::decode):
980         (WebCore::TextCodecWinCE::decode):
981         (WebCore::TextCodecWinCE::encode):
982         (WebCore::TextCodecWinCE::enumerateSupportedEncodings):
983         * platform/text/wince/TextCodecWinCE.h: Added.
984
985 2010-06-24  Rob Buis  <rwlbuis@gmail.com>
986
987         Reviewed by Dirk Schulze.
988
989         Bug 40880 - SVG properties fill and stroke do not accept system colors
990         https://bugs.webkit.org/show_bug.cgi?id=40880
991
992         Handle css system colors in fill and stroke properties.
993
994         Test: svg/css/rect-system-color.xhtml
995
996         * css/CSSParser.cpp: Remove comment and unneeded if condition
997         (WebCore::CSSParser::parseValue):
998         * css/SVGCSSParser.cpp: Allow css system colors
999         (WebCore::CSSParser::parseSVGValue):
1000
1001 2010-06-24  Eric Seidel  <eric@webkit.org>
1002
1003         Reviewed by Adam Barth.
1004
1005         Make DocumentParser API private on subclasses to catch misuse bugs
1006         https://bugs.webkit.org/show_bug.cgi?id=41186
1007
1008         This already found one bug:
1009         https://bugs.webkit.org/show_bug.cgi?id=41187
1010
1011         Added a new HTMLDocumentParaser::parseDocumentFragment so that
1012         DocumentFragment.cpp does not need to use private methods.
1013
1014         * dom/DocumentFragment.cpp:
1015         (WebCore::DocumentFragment::parseHTML):
1016         * dom/XMLDocumentParser.h:
1017         (WebCore::XMLDocumentParser::setIsXHTMLDocument):
1018         (WebCore::XMLDocumentParser::isXHTMLDocument):
1019         (WebCore::XMLDocumentParser::setIsXHTMLMPDocument):
1020         (WebCore::XMLDocumentParser::isXHTMLMPDocument):
1021         * html/HTMLDocumentParser.cpp:
1022         (WebCore::HTMLDocumentParser::parseDocumentFragment):
1023         * html/HTMLDocumentParser.h:
1024         * html/LegacyHTMLDocumentParser.cpp:
1025         (WebCore::LegacyHTMLDocumentParser::parseDocumentFragment):
1026         * html/LegacyHTMLDocumentParser.h:
1027         (WebCore::LegacyHTMLDocumentParser::forceSynchronous):
1028         (WebCore::LegacyHTMLDocumentParser::processingContentWrittenByScript):
1029         * html/LegacyHTMLTreeBuilder.cpp:
1030         (WebCore::LegacyHTMLTreeBuilder::reportErrorToConsole):
1031         * loader/DocumentWriter.cpp:
1032         (WebCore::DocumentWriter::replaceDocument):
1033         * loader/TextDocument.cpp:
1034
1035 2010-05-28  Philippe Normand  <pnormand@igalia.com>
1036
1037         Reviewed by Gustavo Noronha.
1038
1039         [GStreamer] multiple video sink support
1040         https://bugs.webkit.org/show_bug.cgi?id=39472
1041
1042         Playbin2 video-sink is now a bin containing a tee element capable
1043         of dispatching the buffers to multiple video sinks. By default
1044         only our webkit video sink is used. This will allow
1045         GStreamerGWorld to add support for autovideosink in the future.
1046
1047         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1048         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
1049         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
1050         (WebCore::MediaPlayerPrivateGStreamer::naturalSize):
1051         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
1052         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1053
1054 2010-06-24  Adam Barth  <abarth@webkit.org>
1055
1056         Reviewed by Eric Seidel.
1057
1058         Sketch out AfterHeadMode for tree builder
1059         https://bugs.webkit.org/show_bug.cgi?id=41191
1060
1061         This mode is fairly similar to the others.  I needed to change some of
1062         the types around w.r.t. Nodes/Elements.
1063
1064         * html/HTMLTreeBuilder.cpp:
1065         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
1066         (WebCore::HTMLTreeBuilder::processToken):
1067         (WebCore::HTMLTreeBuilder::insertElement):
1068         * html/HTMLTreeBuilder.h:
1069         (WebCore::HTMLTreeBuilder::ElementStack::push):
1070         (WebCore::HTMLTreeBuilder::ElementStack::remove):
1071
1072 2010-06-24  Adam Barth  <abarth@webkit.org>
1073
1074         Reviewed by Eric Seidel.
1075
1076         Sketch out InHeadNoscriptMode for tree builder
1077         https://bugs.webkit.org/show_bug.cgi?id=41189
1078
1079         Lots of notImplemented() calls in this state.  I need to figure how to
1080         delegate handling of a token from one state to another.
1081
1082         * html/HTMLTreeBuilder.cpp:
1083         (WebCore::HTMLTreeBuilder::processToken):
1084
1085 2010-06-24  Adam Barth  <abarth@webkit.org>
1086
1087         Reviewed by Eric Seidel.
1088
1089         Sketch out InHeadMode for tree builder
1090         https://bugs.webkit.org/show_bug.cgi?id=41184
1091
1092         This state is relatively straightforward.  We introduce the stack of
1093         open elements to track that notion in the spec.  The old tree builder
1094         has a nice data structure for that, which we'll probably steal, but I'd
1095         like to see what the full API is first.
1096
1097         * html/HTMLTreeBuilder.cpp:
1098         (WebCore::HTMLTreeBuilder::processToken):
1099         (WebCore::HTMLTreeBuilder::insertCharacter):
1100         (WebCore::HTMLTreeBuilder::insertGenericRCDATAElement):
1101         (WebCore::HTMLTreeBuilder::insertGenericRawTextElement):
1102         (WebCore::HTMLTreeBuilder::insertScriptElement):
1103         * html/HTMLTreeBuilder.h:
1104         (WebCore::HTMLTreeBuilder::ElementStack::pop):
1105         (WebCore::HTMLTreeBuilder::ElementStack::top):
1106
1107 2010-06-24  Adam Barth  <abarth@webkit.org>
1108
1109         Reviewed by Eric Seidel.
1110
1111         Sketch out BeforeHeadMode tree builder state
1112         https://bugs.webkit.org/show_bug.cgi?id=41183
1113
1114         This makes procesToken recursive, which might not be the best idea.
1115         Also, we can now make fake AtomicHTMLTokens for use by the algorithm.
1116
1117         * html/HTMLToken.h:
1118         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
1119         * html/HTMLTreeBuilder.cpp:
1120         (WebCore::HTMLTreeBuilder::processToken):
1121         (WebCore::HTMLTreeBuilder::insertElement):
1122         * html/HTMLTreeBuilder.h:
1123
1124 2010-06-22 Antonio Gomes <tonikitoo@webkit.org>
1125
1126         Reviewed by David Hyatt.
1127
1128         Add a NodeList-derivated wrapper class for a ListHashSet.
1129         https://bugs.webkit.org/show_bug.cgi?id=41081
1130
1131         StaticHashSetList will work as a wrapper to ListHashSet objects that are
1132         aimed to be exposed to the DOM.
1133
1134         As a use case, the rect based HitTest (bug 40197) will store the retrieved nodes
1135         in a ListHashSet. It is going to be exposed to the DOM through are nodesFromRect
1136         of Document returning a NodeList (i.e. StatisHashSetList) wrapping a ListHashSet.
1137
1138         No new tests.
1139
1140 2010-06-24  Cris Neckar  <cdn@chromium.org>
1141
1142         Reviewed by Darin Fisher.
1143
1144         [Chromium] Out of bounds write in WebCore::PNGImageDecoder::rowAvailable
1145         https://bugs.webkit.org/show_bug.cgi?id=40798
1146
1147         Catches error in row callback for libPNG when extra rows are returned.
1148
1149         Test: fast/images/png-extra-row-crash.html
1150
1151         * platform/image-decoders/png/PNGImageDecoder.cpp:
1152         (WebCore::PNGImageDecoder::rowAvailable):
1153
1154 2010-06-24  Eric Seidel  <eric@webkit.org>
1155
1156         Reviewed by Adam Barth.
1157
1158         Clean up and document DocumentWriter::replaceDocument code path
1159         https://bugs.webkit.org/show_bug.cgi?id=41182
1160
1161         No functional changes, thus no tests.
1162
1163         * loader/DocumentWriter.cpp:
1164         (WebCore::DocumentWriter::replaceDocument):
1165          - Remove comment which could be misleading.
1166
1167 2010-06-23  Dumitru Daniliuc  <dumi@chromium.org>
1168
1169         Reviewed by Adam Barth.
1170
1171         Implementing DatabaseSync::openDatabaseSync().
1172         https://bugs.webkit.org/show_bug.cgi?id=40607
1173
1174         Moved some common code from Database to AbstractDatabase. Made
1175         performOpenAndVerify() virtual, since DatabaseSync doesn't need to
1176         interact with DatabaseThread. Removed the m_creationCallback
1177         field, since it's only needed in the openDatabase{Sync} methods.
1178
1179         * storage/AbstractDatabase.cpp:
1180         (WebCore::retrieveTextResultFromDatabase):
1181         (WebCore::setTextValueInDatabase):
1182         (WebCore::guidMutex):
1183         (WebCore::guidToVersionMap):
1184         (WebCore::updateGuidVersionMap):
1185         (WebCore::guidToDatabaseMap):
1186         (WebCore::guidForOriginAndName):
1187         (WebCore::AbstractDatabase::databaseInfoTableName):
1188         (WebCore::AbstractDatabase::AbstractDatabase):
1189         (WebCore::AbstractDatabase::closeDatabase):
1190         (WebCore::AbstractDatabase::version):
1191         (WebCore::AbstractDatabase::performOpenAndVerify):
1192         (WebCore::AbstractDatabase::scriptExecutionContext):
1193         (WebCore::AbstractDatabase::securityOrigin):
1194         (WebCore::AbstractDatabase::stringIdentifier):
1195         (WebCore::AbstractDatabase::displayName):
1196         (WebCore::AbstractDatabase::estimatedSize):
1197         (WebCore::AbstractDatabase::fileName):
1198         (WebCore::AbstractDatabase::databaseVersionKey):
1199         (WebCore::AbstractDatabase::getVersionFromDatabase):
1200         (WebCore::AbstractDatabase::setVersionInDatabase):
1201         (WebCore::AbstractDatabase::versionMatchesExpected):
1202         (WebCore::AbstractDatabase::setExpectedVersion):
1203         (WebCore::AbstractDatabase::disableAuthorizer):
1204         (WebCore::AbstractDatabase::enableAuthorizer):
1205         (WebCore::AbstractDatabase::setAuthorizerReadOnly):
1206         (WebCore::AbstractDatabase::lastActionChangedDatabase):
1207         (WebCore::AbstractDatabase::lastActionWasInsert):
1208         (WebCore::AbstractDatabase::resetDeletes):
1209         (WebCore::AbstractDatabase::hadDeletes):
1210         (WebCore::AbstractDatabase::resetAuthorizer):
1211         * storage/AbstractDatabase.h:
1212         (WebCore::AbstractDatabase::opened):
1213         (WebCore::AbstractDatabase::isNew):
1214         (WebCore::AbstractDatabase::databaseDebugName):
1215         * storage/Database.cpp:
1216         (WebCore::DatabaseCreationCallbackTask::create):
1217         (WebCore::DatabaseCreationCallbackTask::performTask):
1218         (WebCore::DatabaseCreationCallbackTask::DatabaseCreationCallbackTask):
1219         (WebCore::Database::openDatabase):
1220         (WebCore::Database::Database):
1221         (WebCore::Database::version):
1222         (WebCore::Database::openAndVerifyVersion):
1223         (WebCore::Database::close):
1224         (WebCore::Database::stop):
1225         (WebCore::Database::performOpenAndVerify):
1226         * storage/Database.h:
1227         (WebCore::Database::sqliteDatabase):
1228         * storage/DatabaseAuthorizer.cpp:
1229         (WebCore::DatabaseAuthorizer::create):
1230         (WebCore::DatabaseAuthorizer::DatabaseAuthorizer):
1231         (WebCore::DatabaseAuthorizer::denyBasedOnTableName):
1232         * storage/DatabaseAuthorizer.h:
1233         * storage/DatabaseSync.cpp:
1234         (WebCore::DatabaseSync::openDatabaseSync):
1235         (WebCore::DatabaseSync::DatabaseSync):
1236         (WebCore::DatabaseSync::changeVersion):
1237         (WebCore::DatabaseSync::transaction):
1238         (WebCore::DatabaseSync::markAsDeletedAndClose):
1239         (WebCore::CloseSyncDatabaseOnContextThreadTask::create):
1240         (WebCore::CloseSyncDatabaseOnContextThreadTask::performTask):
1241         (WebCore::CloseSyncDatabaseOnContextThreadTask::CloseSyncDatabaseOnContextThreadTask):
1242         (WebCore::DatabaseSync::closeImmediately):
1243         * storage/DatabaseSync.h:
1244         * storage/DatabaseTask.cpp:
1245         (WebCore::DatabaseOpenTask::DatabaseOpenTask):
1246         (WebCore::DatabaseOpenTask::doPerformTask):
1247         * storage/DatabaseTask.h:
1248         (WebCore::DatabaseOpenTask::create):
1249
1250 2010-06-24  Steve Falkenburg  <sfalken@apple.com>
1251
1252         Windows build fix.
1253
1254         * platform/network/cf/AuthenticationCF.h:
1255
1256 2010-06-24  Martin Robinson  <mrobinson@igalia.com>
1257
1258         Unreviewed. Build fix.
1259
1260         Fix the build after r61798.
1261
1262         * platform/gtk/PasteboardHelper.cpp:
1263         (WebCore::PasteboardHelper::getClipboardContents):
1264
1265 2010-06-24  Alexey Proskuryakov  <ap@apple.com>
1266
1267         Reviewed by Brady Eidson.
1268
1269         https://bugs.webkit.org/show_bug.cgi?id=41178
1270         Timed refresh in subframes isn't stopped when going into b/f cache
1271
1272         Test: fast/history/timed-refresh-in-cached-frame.html
1273
1274         * history/CachedFrame.cpp: (WebCore::CachedFrame::CachedFrame): Top frame's stopLoading()
1275         won't help cached subframes; stop loading from here.
1276
1277         * loader/FrameLoader.cpp:
1278         (WebCore::FrameLoader::stopLoading): Don't stop loading in child frames. This didn't work
1279         for cached frames due to frame tree having been already desonstructed, and it's not necessary
1280         in non-cached case because stopLoading() will be called for subframes via
1281         FrameLoader::detachFromParent() and closeURL().
1282         (WebCore::FrameLoader::pageHidden): This was a second code path that dispatched pagehide
1283         event - it's no longer needed, because everything goes through FrameLoader::stopLoading().
1284         (WebCore::FrameLoader::commitProvisionalLoad): Don't call pageHidden(), the code for adding
1285         frame to b/f cache will do everything.
1286
1287         * loader/FrameLoader.h: Removed pageHidden().
1288
1289 2010-06-24  Eric Seidel  <eric@webkit.org>
1290
1291         Unreviewed. Fix the build.  I am a bad man.
1292
1293         * loader/DocumentWriter.cpp:
1294         (WebCore::DocumentWriter::replaceDocument):
1295
1296 2010-06-24  Martin Robinson  <mrobinson@igalia.com>
1297
1298         Reviewed by Xan Lopez.
1299
1300         Build fix for building against GTK+ 3.x.
1301
1302         No new tests as functionality has not changed.
1303
1304         * platform/gtk/GtkVersioning.h:
1305         * platform/gtk/PasteboardHelper.cpp:
1306         (WebCore::PasteboardHelper::getClipboardContents):
1307         (WebCore::PasteboardHelper::fillSelectionData):
1308
1309 2010-06-24  Eric Seidel  <eric@webkit.org>
1310
1311         Reviewed by Adam Barth.
1312
1313         Clean up and document DocumentWriter::replaceDocument code path
1314         https://bugs.webkit.org/show_bug.cgi?id=41182
1315
1316         No functional change, thus no test.
1317
1318         * loader/DocumentWriter.cpp:
1319         (WebCore::DocumentWriter::replaceDocument):
1320         * loader/DocumentWriter.h:
1321
1322 2010-06-24  Jer Noble  <jer.noble@apple.com>
1323
1324         Reviewed by Eric Carlson.
1325
1326         Full-screened content doesn't keep the display on: Safari not grabbing a power assertion?
1327         https://bugs.webkit.org/show_bug.cgi?id=40939
1328         rdar://problem/7996172
1329         
1330         Export -[MediaElement playbackRate];
1331         
1332         * WebCore.Video.exp:
1333
1334 2010-06-21  Evan Martin  <evan@chromium.org>
1335
1336         Reviewed by Adam Barth.
1337
1338         [chromium] overlapping characters in complex text
1339         https://bugs.webkit.org/show_bug.cgi?id=40966
1340
1341         We need to clear all the buffers we hand to Harfbuzz before we use them.
1342         While I'm here, refactor the code slightly to make its behavior more
1343         clear and correct (previously, we would repeatedly double our buffer
1344         size when we could have just sized it correctly on the second try).
1345
1346         * platform/graphics/chromium/FontLinux.cpp:
1347         (WebCore::TextRunWalker::TextRunWalker):
1348         (WebCore::TextRunWalker::nextScriptRun):
1349         (WebCore::TextRunWalker::createGlyphArrays):
1350         (WebCore::TextRunWalker::shapeGlyphs):
1351
1352 2010-06-24  Adele Peterson  <adele@apple.com>
1353
1354         Reviewed by Sam Weinig.
1355
1356         Updated fix for <rdar://problem/8093680> "Paste and Match Style" should fire paste events
1357         https://bugs.webkit.org/show_bug.cgi?id=41085
1358
1359         Covered by existing tests.
1360
1361         * editing/EditorCommand.cpp:
1362         (WebCore::executePasteAsPlainText): Added.
1363         (WebCore::createCommandMap): Added pasteAsPlainText command.
1364
1365 2010-06-24  Adam Barth  <abarth@webkit.org>
1366
1367         Reviewed by Eric Seidel.
1368
1369         Sketch out BeforeHTMLMode state
1370         https://bugs.webkit.org/show_bug.cgi?id=41133
1371
1372         In this patch, we switch the TreeBuidler over to using AtomicHTMLTokens
1373         and sketch out another state.  These states don't actually do anything
1374         yet, I'm still just getting the structure of the spec into the code so
1375         we can implement the details incrementally.
1376
1377         * html/HTMLTreeBuilder.cpp:
1378         (WebCore::HTMLTreeBuilder::constructTreeFromToken):
1379         (WebCore::HTMLTreeBuilder::processToken):
1380         (WebCore::HTMLTreeBuilder::insertDoctype):
1381         (WebCore::HTMLTreeBuilder::insertComment):
1382         * html/HTMLTreeBuilder.h:
1383         (WebCore::HTMLTreeBuilder::parseError):
1384
1385 2010-06-24  Adam Barth  <abarth@webkit.org>
1386
1387         Reviewed by Eric Seidel.
1388
1389         Add AtomicHTMLToken
1390         https://bugs.webkit.org/show_bug.cgi?id=41131
1391
1392         We need an atomized version of the token for use in the tree builder.
1393         Eventually, we should make the existing HTMLToken an internal detail of
1394         the HTMLTokenizer.  This new AtomicHTMLToken should be also be more
1395         easily cached between the preload scanner and the tree builder.
1396
1397         * html/HTMLToken.h:
1398         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
1399         (WebCore::AtomicHTMLToken::type):
1400         (WebCore::AtomicHTMLToken::name):
1401         (WebCore::AtomicHTMLToken::selfClosing):
1402         (WebCore::AtomicHTMLToken::attributes):
1403         (WebCore::AtomicHTMLToken::characters):
1404         (WebCore::AtomicHTMLToken::comment):
1405         (WebCore::AtomicHTMLToken::publicIdentifier):
1406         (WebCore::AtomicHTMLToken::systemIdentifier):
1407         (WebCore::AtomicHTMLToken::forceQuirks):
1408         * html/HTMLTreeBuilder.cpp:
1409         (WebCore::convertToOldStyle):
1410         (WebCore::HTMLTreeBuilder::passTokenToLegacyParser):
1411
1412 2010-06-24  Eric Seidel  <eric@webkit.org>
1413
1414         Reviewed by Adam Barth.
1415
1416         Add RawDataDocumentParser to get rid of a bunch of copy/paste code in DocumentParser subclasses
1417         https://bugs.webkit.org/show_bug.cgi?id=41136
1418
1419         I think this is likely far from the final design,
1420         however this is almost entirely minus lines which is a
1421         good thing.
1422
1423         The original authors of these DocumentParser subclasses
1424         seem to have just copied the files whole, as they all
1425         had the same includes, many of which were unnecessary for
1426         some of the files.
1427
1428         I think eventually the FrameLoader will call a virtual
1429         DocumentParser::appendData which will in turn decode
1430         and call another write/appendData call.  In the case
1431         of these RawDataDocumentParsers, they will just override
1432         the low-level appendData call instead of needing
1433         DocumentWriter to have a special if based on
1434         DocumentParser::wantsRawData.
1435
1436         No functional change, thus no tests.
1437
1438         * GNUmakefile.am:
1439         * WebCore.gypi:
1440         * WebCore.pro:
1441         * WebCore.xcodeproj/project.pbxproj:
1442         * dom/DocumentParser.h:
1443         (WebCore::DocumentParser::writeRawData):
1444         * loader/ImageDocument.cpp:
1445         (WebCore::ImageDocumentParser::ImageDocumentParser):
1446         (WebCore::ImageDocumentParser::finish):
1447         * loader/MediaDocument.cpp:
1448         (WebCore::MediaDocumentParser::MediaDocumentParser):
1449         (WebCore::MediaDocumentParser::writeRawData):
1450         * loader/PluginDocument.cpp:
1451         (WebCore::PluginDocumentParser::PluginDocumentParser):
1452         * loader/SinkDocument.cpp:
1453         (WebCore::SinkDocument::createParser):
1454
1455 2010-06-23  Peter Kasting  <pkasting@google.com>
1456
1457         Reviewed by Adam Barth.
1458
1459         REGRESSION (r61619): Memory corruption in open-source ICO decoder
1460         https://bugs.webkit.org/show_bug.cgi?id=41107
1461
1462         * platform/image-decoders/bmp/BMPImageReader.cpp:
1463         (WebCore::BMPImageReader::processInfoHeader): Fix memory corruption.
1464         * platform/image-decoders/ico/ICOImageDecoder.cpp:
1465         (WebCore::ICOImageDecoder::processDirectoryEntries): Handle sizing failure correctly (though failure should be impossible).
1466
1467 2010-06-24  Sheriff Bot  <webkit.review.bot@gmail.com>
1468
1469         Unreviewed, rolling out r61783.
1470         http://trac.webkit.org/changeset/61783
1471         https://bugs.webkit.org/show_bug.cgi?id=41179
1472
1473         Caused a couple of test failures (Requested by japhet on
1474         #webkit).
1475
1476         * dom/DOMImplementation.cpp:
1477         (WebCore::DOMImplementation::createDocument):
1478         (WebCore::DOMImplementation::createHTMLDocument):
1479         * dom/DOMImplementation.h:
1480         * dom/Document.cpp:
1481         (WebCore::Document::Document):
1482         (WebCore::Document::initSecurityContext):
1483         * dom/Document.h:
1484         (WebCore::Document::create):
1485         (WebCore::Document::createXHTML):
1486         * html/HTMLDocument.cpp:
1487         (WebCore::HTMLDocument::HTMLDocument):
1488         * html/HTMLDocument.h:
1489         (WebCore::HTMLDocument::create):
1490         * html/HTMLViewSourceDocument.cpp:
1491         (WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument):
1492         * html/HTMLViewSourceDocument.h:
1493         (WebCore::HTMLViewSourceDocument::create):
1494         * loader/CachedFont.cpp:
1495         (WebCore::CachedFont::ensureSVGFontData):
1496         * loader/DocumentWriter.cpp:
1497         (WebCore::DocumentWriter::createDocument):
1498         (WebCore::DocumentWriter::begin):
1499         * loader/DocumentWriter.h:
1500         * loader/FTPDirectoryDocument.cpp:
1501         (WebCore::FTPDirectoryDocument::FTPDirectoryDocument):
1502         * loader/FTPDirectoryDocument.h:
1503         (WebCore::FTPDirectoryDocument::create):
1504         * loader/ImageDocument.cpp:
1505         (WebCore::ImageDocument::ImageDocument):
1506         * loader/ImageDocument.h:
1507         (WebCore::ImageDocument::create):
1508         * loader/MediaDocument.cpp:
1509         (WebCore::MediaDocument::MediaDocument):
1510         * loader/MediaDocument.h:
1511         (WebCore::MediaDocument::create):
1512         * loader/PlaceholderDocument.h:
1513         (WebCore::PlaceholderDocument::create):
1514         (WebCore::PlaceholderDocument::PlaceholderDocument):
1515         * loader/PluginDocument.cpp:
1516         (WebCore::PluginDocument::PluginDocument):
1517         * loader/PluginDocument.h:
1518         (WebCore::PluginDocument::create):
1519         * loader/SinkDocument.cpp:
1520         (WebCore::SinkDocument::SinkDocument):
1521         * loader/SinkDocument.h:
1522         (WebCore::SinkDocument::create):
1523         * loader/TextDocument.cpp:
1524         (WebCore::TextDocument::TextDocument):
1525         * loader/TextDocument.h:
1526         (WebCore::TextDocument::create):
1527         * svg/SVGDocument.cpp:
1528         (WebCore::SVGDocument::SVGDocument):
1529         * svg/SVGDocument.h:
1530         (WebCore::SVGDocument::create):
1531         * xml/DOMParser.cpp:
1532         (WebCore::DOMParser::parseFromString):
1533         * xml/XMLHttpRequest.cpp:
1534         (WebCore::XMLHttpRequest::responseXML):
1535         * xml/XSLTProcessor.cpp:
1536         (WebCore::XSLTProcessor::createDocumentFromSource):
1537
1538 2010-06-24  Martin Robinson  <mrobinson@igalia.com>
1539
1540         Reviewed by Xan Lopez.
1541
1542         [GTK] Small code cleanup in RenderThemeGtk
1543         https://bugs.webkit.org/show_bug.cgi?id=40989
1544
1545         Reduce the amount of duplicated code slightly and prepare this section for
1546         future improvements, such as sharing the clipping rectangle calculation with
1547         the slow path.
1548
1549         No new tests as functionality has not changed.
1550
1551         * platform/gtk/RenderThemeGtk.cpp:
1552         (WebCore::paintMozillaGtkWidget): Small code cleanup.
1553
1554 2010-06-24  Nate Chapin  <japhet@chromium.org>
1555
1556         Reviewed by Adam Barth.
1557
1558         Take a KURL parameter in Document's constructor.
1559         This will remove the one case where Document::url() 
1560         and FrameLoader::url() are not equal, allowing us to
1561         remove FrameLoader::url().
1562
1563         https://bugs.webkit.org/show_bug.cgi?id=41166
1564
1565         Refactor only, no new tests.
1566
1567         * dom/DOMImplementation.cpp:
1568         (WebCore::DOMImplementation::createDocument): Take a KURL and pass it through to Document.
1569         (WebCore::DOMImplementation::createHTMLDocument):
1570         * dom/DOMImplementation.h:
1571         * dom/Document.cpp:
1572         (WebCore::Document::Document): Call setURL() for non-empty KURL input parameters.
1573         (WebCore::Document::initSecurityContext): m_url is now initialized, so use it instead
1574             of m_frame->loader()->url() for initializing the SecurityOrigin.
1575         * dom/Document.h:
1576         (WebCore::Document::create):
1577         (WebCore::Document::createXHTML):
1578         * html/HTMLDocument.cpp:
1579         * html/HTMLDocument.h: Add KURL parameter to create() and constructor.
1580         * html/HTMLViewSourceDocument.cpp:
1581         * html/HTMLViewSourceDocument.h: Add KURL parameter to create() and constructor.
1582         * loader/CachedFont.cpp:
1583         (WebCore::CachedFont::ensureSVGFontData):
1584         * loader/DocumentWriter.cpp:
1585         (WebCore::DocumentWriter::createDocument): Take a KURL and pass it through to Document.
1586         (WebCore::DocumentWriter::begin): Pass existing url parameter to constructors, and remove
1587             redundant Document::setURL() call.
1588         * loader/DocumentWriter.h:
1589         * loader/FTPDirectoryDocument.cpp:
1590         * loader/FTPDirectoryDocument.h: Add KURL parameter to create() and constructor.
1591         * loader/ImageDocument.cpp:
1592         * loader/ImageDocument.h: Add KURL parameter to create() and constructor.
1593         * loader/MediaDocument.cpp:
1594         * loader/MediaDocument.h: Add KURL parameter to create() and constructor.
1595         * loader/PlaceholderDocument.h: Add KURL parameter to create() and constructor.
1596         * loader/PluginDocument.cpp:
1597         * loader/PluginDocument.h: Add KURL parameter to create() and constructor.
1598         * loader/SinkDocument.cpp:
1599         * loader/SinkDocument.h: Add KURL parameter to create() and constructor.
1600         * loader/TextDocument.cpp:
1601         * loader/TextDocument.h: Add KURL parameter to create() and constructor.
1602         * svg/SVGDocument.cpp:
1603         * svg/SVGDocument.h: Add KURL parameter to create() and constructor.
1604         * xml/DOMParser.cpp:
1605         (WebCore::DOMParser::parseFromString):
1606         * xml/XMLHttpRequest.cpp:
1607         (WebCore::XMLHttpRequest::responseXML):
1608         * xml/XSLTProcessor.cpp:
1609         (WebCore::XSLTProcessor::createDocumentFromSource):
1610
1611 2010-06-24  Brady Eidson  <beidson@apple.com>
1612
1613         Reviewed by Sam Weinig.
1614
1615         <rdar://problem/8044645> and https://bugs.webkit.org/show_bug.cgi?id=41082
1616
1617         Webarchives will null main resource cause a repro crash.
1618
1619         Test: webarchive/loading/mainresource-null-mimetype-crash.html
1620
1621         * loader/archive/cf/LegacyWebArchive.cpp:
1622         (WebCore::LegacyWebArchive::createResource): Fail to create the archive resource if the main resource's
1623           mime type is null.
1624
1625 2010-06-24  Damian Kaleta  <dkaleta@apple.com>
1626
1627         Reviewed by Sam Weinig.
1628
1629         Provide a way to obtain the rendered rectangle for box elements.
1630
1631         * WebCore.base.exp: Export the symbol so we can see it in WebKit.
1632         * dom/Node.cpp:
1633         (WebCore::Node::renderRect): Added new ethod that will return a rendered rectangle for box elements.
1634         * dom/Node.h: Ditto.
1635
1636 2010-06-24  Vangelis Kokkevis  <vangelis@chromium.org>
1637
1638         Reviewed by Darin Fisher.
1639
1640         [Chromium] Create specialized classes for Transform,
1641         Image and WebGL layers to replace the rather monolithic LayerChromium class.
1642         Layers can now own the GL texture they use for backing store and a different
1643         shading program can be used by the compositor for each layer type. WebGL layers
1644         are not yet hooked up to GraphicsContext3D.
1645         https://bugs.webkit.org/show_bug.cgi?id=41106
1646
1647         * WebCore.gypi:
1648         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1649         (WebCore::GraphicsLayerChromium::GraphicsLayerChromium):
1650         (WebCore::GraphicsLayerChromium::setContentsToImage):
1651         (WebCore::GraphicsLayerChromium::updateLayerPreserves3D):
1652         * platform/graphics/chromium/GraphicsLayerChromium.h:
1653         (WebCore::GraphicsLayerChromium::):
1654         * platform/graphics/chromium/ImageLayerChromium.cpp: Added.
1655         (WebCore::ImageLayerChromium::create):
1656         (WebCore::ImageLayerChromium::ImageLayerChromium):
1657         (WebCore::ImageLayerChromium::setContents):
1658         (WebCore::ImageLayerChromium::updateTextureContents):
1659         * platform/graphics/chromium/ImageLayerChromium.h: Added.
1660         (WebCore::ImageLayerChromium::drawsContent):
1661         * platform/graphics/chromium/LayerChromium.cpp:
1662         (WebCore::LayerChromium::create):
1663         (WebCore::LayerChromium::LayerChromium):
1664         (WebCore::LayerChromium::updateTextureContents):
1665         (WebCore::LayerChromium::updateTextureRect):
1666         * platform/graphics/chromium/LayerChromium.h:
1667         (WebCore::LayerChromium::drawsContent):
1668         (WebCore::LayerChromium::ownsTexture):
1669         (WebCore::LayerChromium::textureId):
1670         (WebCore::LayerChromium::setShaderProgramId):
1671         (WebCore::LayerChromium::shaderProgramId):
1672         * platform/graphics/chromium/LayerRendererChromium.cpp:
1673         (WebCore::LayerRendererChromium::createLayerShader):
1674         (WebCore::ShaderProgram::ShaderProgram):
1675         (WebCore::LayerRendererChromium::LayerRendererChromium):
1676         (WebCore::LayerRendererChromium::~LayerRendererChromium):
1677         (WebCore::LayerRendererChromium::useShaderProgram):
1678         (WebCore::LayerRendererChromium::drawTexturedQuad):
1679         (WebCore::LayerRendererChromium::drawLayers):
1680         (WebCore::LayerRendererChromium::drawDebugBorder):
1681         (WebCore::LayerRendererChromium::updateLayersRecursive):
1682         (WebCore::LayerRendererChromium::drawLayer):
1683         (WebCore::LayerRendererChromium::bindCommonAttribLocations):
1684         (WebCore::LayerRendererChromium::initializeSharedGLObjects):
1685         * platform/graphics/chromium/LayerRendererChromium.h:
1686         (WebCore::LayerRendererChromium::):
1687         * platform/graphics/chromium/TransformLayerChromium.cpp: Added.
1688         (WebCore::TransformLayerChromium::create):
1689         (WebCore::TransformLayerChromium::TransformLayerChromium):
1690         * platform/graphics/chromium/TransformLayerChromium.h: Added.
1691         (WebCore::TransformLayerChromium::drawsContent):
1692         * platform/graphics/chromium/WebGLLayerChromium.cpp: Added.
1693         (WebCore::WebGLLayerChromium::WebGLLayerChromium):
1694         (WebCore::WebGLLayerChromium::textureId):
1695         (WebCore::WebGLLayerChromium::updateTextureContents):
1696         (WebCore::WebGLLayerChromium::setContext):
1697         * platform/graphics/chromium/WebGLLayerChromium.h: Added.
1698         (WebCore::WebGLLayerChromium::drawsContent):
1699         (WebCore::WebGLLayerChromium::ownsTexture):
1700         (WebCore::WebGLLayerChromium::shaderProgramId):
1701         (WebCore::WebGLLayerChromium::setShaderProgramId):
1702
1703 2010-06-24  Pavel Feldman  <pfeldman@chromium.org>
1704
1705         Reviewed by Yury Semikhatsky.
1706  
1707         Web Inspector: Inspector cleanup + better DevTools alignment with Inspector.
1708
1709         https://bugs.webkit.org/show_bug.cgi?id=41094
1710
1711         - Removed a bunch of unused methods from all over the place
1712         - Added client callbacks for states surviving navigation
1713         - Implemented more user-friendly stub for InspectorFrontendHost.platform
1714
1715         * inspector/InspectorClient.h:
1716         (WebCore::InspectorClient::resourceTrackingWasEnabled):
1717         (WebCore::InspectorClient::resourceTrackingWasDisabled):
1718         (WebCore::InspectorClient::timelineProfilerWasStarted):
1719         (WebCore::InspectorClient::timelineProfilerWasStopped):
1720         * inspector/InspectorController.cpp:
1721         (WebCore::InspectorController::enableResourceTracking):
1722         (WebCore::InspectorController::disableResourceTracking):
1723         (WebCore::InspectorController::ensureSettingsLoaded):
1724         (WebCore::InspectorController::startTimelineProfiler):
1725         (WebCore::InspectorController::stopTimelineProfiler):
1726         * inspector/InspectorFrontend.cpp:
1727         * inspector/InspectorFrontend.h:
1728         * inspector/front-end/InspectorBackendStub.js:
1729         * inspector/front-end/InspectorFrontendHostStub.js:
1730         (.WebInspector.InspectorFrontendHostStub.prototype.platform):
1731
1732 2010-06-23  Alexey Proskuryakov  <ap@apple.com>
1733
1734         Reviewed by Darin Adler.
1735
1736         https://bugs.webkit.org/show_bug.cgi?id=41099
1737         Assertion failure: !m_suspended when XMLHttpRequest fails
1738
1739         This was a general problem with load failure timer not being deferred.
1740
1741         Test: manual-tests/xhr-failure-behind-alert.html
1742
1743         * manual-tests/xhr-failure-behind-alert.html: Added.
1744
1745         * platform/network/ResourceHandle.cpp:
1746         (WebCore::ResourceHandle::fireFailure): Added an empty case for NoFailure. Reset
1747         m_scheduledFailureType to NoFailure when firing.
1748         (WebCore::ResourceHandle::setDefersLoading): Stop failure timer when deferring, restart when
1749         un-deferring loads.
1750
1751         * platform/network/ResourceHandle.h: Renamed m_failureType to m_scheduledFailureType to
1752         make it clear that it is only set when a timer is scheduled.
1753
1754         * platform/network/ResourceHandleInternal.h:
1755         (WebCore::ResourceHandleInternal::ResourceHandleInternal): Initialize m_scheduledFailureType
1756         to NoFailure, so that we can look at it when un-deferring loads.
1757
1758         * platform/network/android/ResourceHandleAndroid.cpp:
1759         (WebCore::ResourceHandle::platformSetDefersLoading):
1760         * platform/network/cf/ResourceHandleCFNet.cpp:
1761         (WebCore::ResourceHandle::platformSetDefersLoading):
1762         * platform/network/curl/ResourceHandleCurl.cpp:
1763         (WebCore::ResourceHandle::platformSetDefersLoading):
1764         * platform/network/mac/ResourceHandleMac.mm:
1765         (WebCore::ResourceHandle::platformSetDefersLoading):
1766         * platform/network/qt/ResourceHandleQt.cpp:
1767         (WebCore::ResourceHandle::platformSetDefersLoading):
1768         * platform/network/soup/ResourceHandleSoup.cpp:
1769         Platform specific parts of setDefersLoading() are now in a separate function.
1770
1771 2010-06-24  Pavel Feldman  <pfeldman@chromium.org>
1772
1773         Not reviewed: revert 61766.
1774
1775         * inspector/InspectorClient.h:
1776         * inspector/InspectorController.cpp:
1777         (WebCore::InspectorController::enableResourceTracking):
1778         (WebCore::InspectorController::disableResourceTracking):
1779         (WebCore::InspectorController::ensureSettingsLoaded):
1780         (WebCore::InspectorController::startTimelineProfiler):
1781         (WebCore::InspectorController::stopTimelineProfiler):
1782         * inspector/InspectorFrontend.cpp:
1783         (WebCore::InspectorFrontend::setAttachedWindow):
1784         * inspector/InspectorFrontend.h:
1785         * inspector/front-end/InspectorBackendStub.js:
1786         (.WebInspector.InspectorBackendStub.prototype.setAttachedWindowHeight):
1787         * inspector/front-end/InspectorFrontendHostStub.js:
1788         (.WebInspector.InspectorFrontendHostStub.prototype.platform):
1789
1790 2010-06-23  Pavel Feldman  <pfeldman@chromium.org>
1791
1792         Reviewed by Yury Semikhatsky.
1793
1794         Web Inspector: Inspector cleanup + better DevTools alignment with Inspector.
1795         
1796         https://bugs.webkit.org/show_bug.cgi?id=41094
1797
1798         - Removed a bunch of unused methods from all over the place
1799         - Added client callbacks for states surviving navigation
1800         - Implemented more user-friendly stub for InspectorFrontendHost.platform
1801
1802         * inspector/InspectorClient.h:
1803         (WebCore::InspectorClient::resourceTrackingWasEnabled):
1804         (WebCore::InspectorClient::resourceTrackingWasDisabled):
1805         (WebCore::InspectorClient::timelineProfilerWasStarted):
1806         (WebCore::InspectorClient::timelineProfilerWasStopped):
1807         * inspector/InspectorController.cpp:
1808         (WebCore::InspectorController::enableResourceTracking):
1809         (WebCore::InspectorController::disableResourceTracking):
1810         (WebCore::InspectorController::ensureSettingsLoaded):
1811         (WebCore::InspectorController::startTimelineProfiler):
1812         (WebCore::InspectorController::stopTimelineProfiler):
1813         * inspector/InspectorFrontend.cpp:
1814         * inspector/InspectorFrontend.h:
1815         * inspector/front-end/InspectorBackendStub.js:
1816         * inspector/front-end/InspectorFrontendHostStub.js:
1817         (.WebInspector.InspectorFrontendHostStub.prototype.platform):
1818
1819 2010-06-24  Nikolas Zimmermann  <nzimmermann@rim.com>
1820
1821         Reviewed by Dirk Schulze.
1822
1823         Inspector & SVG Text have problems, kids of RenderSVGText are not properly placed.
1824         https://bugs.webkit.org/show_bug.cgi?id=41143
1825
1826         Simplify code path taken for SVG text in InspectorController, take the code path currently only used for RenderInline,
1827         that just calls absoluteQuads(), and displays the result. Refactored code that all SVG renderers (except RenderSVGRoot)
1828         take this code path -> highlighting now works as expected.
1829
1830         Don't use absoluteClippedOverlowRect() in the various RenderSVG*::absoluteQuads() methods, as we're loosing floating-point precision.
1831         Instead use localToAbsoluteQuad(strokeBoundingBox()) in order to highlight the unclipped, unfiltered, etc.. region that this renderer would paint.
1832
1833         No new tests, as this is only manual testable - at least I didn't find any Inspector-Highlighting tests, if someone knows please mail me.
1834
1835         * inspector/InspectorController.cpp:
1836         (WebCore::drawHighlightForLineBoxesOrSVGRenderer):
1837         (WebCore::InspectorController::drawNodeHighlight):
1838         * rendering/RenderSVGBlock.cpp:
1839         (WebCore::RenderSVGBlock::absoluteRects): ASSERT_NOT_REACHED() here. SVG should only be inspected through absoluteQuads().
1840         * rendering/RenderSVGBlock.h: Add absoluteRects() in this base class for RenderForeignObject/RenderSVGText.
1841         * rendering/RenderSVGHiddenContainer.cpp: Remove absoluteRects() - RenderSVGModelObject already has it.
1842         * rendering/RenderSVGHiddenContainer.h: Ditto.
1843         * rendering/RenderSVGImage.cpp: 
1844         (WebCore::RenderSVGImage::absoluteRects): ASSERT_NOT_REACHED() here.
1845         (WebCore::RenderSVGImage::absoluteQuads): Don't use absoluteClippedOverlowRect() but localToAbsoluteQuad(repaintRectInLocalCoordinates()).
1846         * rendering/RenderSVGImage.h:
1847         (WebCore::RenderSVGImage::objectBoundingBox): Inlined
1848         * rendering/RenderSVGInline.cpp: 
1849         (WebCore::RenderSVGInline::absoluteQuads): Take RenderSVGText translation into account, allows inspecting <tspan>/<tref> etc.
1850         * rendering/RenderSVGInline.h:
1851         * rendering/RenderSVGModelObject.cpp: 
1852         (WebCore::RenderSVGModelObject::absoluteRects): ASSERT_NOT_REACHED() here.
1853         (WebCore::RenderSVGModelObject::absoluteQuads): Don't use absoluteClippedOverlowRect() but localToAbsoluteQuad(repaintRectInLocalCoordinates()).
1854         * rendering/RenderSVGModelObject.h:
1855         * rendering/RenderSVGRoot.cpp: Fix typo in license s/aint/along. Need to touch this file in order to let Mac build.
1856         * rendering/RenderSVGText.cpp:
1857         (WebCore::RenderSVGText::mapLocalToContainer): Remove hack, which moved the transformState by x()/y(). Not needed anymore.
1858         (WebCore::RenderSVGText::absoluteQuads): Proper implementation, respecting x/y translation.
1859         * rendering/RenderSVGText.h: Reorder some functions. 
1860         * rendering/SVGRenderSupport.h: Removed last virtual function strokeBoundingBox().
1861
1862 2010-06-24  Kent Tamura  <tkent@chromium.org>
1863
1864         Unreviewed. Build fix for Tiger.
1865
1866         * platform/mac/ThemeMac.mm:
1867         (WebCore::setControlSize):
1868
1869 2010-06-24  Kent Tamura  <tkent@chromium.org>
1870
1871         Unreviewed. Build fix for Tiger.
1872
1873         * platform/mac/ThemeMac.mm:
1874         (WebCore::setControlSize):
1875         (WebCore::ThemeMac::inflateControlPaintRect):
1876
1877 2010-06-24  Kent Tamura  <tkent@chromium.org>
1878
1879         Unreviewed.  Build fix for Chromium Mac.
1880
1881         * html/HTMLInputElement.cpp:
1882         (WebCore::HTMLInputElement::isSpeechEnabled):
1883
1884 2010-06-24  Simon Hausmann  <simon.hausmann@nokia.com>
1885
1886         Unreviewed Symbian build fix.
1887
1888         The QML WebKit integration needs to be part of QtWebKit.sis
1889
1890         * WebCore.pro: Deploy qmlwebkitplugin.dll.
1891
1892 2010-06-24  Satish Sampath  <satish@chromium.org>
1893
1894         Reviewed by Kent Tamura.
1895
1896         Add a speech button to input elements, no rendering or actions yet.
1897
1898         Speech Input: Add a speech button to text input element (no rendering or actions yet)
1899         https://bugs.webkit.org/show_bug.cgi?id=40925
1900
1901         No new tests. Will create a layout test in a subsequent patch.
1902
1903         * css/CSSPrimitiveValueMappings.h:
1904         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1905         * css/CSSSelector.cpp:
1906         (WebCore::CSSSelector::pseudoId):
1907         (WebCore::nameToPseudoTypeMap):
1908         (WebCore::CSSSelector::extractPseudoType):
1909         * css/CSSSelector.h:
1910         (WebCore::CSSSelector::):
1911         * css/CSSValueKeywords.in:
1912         * css/html.css:
1913         (input::-webkit-input-speech-button):
1914         * dom/InputElement.h:
1915         * html/HTMLAttributeNames.in:
1916         * html/HTMLInputElement.cpp:
1917         (WebCore::HTMLInputElement::isSpeechEnabled):
1918         * html/HTMLInputElement.h:
1919         * platform/ThemeTypes.h:
1920         (WebCore::):
1921         * rendering/RenderTextControlSingleLine.cpp:
1922         (WebCore::RenderTextControlSingleLine::nodeAtPoint):
1923         (WebCore::RenderTextControlSingleLine::forwardEvent):
1924         (WebCore::RenderTextControlSingleLine::styleDidChange):
1925         (WebCore::RenderTextControlSingleLine::hasControlClip):
1926         (WebCore::RenderTextControlSingleLine::controlClipRect):
1927         (WebCore::RenderTextControlSingleLine::textBlockWidth):
1928         (WebCore::RenderTextControlSingleLine::preferredContentWidth):
1929         (WebCore::RenderTextControlSingleLine::adjustControlHeightBasedOnLineHeight):
1930         (WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded):
1931         (WebCore::RenderTextControlSingleLine::createSpeechButtonStyle):
1932         (WebCore::RenderTextControlSingleLine::clientPaddingRight):
1933         * rendering/RenderTextControlSingleLine.h:
1934         * rendering/RenderTheme.cpp:
1935         (WebCore::RenderTheme::adjustStyle):
1936         (WebCore::RenderTheme::paint):
1937         (WebCore::RenderTheme::paintBorderOnly):
1938         (WebCore::RenderTheme::paintDecorations):
1939         * rendering/TextControlInnerElements.cpp:
1940         (WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement):
1941         (WebCore::InputFieldSpeechButtonElement::create):
1942         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
1943         * rendering/TextControlInnerElements.h:
1944         * rendering/style/RenderStyleConstants.h:
1945         (WebCore::):
1946
1947 2010-06-24  Kent Tamura  <tkent@chromium.org>
1948
1949         Reviewed by Adam Barth.
1950
1951         [Mac] The upper button of <input type=number> has no visual effect on click
1952         https://bugs.webkit.org/show_bug.cgi?id=38380
1953
1954         Because we have no ways to draw an NSStepperCell with its up button
1955         highlighted, use HIThemeDrawButton() instead.
1956
1957         Test: platform/mac/fast/forms/input-appearance-spinbutton-up.html
1958
1959         * platform/mac/ThemeMac.mm:
1960         (WebCore::controlSizeFromPixelSize):
1961           New function. Made from a part of setControlSize().
1962         (WebCore::setControlSize):
1963         (WebCore::convertControlStatesToThemeDrawState):
1964         (WebCore::paintStepper): Use HITheme API instead of NSStepperCell.
1965         (WebCore::ThemeMac::inflateControlPaintRect):
1966           Use controlSizeFromPixelSize().
1967
1968 2010-06-24  Yury Semikhatsky  <yurys@chromium.org>
1969
1970         Reviewed by Pavel Feldman.
1971
1972         Web Inspector: implement layout tests for debugger
1973         https://bugs.webkit.org/show_bug.cgi?id=40774
1974
1975         Test: inspector/debugger-pause-on-debugger-statement.html
1976
1977         * bindings/js/ScriptDebugServer.cpp: remove unused obsolete code that deals with global listeners.
1978         (WebCore::ScriptDebugServer::ScriptDebugServer):
1979         (WebCore::ScriptDebugServer::removeListener):
1980         (WebCore::ScriptDebugServer::dispatchFunctionToListeners):
1981         (WebCore::ScriptDebugServer::pauseIfNeeded):
1982         (WebCore::ScriptDebugServer::didAddListener):
1983         (WebCore::ScriptDebugServer::didRemoveListener):
1984         * bindings/js/ScriptDebugServer.h:
1985         * platform/mac/EventLoopMac.mm:
1986         (WebCore::EventLoop::cycle): wait at most 10ms for new event, otherwise layout tests would
1987         hang because in their case there may be no events ever.
1988
1989 2010-06-24  Andrey Kosyakov  <caseq@chromium.org>
1990
1991         Reviewed by Yury Semikhatsky.
1992
1993         Fixed evaluation & logging of null values in console.
1994         Changed handling of null and undefined in ScriptValue::toString()
1995         to match JSC bindings (i.e. "null" and "undefined" instead of "").
1996         https://bugs.webkit.org/show_bug.cgi?id=40980
1997
1998         * bindings/v8/ScriptValue.cpp:
1999         (WebCore::ScriptValue::toString):
2000         * inspector/front-end/InjectedScript.js:
2001         (injectedScriptConstructor):
2002
2003 2010-06-24  Yury Semikhatsky  <yurys@chromium.org>
2004
2005         Reviewed by Pavel Feldman.
2006
2007         Web Inspector: live edit doesn't work when resource tracking is off
2008         https://bugs.webkit.org/show_bug.cgi?id=41076
2009
2010         * inspector/front-end/ScriptView.js:
2011         (WebInspector.ScriptView.prototype._sourceIDForLine): implement this method for ScriptView,
2012         it's needed for editLine to work.
2013
2014 2010-06-23  Adam Barth  <abarth@webkit.org>
2015
2016         Reviewed by Eric Seidel.
2017
2018         Sketch out InitialMode of HTML5 tree builder
2019         https://bugs.webkit.org/show_bug.cgi?id=41126
2020
2021         Transliterated from the spec.  Currently doesn't do anything.  Mostly
2022         an experiment to see where this goes.
2023
2024         * html/HTMLTreeBuilder.cpp:
2025         (WebCore::HTMLTreeBuilder::processToken):
2026         (WebCore::HTMLTreeBuilder::insertDoctype):
2027         (WebCore::HTMLTreeBuilder::insertComment):
2028         * html/HTMLTreeBuilder.h:
2029
2030 2010-06-23  Adam Barth  <abarth@webkit.org>
2031
2032         Reviewed by Eric Seidel.
2033
2034         Add all the HTML5 tree builder insertion modes
2035         https://bugs.webkit.org/show_bug.cgi?id=41124
2036
2037         These are just copied verbatim from the spec.  No tests because these
2038         don't do anything yet.
2039
2040         * html/HTMLTreeBuilder.cpp:
2041         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
2042         (WebCore::HTMLTreeBuilder::passTokenToLegacyParser):
2043         * html/HTMLTreeBuilder.h:
2044         (WebCore::HTMLTreeBuilder::):
2045
2046 2010-06-23  Eric Seidel  <eric@webkit.org>
2047
2048         Unreviewed.  Fix namespace indent.  Just whitespace changes.
2049
2050         * dom/DocumentParser.h:
2051         (WebCore::DocumentParser::~DocumentParser):
2052         (WebCore::DocumentParser::isExecutingScript):
2053         (WebCore::DocumentParser::stopParsing):
2054         (WebCore::DocumentParser::processingData):
2055         (WebCore::DocumentParser::wantsRawData):
2056         (WebCore::DocumentParser::writeRawData):
2057         (WebCore::DocumentParser::wellFormed):
2058         (WebCore::DocumentParser::lineNumber):
2059         (WebCore::DocumentParser::columnNumber):
2060         (WebCore::DocumentParser::executeScriptsWaitingForStylesheets):
2061         (WebCore::DocumentParser::htmlTreeBuilder):
2062         (WebCore::DocumentParser::asHTMLDocumentParser):
2063         (WebCore::DocumentParser::inViewSourceMode):
2064         (WebCore::DocumentParser::setInViewSourceMode):
2065         (WebCore::DocumentParser::document):
2066         (WebCore::DocumentParser::xssAuditor):
2067         (WebCore::DocumentParser::setXSSAuditor):
2068         (WebCore::DocumentParser::DocumentParser):
2069
2070 2010-06-23  Eric Seidel  <eric@webkit.org>
2071
2072         Unreviewed.  Speculative build fix for Qt.
2073
2074         Move Document* down onto DocumentParser, since every DocumentParser needs one.
2075         https://bugs.webkit.org/show_bug.cgi?id=41117
2076
2077         XMLDocumentParserQt is a huge pile of donkey barf.
2078         I can't believe I ever r+'d the creation of this pile of
2079         copy/paste code.
2080
2081         I clearly missed removing m_doc from this code as well and thus
2082         broke Qt.
2083
2084         We really need to fix both XMLDocumentParserLibxml2 and
2085         XMLDocumentParserQt not to be so poorly abstracted so
2086         that if we're going to have two of them they can at least
2087         share some code.
2088
2089         * dom/XMLDocumentParserQt.cpp:
2090         (WebCore::XMLDocumentParser::XMLDocumentParser):
2091         (WebCore::XMLDocumentParser::~XMLDocumentParser):
2092         (WebCore::XMLDocumentParser::doWrite):
2093         (WebCore::XMLDocumentParser::doEnd):
2094         (WebCore::XMLDocumentParser::parse):
2095         (WebCore::XMLDocumentParser::startDocument):
2096         (WebCore::XMLDocumentParser::parseStartElement):
2097         (WebCore::XMLDocumentParser::parseEndElement):
2098         (WebCore::XMLDocumentParser::parseProcessingInstruction):
2099         (WebCore::XMLDocumentParser::parseCdata):
2100         (WebCore::XMLDocumentParser::parseComment):
2101         (WebCore::XMLDocumentParser::parseDtd):
2102
2103 2010-06-23  Eric Seidel  <eric@webkit.org>
2104
2105         Reviewed by Adam Barth.
2106
2107         Move Document* down onto DocumentParser, since every DocumentParser needs one.
2108         https://bugs.webkit.org/show_bug.cgi?id=41117
2109
2110         This eliminated the need for document() on HTMLDocumentParser.
2111         This paves the way for more code sharing between various
2112         DocumentParser subclasses.
2113
2114         * dom/DocumentParser.h:
2115         (WebCore::DocumentParser::inViewSourceMode):
2116         (WebCore::DocumentParser::setInViewSourceMode):
2117         (WebCore::DocumentParser::document):
2118         (WebCore::DocumentParser::DocumentParser):
2119         * dom/XMLDocumentParser.cpp:
2120         (WebCore::XMLDocumentParser::isWMLDocument):
2121         (WebCore::XMLDocumentParser::pushCurrentNode):
2122         (WebCore::XMLDocumentParser::popCurrentNode):
2123         (WebCore::XMLDocumentParser::clearCurrentNodeStack):
2124         (WebCore::XMLDocumentParser::enterText):
2125         (WebCore::XMLDocumentParser::end):
2126         (WebCore::XMLDocumentParser::insertErrorMessageBlock):
2127         * dom/XMLDocumentParser.h:
2128         * dom/XMLDocumentParserLibxml2.cpp:
2129         (WebCore::XMLDocumentParser::XMLDocumentParser):
2130         (WebCore::XMLDocumentParser::~XMLDocumentParser):
2131         (WebCore::XMLDocumentParser::doWrite):
2132         (WebCore::XMLDocumentParser::startElementNs):
2133         (WebCore::XMLDocumentParser::endElementNs):
2134         (WebCore::XMLDocumentParser::processingInstruction):
2135         (WebCore::XMLDocumentParser::cdataBlock):
2136         (WebCore::XMLDocumentParser::comment):
2137         (WebCore::XMLDocumentParser::startDocument):
2138         (WebCore::XMLDocumentParser::internalSubset):
2139         (WebCore::XMLDocumentParser::initializeParserContext):
2140         (WebCore::XMLDocumentParser::doEnd):
2141         * html/HTMLDocumentParser.cpp:
2142         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
2143         * html/HTMLDocumentParser.h:
2144         * html/LegacyHTMLDocumentParser.cpp:
2145         (WebCore::LegacyHTMLDocumentParser::LegacyHTMLDocumentParser):
2146         (WebCore::LegacyHTMLDocumentParser::begin):
2147         (WebCore::LegacyHTMLDocumentParser::scriptHandler):
2148         (WebCore::LegacyHTMLDocumentParser::scriptExecution):
2149         (WebCore::LegacyHTMLDocumentParser::parseTag):
2150         (WebCore::LegacyHTMLDocumentParser::continueProcessing):
2151         (WebCore::LegacyHTMLDocumentParser::willWriteHTML):
2152         (WebCore::LegacyHTMLDocumentParser::didWriteHTML):
2153         (WebCore::LegacyHTMLDocumentParser::write):
2154         (WebCore::LegacyHTMLDocumentParser::stopParsing):
2155         (WebCore::LegacyHTMLDocumentParser::timerFired):
2156         (WebCore::LegacyHTMLDocumentParser::end):
2157         (WebCore::LegacyHTMLDocumentParser::processToken):
2158         (WebCore::LegacyHTMLDocumentParser::processDoctypeToken):
2159         (WebCore::LegacyHTMLDocumentParser::executeScriptsWaitingForStylesheets):
2160         (WebCore::LegacyHTMLDocumentParser::executeExternalScriptsIfReady):
2161         (WebCore::LegacyHTMLDocumentParser::executeExternalScriptsTimerFired):
2162         * html/LegacyHTMLDocumentParser.h:
2163         * loader/ImageDocument.cpp:
2164         (WebCore::ImageDocumentParser::ImageDocumentParser):
2165         (WebCore::ImageDocumentParser::imageDocument):
2166         (WebCore::ImageDocumentParser::write):
2167         (WebCore::ImageDocumentParser::writeRawData):
2168         (WebCore::ImageDocumentParser::finish):
2169         (WebCore::ImageDocumentParser::finishWasCalled):
2170         (WebCore::ImageDocumentParser::isWaitingForScripts):
2171         (WebCore::ImageDocument::createParser):
2172         * loader/MediaDocument.cpp:
2173         (WebCore::MediaDocumentParser::MediaDocumentParser):
2174         (WebCore::MediaDocumentParser::createDocumentStructure):
2175         (WebCore::MediaDocumentParser::finish):
2176         (WebCore::MediaDocumentParser::finishWasCalled):
2177         * loader/PluginDocument.cpp:
2178         (WebCore::PluginDocumentParser::PluginDocumentParser):
2179         (WebCore::PluginDocumentParser::createDocumentStructure):
2180         (WebCore::PluginDocumentParser::writeRawData):
2181         (WebCore::PluginDocumentParser::finish):
2182         (WebCore::PluginDocumentParser::finishWasCalled):
2183         * loader/SinkDocument.cpp:
2184         (WebCore::SinkDocumentParser::SinkDocumentParser):
2185         * loader/TextDocument.cpp:
2186         (WebCore::TextDocumentParser::TextDocumentParser):
2187         (WebCore::TextDocumentParser::write):
2188         (WebCore::TextDocumentParser::finish):
2189         (WebCore::TextDocumentParser::finishWasCalled):
2190
2191 2010-06-23  Eric Seidel  <eric@webkit.org>
2192
2193         Reviewed by Adam Barth.
2194
2195         Start to clean up DocumentParser interface
2196         https://bugs.webkit.org/show_bug.cgi?id=41114
2197
2198         The first of many cleanups needed to the DocumentParser
2199         interface.  Rename executingScript() to isExecutingScript()
2200         and make it return a bool instead of an int.  Also added a
2201         FIXME to XMLDocumentParser about implementing it and did
2202         some minor other cleanup to the XMLDocumentParser header.
2203
2204         No functional change, thus no tests.
2205
2206         * dom/Document.cpp:
2207         (WebCore::Document::open):
2208         * dom/DocumentParser.h:
2209         (WebCore::DocumentParser::isExecutingScript):
2210         * dom/XMLDocumentParser.h:
2211         (WebCore::XMLDocumentParser::wellFormed):
2212         * html/HTMLDocumentParser.cpp:
2213         (WebCore::HTMLDocumentParser::attemptToEnd):
2214         (WebCore::HTMLDocumentParser::endIfDelayed):
2215         (WebCore::HTMLDocumentParser::isExecutingScript):
2216         * html/HTMLDocumentParser.h:
2217         * html/LegacyHTMLDocumentParser.h:
2218         (WebCore::LegacyHTMLDocumentParser::isExecutingScript):
2219
2220 2010-06-22  Maciej Stachowiak  <mjs@apple.com>
2221
2222         Reviewed by Simon Fraser.
2223
2224         Implement IDL attribute for HTML5 hidden
2225         https://bugs.webkit.org/show_bug.cgi?id=41039
2226
2227         Test: fast/html/hidden-attr-dom.html
2228
2229         * html/HTMLElement.idl: Just add to the IDL file. [Reflect] takes
2230         care of the rest.
2231
2232 2010-06-23  Joanmarie Diggs  <joanmarie.diggs@gmail.com>
2233
2234         Reviewed by Chris Fleizach.
2235
2236         [Gtk] nameFromChildren is obsolete
2237         https://bugs.webkit.org/show_bug.cgi?id=36128
2238
2239         Look to the AtkText interface implemented by the objects in
2240         question.
2241
2242         Test: platform/gtk/accessibility/name-from-label.html
2243
2244         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
2245         (webkit_accessible_get_name):
2246         (webkit_accessible_table_get_column_description):
2247         (webkit_accessible_table_get_row_description):
2248
2249 2010-06-23  Kwang Yul Seo  <skyul@company100.net>
2250
2251         Reviewed by Kent Tamura.
2252
2253         [BREWMP] Port FileSystem
2254         https://bugs.webkit.org/show_bug.cgi?id=34323
2255
2256         Port FileSystem with IFileMgr interface.
2257
2258         * platform/FileSystem.h:
2259         * platform/brew/FileSystemBrew.cpp: Added.
2260         (WebCore::getFileSize):
2261         (WebCore::getFileModificationTime):
2262         (WebCore::fileExists):
2263         (WebCore::deleteFile):
2264         (WebCore::deleteEmptyDirectory):
2265         (WebCore::pathByAppendingComponent):
2266         (WebCore::fileSystemRepresentation):
2267         (WebCore::canonicalPath):
2268         (WebCore::makeAllDirectories):
2269         (WebCore::homeDirectoryPath):
2270         (WebCore::pathGetFileName):
2271         (WebCore::directoryName):
2272         (WebCore::openTemporaryFile):
2273         (WebCore::closeFile):
2274         (WebCore::writeToFile):
2275         (WebCore::unloadModule):
2276         (WebCore::listDirectory):
2277
2278 2010-06-23  Alexendar Pavlov  <apavlov@chromium.org>
2279
2280         Reviewed by David Hyatt.
2281
2282         Swap checks in Position::isCandidate so that the less expensive
2283         nodeIsUserSelectNode  (node && node->renderer() &&
2284         node->renderer()->style()->userSelect() == SELECT_NONE) came first.
2285
2286         (Was Web Inspector: Hangup when expanding elements with enormous
2287         text node content in Elements panel).
2288
2289         https://bugs.webkit.org/show_bug.cgi?id=35926
2290
2291         * dom/Position.cpp:
2292         (WebCore::Position::isCandidate):
2293         * dom/PositionIterator.cpp:
2294         (WebCore::PositionIterator::isCandidate):
2295
2296 2010-06-23  Kwang Yul Seo  <skyul@company100.net>
2297
2298         Reviewed by Kent Tamura.
2299
2300         [BREWMP] Add PopupMenu implementation
2301         https://bugs.webkit.org/show_bug.cgi?id=40226
2302
2303         Delegate PopupMenu handling to ChromeClientBrew.
2304
2305         * page/brew/ChromeClientBrew.h: Added.
2306         * platform/PopupMenu.h:
2307         * platform/brew/PopupMenuBrew.cpp: Added.
2308         (WebCore::PopupMenu::PopupMenu):
2309         (WebCore::PopupMenu::~PopupMenu):
2310         (WebCore::PopupMenu::show):
2311         (WebCore::PopupMenu::hide):
2312         (WebCore::PopupMenu::updateFromElement):
2313         (WebCore::PopupMenu::itemWritingDirectionIsNatural):
2314
2315 2010-06-23  Kenneth Russell  <kbr@google.com>
2316
2317         Reviewed by Dimitri Glazkov.
2318
2319         Implement format conversions in texImage2D and texSubImage2D taking HTML data
2320         https://bugs.webkit.org/show_bug.cgi?id=40319
2321
2322         Generalized code supporting premultiplication of alpha and
2323         vertical flip to pack texture data into requested format and type.
2324         Handled incoming image data of various formats, RGBA and BGRA in
2325         particular, both to reduce the number of temporary copies during
2326         texture upload and to support premultiplying alpha for the
2327         texImage2D and texSubImage2D entry points taking ArrayBufferView
2328         in a subsequent bug. Added test case exercising all combinations
2329         of format/type combinations, premultiplication of alpha, and
2330         Image/ImageData upload. (Incorporated pnglib.js under
2331         fast/canvas/webgl/resources/ to be able to generate Image elements
2332         programmatically.) Tested in Safari on Mac OS X and in Chromium on
2333         Mac OS X, Windows and Linux.
2334
2335         Test: fast/canvas/webgl/tex-image-with-format-and-type.html
2336
2337         * html/canvas/WebGLRenderingContext.cpp:
2338         (WebCore::WebGLRenderingContext::readPixels):
2339         (WebCore::WebGLRenderingContext::texImage2DImpl):
2340         (WebCore::WebGLRenderingContext::texImage2D):
2341         (WebCore::WebGLRenderingContext::texSubImage2DImpl):
2342         (WebCore::WebGLRenderingContext::texSubImage2D):
2343         (WebCore::WebGLRenderingContext::validateTexFuncFormatAndType):
2344         (WebCore::WebGLRenderingContext::validateTexFuncParameters):
2345         * platform/graphics/GraphicsContext3D.cpp:
2346         (WebCore::GraphicsContext3D::computeFormatAndTypeParameters):
2347         (WebCore::GraphicsContext3D::extractImageData):
2348         (WebCore::GraphicsContext3D::flipVertically):
2349         (WebCore::doUnpackingAndPacking):
2350         (WebCore::doPacking):
2351         (WebCore::GraphicsContext3D::packPixels):
2352         * platform/graphics/GraphicsContext3D.h:
2353         (WebCore::GraphicsContext3D::):
2354         * platform/graphics/cg/GraphicsContext3DCG.cpp:
2355         (WebCore::GraphicsContext3D::getImageData):
2356         * platform/graphics/mac/GraphicsContext3DMac.mm:
2357         (WebCore::narrowInternalFormat):
2358         (WebCore::GraphicsContext3D::texImage2D):
2359         * platform/graphics/qt/GraphicsContext3DQt.cpp:
2360         (WebCore::GraphicsContext3D::getImageData):
2361         * platform/graphics/skia/GraphicsContext3DSkia.cpp:
2362         (WebCore::GraphicsContext3D::getImageData):
2363
2364 2010-06-23  Stephen White  <senorblanco@chromium.org>
2365
2366         Unreviewed; correcting bad patch.
2367
2368         In my haste to land r61710, I mistakenly landed the wrong version, in
2369         which a chunk of code was moved.  This patch moves that chunk of code
2370         to where it was in the patch that was reviewed.  Mea culpa.
2371
2372         * rendering/RenderBoxModelObject.cpp:
2373         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
2374
2375 2010-06-23  Stephen White  <senorblanco@chromium.org>
2376
2377         Reviewed by David Hyatt.
2378
2379         This is a tweak to the resize algorithm introduced in r61341, and
2380         is a fix for the regression described in
2381         https://bugs.webkit.org/show_bug.cgi?id=41036
2382
2383         The goal is to bring back the some of old behaviour, without regressing
2384         too much of the performance gains in r61341.
2385
2386         The old algorithm was:
2387         - on first resize, draw in high quality and record the paint time
2388         - if we've already drawn at this size, use the same quality as last time
2389         - on subsequent resizes, if the resize occurs within X ms of the
2390           previous one, draw at low quality and set a timer (one timer per
2391           image).
2392         - when each timer expires, draw that image at high quality
2393
2394         The r61341 algorithm was:  
2395         - on first resize, draw the image in low quality, add it to a list of
2396           resized images, and set a timer (one timer for all images)
2397         - when the timer expires, redraw all resized images in high quality
2398
2399         The new algorithm is:
2400         - on first resize, if no other animated resizes are outstanding, draw in
2401           high quality and set the timer (one timer for all images)
2402         - if any images have been resized to two different sizes in the last
2403           X ms, draw all resized images in low quality and kick the timer
2404           forward
2405         - when the timer expires, if any animated resizes occured, redraw all
2406           resized images in high quality, and reset the flag
2407
2408         This should cause GUIMark and the IE9 demos to have good performance 
2409         after the first frame, while other pages with only static resizes
2410         should be unaffected.
2411
2412         * rendering/RenderBoxModelObject.cpp:
2413         Change the LastPaintTimeMap to a LastPaintSizeMap:  we now record the
2414         last size an image was resized to, rather than the time it was painted
2415         (the time actually became redundant in r61341 when I added the
2416         check for m_timer.isActive():  we only care if anything is resizing
2417         while the timer is active).
2418         (WebCore::ImageQualityController::ImageQualityController):
2419         Add an initializer for the m_animatedResizeIsActive flag.
2420         (WebCore::ImageQualityController::objectDestroyed):
2421         Reset the m_animatedResizeIsActive flag if this was the last object
2422         in the list.
2423         (WebCore::ImageQualityController::highQualityRepaintTimerFired):
2424         Only repaint all the images if there was an animated resize (otherwise,
2425         everything is already high quality).
2426         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
2427         Implement the above algorithm.
2428
2429 2010-06-23  Abhishek Arya  <inferno@chromium.org>
2430
2431         Reviewed by Kenneth Rohde Christiansen.
2432
2433         Bad cast after DOM mutation in RenderMenuList
2434         https://bugs.webkit.org/show_bug.cgi?id=40828
2435  
2436         Firing the onchange event on select which changes its size > 1 causes the select
2437         object to change from a menulist to a listbox. However, when propogating the events,
2438         we do a bad cast assuming the object will remain a menulist. Added proper checks to
2439         make sure we check the renderer after the onchange is fired and propogate the event
2440         based on correct object type.
2441
2442         Test: fast/events/select-onchange-crash.html
2443
2444         * dom/SelectElement.cpp:
2445         (WebCore::SelectElement::setSelectedIndex):
2446
2447 2010-06-23  Andy Estes  <aestes@apple.com>
2448
2449         Reviewed by Alexey Proskuryakov.
2450         
2451         <rdar://problem/8107855> Prevent a crash in WebCore when removing an
2452         object element with an invalid data URL in in a listener to its
2453         beforeload event.
2454         https://bugs.webkit.org/show_bug.cgi?id=41054
2455
2456         Tests: fast/dom/beforeload/remove-bad-object-in-beforeload-listener.html
2457
2458         * html/HTMLObjectElement.cpp:
2459         (WebCore::HTMLObjectElement::renderFallbackContent): Exit early if the
2460         object element is not in the document.
2461         * rendering/RenderEmbeddedObject.cpp:
2462         (WebCore::RenderEmbeddedObject::updateWidget): If RenderWidget::destroy()
2463         was called during processing of onbeforeload, do not proceed with loading
2464         the object.
2465
2466 2010-06-23  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
2467
2468         Reviewed by Xan Lopez.
2469
2470         [gtk] web fonts not loaded properly in scribd html5 reader
2471         https://bugs.webkit.org/show_bug.cgi?id=38758
2472
2473         Drop filling the pattern with default values, because this
2474         restricts the matching more than we want.
2475
2476         * platform/graphics/cairo/FontCacheCairo.cpp:
2477         (WebCore::FontCache::createFontPlatformData):
2478
2479 2010-06-23  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
2480
2481         Reviewed by Xan Lopez.
2482
2483         [gtk] web fonts not loaded properly in scribd html5 reader
2484         https://bugs.webkit.org/show_bug.cgi?id=38758
2485
2486         Also special-case `sans' amd `mono', which are aliases commonly
2487         used in GTK+ applications.
2488
2489         * platform/graphics/cairo/FontCacheCairo.cpp:
2490         (WebCore::isWellKnownFontName):
2491
2492 2010-06-23  Justin Schuh  <jschuh@chromium.org>
2493
2494         Unreviewed, rolling out r61695.
2495         http://trac.webkit.org/changeset/61695
2496         https://bugs.webkit.org/show_bug.cgi?id=40798
2497
2498         61695 broke all the Linux builds.
2499
2500         * platform/image-decoders/png/PNGImageDecoder.cpp:
2501         (WebCore::PNGImageDecoder::rowAvailable):
2502
2503 2010-06-23  Kevin Ollivier  <kevino@theolliviers.com>
2504
2505         Reviewed by Darin Adler.
2506
2507         Fix PluginViewNone.cpp compilation for ports that also compile PluginView.cpp
2508         https://bugs.webkit.org/show_bug.cgi?id=37939
2509
2510         * plugins/PluginViewNone.cpp:
2511         (WebCore::PluginView::handleFocusInEvent):
2512         (WebCore::PluginView::handleFocusOutEvent):
2513         (WebCore::PluginView::keepAlive):
2514         (WebCore::PluginView::privateBrowsingStateChanged):
2515         (WebCore::PluginView::setJavaScriptPaused):
2516
2517 2010-06-23  Cris Neckar  <cdn@chromium.org>
2518
2519         Reviewed by Darin Fisher.
2520
2521         [Chromium] Out of bounds write in WebCore::PNGImageDecoder::rowAvailable
2522         https://bugs.webkit.org/show_bug.cgi?id=40798
2523
2524         Catches error in row callback for libPNG when extra rows are returned.
2525
2526         Test: fast/images/png-extra-row-crash.html
2527
2528         * platform/image-decoders/png/PNGImageDecoder.cpp:
2529         (WebCore::PNGImageDecoder::rowAvailable):
2530
2531 2010-06-23  James Robinson  <jamesr@chromium.org>
2532
2533         Reviewed by Dan Bernstein.
2534
2535         Do not set needsLayout when the style attribute changes on an SVG element
2536         https://bugs.webkit.org/show_bug.cgi?id=40366
2537
2538         SVGSVGElement::svgAttributeChanged was incorrectly calling renderer()->setNeedsLayout(true)
2539         whenever the styleAttr changed on its element.  This could happen during layout in some
2540         circumstances due to lazy style attribute synchronization.  When it did, it could cause the
2541         layout flags to become inconsistent.  See the test case for details.
2542
2543         Changes to an element's style attribute always mark an element as needing layout anyway so
2544         this call was redundant.
2545
2546         Test: fast/repaint/svg-layout-root-style-attr-update.html
2547
2548         * svg/SVGStyledElement.cpp:
2549         (WebCore::SVGStyledElement::isKnownAttribute):
2550
2551 2010-06-23  Simon Fraser  <simon.fraser@apple.com>
2552
2553         Reviewed by Dan Bernstein.
2554
2555         r61215 broke Acid3
2556         https://bugs.webkit.org/show_bug.cgi?id=41034
2557         
2558         The code added in r61215, which tests whether the root renderer will fill
2559         the entire viewport, should not run for subframes. So bail from
2560         RenderView::paintBoxDecorations() if document()->ownerElement() is not null.
2561         The old code was trying to do this by checking 'elt', but that ends up as 
2562         null after the for loop above.
2563         
2564         We can also bail early if the is no FrameView().
2565
2566         Test: fast/frames/paint-iframe-background.html
2567
2568         * rendering/RenderView.cpp:
2569         (WebCore::RenderView::paintBoxDecorations):
2570
2571 2010-06-23  Pavel Feldman  <pfeldman@chromium.org>
2572
2573         Reviewed by Yury Semikhatsky.
2574
2575         Web Inspector: do not reset profiles panel on navigation.
2576
2577         https://bugs.webkit.org/show_bug.cgi?id=41068
2578
2579         * inspector/InspectorController.cpp:
2580         (WebCore::InspectorController::didCommitLoad):
2581         * inspector/InspectorFrontend.cpp:
2582         (WebCore::InspectorFrontend::resetProfilesPanel):
2583         * inspector/InspectorFrontend.h:
2584         * inspector/front-end/ProfilesPanel.js:
2585         (WebInspector.ProfilesPanel):
2586         (WebInspector.ProfilesPanel.prototype.populateInterface):
2587         (WebInspector.ProfilesPanel.prototype.profilerWasDisabled):
2588         (WebInspector.ProfilesPanel.prototype._reset):
2589         (WebInspector.ProfilesPanel.prototype._clearProfiles):
2590         * inspector/front-end/inspector.js:
2591         (WebInspector.resetProfilesPanel):
2592
2593 2010-06-23  Yury Semikhatsky  <yurys@chromium.org>
2594
2595         Reviewed by Pavel Feldman.
2596
2597         Web Inspector: InspectorController should be added only once as ScriptDebugListener to
2598         ScriptDebugServer.
2599         https://bugs.webkit.org/show_bug.cgi?id=41070
2600
2601         * inspector/InspectorController.cpp:
2602         (WebCore::InspectorController::connectFrontend):
2603         (WebCore::InspectorController::disconnectFrontend):
2604         (WebCore::InspectorController::enableDebuggerFromFrontend):
2605         * inspector/front-end/ScriptsPanel.js:
2606         (WebInspector.ScriptsPanel): don't call InspectorBackend.enableDebugger if debugger is always enabled,
2607         InspectorController will do this on its side when the front end is connected.
2608
2609 2010-06-23  Pavel Podivilov  <podivilov@chromium.org>
2610
2611         Reviewed by Yury Semikhatsky.
2612
2613         Clear breakpoints before restoring them, not after.
2614         https://bugs.webkit.org/show_bug.cgi?id=41071
2615
2616         * inspector/InspectorController.cpp:
2617         (WebCore::InspectorController::enableDebuggerFromFrontend):
2618
2619 2010-06-23  Benjamin Poulain  <benjamin.poulain@nokia.com>
2620
2621         Reviewed by Kenneth Rohde Christiansen.
2622
2623         Do not render the full frame when there is some elements with fixed positioning
2624         https://bugs.webkit.org/show_bug.cgi?id=33150
2625
2626         Do not render the full frame when there is some elements with fixed positioning
2627         https://bugs.webkit.org/show_bug.cgi?id=33150
2628
2629         The frame view take into acount the list of fixed object when scrolling
2630         the view. If the number of object is lower than a certain threshold, the pixel
2631         are blitted, and the invalidated area updated.
2632
2633         * page/FrameView.cpp:
2634         (WebCore::FrameView::addFixedObject):
2635         (WebCore::FrameView::removeFixedObject):
2636         (WebCore::FrameView::scrollContentsFastPath):
2637         * page/FrameView.h:
2638         * platform/ScrollView.cpp:
2639         (WebCore::ScrollView::scrollContents):
2640         (WebCore::ScrollView::scrollContentsFastPath):
2641         * platform/ScrollView.h:
2642         * rendering/RenderLayer.cpp:
2643         (WebCore::RenderLayer::repaintRectIncludingDescendants):
2644         * rendering/RenderLayer.h:
2645         * rendering/RenderObject.cpp:
2646         (WebCore::RenderObject::styleWillChange):
2647
2648 2010-06-23  Mikhail Naganov  <mnaganov@chromium.org>
2649
2650         Reviewed by Pavel Feldman.
2651
2652         Web Inspector: Fix displaying of several CPU profiles with the same name.
2653
2654         https://bugs.webkit.org/show_bug.cgi?id=40992
2655
2656         * inspector/front-end/ProfilesPanel.js:
2657         (WebInspector.ProfileGroupSidebarTreeElement.prototype.onselect):
2658
2659 2010-06-23  Adam Barth  <abarth@webkit.org>
2660
2661         Unreviewed.  clean-header-guards that were made dirty by recent
2662         renames.
2663
2664         * html/HTMLDocumentParser.h:
2665         * html/HTMLPreloadScanner.h:
2666         * html/HTMLTokenizer.h:
2667         * html/HTMLTreeBuilder.h:
2668         * html/LegacyHTMLDocumentParser.h:
2669         * html/LegacyHTMLTreeBuilder.h:
2670         * html/LegacyPreloadScanner.h:
2671
2672 2010-06-23  Adam Barth  <abarth@webkit.org>
2673
2674         Reviewed by Eric Seidel.
2675
2676         Rename LegacyHTMLTreeConstructor to LegacyHTMLTreeBuilder
2677         https://bugs.webkit.org/show_bug.cgi?id=41053
2678
2679         There was some debate about whether to call this class (and the
2680         non-legacy version) "tree builder" or "tree constructor".  Maciej
2681         pointed out that other implementations (including Mozilla and HTML5Lib)
2682         call it a tree builder.  The path of least resistance seems to be call
2683         it that for now.
2684
2685         * Android.mk:
2686         * CMakeLists.txt:
2687         * GNUmakefile.am:
2688         * WebCore.gypi:
2689         * WebCore.pro:
2690         * WebCore.vcproj/WebCore.vcproj:
2691         * WebCore.xcodeproj/project.pbxproj:
2692         * dom/Document.cpp:
2693         * dom/DocumentParser.h:
2694         (WebCore::DocumentParser::htmlTreeConstructor):
2695         * html/HTMLDocumentParser.cpp:
2696         (WebCore::HTMLDocumentParser::htmlTreeConstructor):
2697         * html/HTMLDocumentParser.h:
2698         * html/HTMLFormControlElement.cpp:
2699         (WebCore::HTMLFormControlElement::removedFromTree):
2700         * html/HTMLInputElement.cpp:
2701         * html/HTMLMeterElement.cpp:
2702         * html/HTMLProgressElement.cpp:
2703         * html/HTMLTreeBuilder.cpp:
2704         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
2705         * html/HTMLTreeBuilder.h:
2706         (WebCore::HTMLTreeBuilder::legacyTreeConstructor):
2707         * html/LegacyHTMLDocumentParser.cpp:
2708         (WebCore::LegacyHTMLDocumentParser::LegacyHTMLDocumentParser):
2709         * html/LegacyHTMLDocumentParser.h:
2710         (WebCore::LegacyHTMLDocumentParser::htmlTreeConstructor):
2711         * html/LegacyHTMLTreeBuilder.cpp: Copied from WebCore/html/LegacyHTMLTreeConstructor.cpp.
2712         (WebCore::LegacyHTMLTreeBuilder::LegacyHTMLTreeBuilder):
2713         (WebCore::LegacyHTMLTreeBuilder::~LegacyHTMLTreeBuilder):
2714         (WebCore::LegacyHTMLTreeBuilder::reset):
2715         (WebCore::LegacyHTMLTreeBuilder::setCurrent):
2716         (WebCore::LegacyHTMLTreeBuilder::limitDepth):
2717         (WebCore::LegacyHTMLTreeBuilder::insertNodeAfterLimitDepth):
2718         (WebCore::LegacyHTMLTreeBuilder::parseToken):
2719         (WebCore::LegacyHTMLTreeBuilder::parseDoctypeToken):
2720         (WebCore::LegacyHTMLTreeBuilder::insertNode):
2721         (WebCore::LegacyHTMLTreeBuilder::handleError):
2722         (WebCore::LegacyHTMLTreeBuilder::textCreateErrorCheck):
2723         (WebCore::LegacyHTMLTreeBuilder::commentCreateErrorCheck):
2724         (WebCore::LegacyHTMLTreeBuilder::headCreateErrorCheck):
2725         (WebCore::LegacyHTMLTreeBuilder::bodyCreateErrorCheck):
2726         (WebCore::LegacyHTMLTreeBuilder::framesetCreateErrorCheck):
2727         (WebCore::LegacyHTMLTreeBuilder::formCreateErrorCheck):
2728         (WebCore::LegacyHTMLTreeBuilder::isindexCreateErrorCheck):
2729         (WebCore::LegacyHTMLTreeBuilder::selectCreateErrorCheck):
2730         (WebCore::LegacyHTMLTreeBuilder::ddCreateErrorCheck):
2731         (WebCore::LegacyHTMLTreeBuilder::dtCreateErrorCheck):
2732         (WebCore::LegacyHTMLTreeBuilder::rpCreateErrorCheck):
2733         (WebCore::LegacyHTMLTreeBuilder::rtCreateErrorCheck):
2734         (WebCore::LegacyHTMLTreeBuilder::nestedCreateErrorCheck):
2735         (WebCore::LegacyHTMLTreeBuilder::nestedPCloserCreateErrorCheck):
2736         (WebCore::LegacyHTMLTreeBuilder::nestedStyleCreateErrorCheck):
2737         (WebCore::LegacyHTMLTreeBuilder::tableCellCreateErrorCheck):
2738         (WebCore::LegacyHTMLTreeBuilder::tableSectionCreateErrorCheck):
2739         (WebCore::LegacyHTMLTreeBuilder::noembedCreateErrorCheck):
2740         (WebCore::LegacyHTMLTreeBuilder::noframesCreateErrorCheck):
2741         (WebCore::LegacyHTMLTreeBuilder::noscriptCreateErrorCheck):
2742         (WebCore::LegacyHTMLTreeBuilder::pCloserCreateErrorCheck):
2743         (WebCore::LegacyHTMLTreeBuilder::pCloserStrictCreateErrorCheck):
2744         (WebCore::LegacyHTMLTreeBuilder::mapCreateErrorCheck):
2745         (WebCore::LegacyHTMLTreeBuilder::getNode):
2746         (WebCore::LegacyHTMLTreeBuilder::allowNestedRedundantTag):
2747         (WebCore::LegacyHTMLTreeBuilder::processCloseTag):
2748         (WebCore::LegacyHTMLTreeBuilder::isHeadingTag):
2749         (WebCore::LegacyHTMLTreeBuilder::isInline):
2750         (WebCore::LegacyHTMLTreeBuilder::isResidualStyleTag):
2751         (WebCore::LegacyHTMLTreeBuilder::isAffectedByResidualStyle):
2752         (WebCore::LegacyHTMLTreeBuilder::handleResidualStyleCloseTagAcrossBlocks):
2753         (WebCore::LegacyHTMLTreeBuilder::reopenResidualStyleTags):
2754         (WebCore::LegacyHTMLTreeBuilder::pushBlock):
2755         (WebCore::LegacyHTMLTreeBuilder::popBlock):
2756         (WebCore::LegacyHTMLTreeBuilder::popOneBlockCommon):
2757         (WebCore::LegacyHTMLTreeBuilder::popOneBlock):
2758         (WebCore::LegacyHTMLTreeBuilder::moveOneBlockToStack):
2759         (WebCore::LegacyHTMLTreeBuilder::checkIfHasPElementInScope):
2760         (WebCore::LegacyHTMLTreeBuilder::popInlineBlocks):
2761         (WebCore::LegacyHTMLTreeBuilder::freeBlock):
2762         (WebCore::LegacyHTMLTreeBuilder::createHead):
2763         (WebCore::LegacyHTMLTreeBuilder::handleIsindex):
2764         (WebCore::LegacyHTMLTreeBuilder::startBody):
2765         (WebCore::LegacyHTMLTreeBuilder::finished):
2766         (WebCore::LegacyHTMLTreeBuilder::reportErrorToConsole):
2767         * html/LegacyHTMLTreeBuilder.h: Copied from WebCore/html/LegacyHTMLTreeConstructor.h.
2768         * html/LegacyHTMLTreeConstructor.cpp: Removed.
2769         * html/LegacyHTMLTreeConstructor.h: Removed.
2770         * html/StepRange.cpp:
2771         * html/ValidityState.cpp:
2772         * rendering/RenderSlider.cpp:
2773
2774 2010-06-23  Adam Barth  <abarth@webkit.org>
2775
2776         Reviewed by Eric Seidel.
2777
2778         Rename the preload scanners
2779         https://bugs.webkit.org/show_bug.cgi?id=41052
2780
2781         Renames PreloadScanner to LegacyPreloadScanner because this code is now
2782         off by default.  Also, rename HTML5PreloadScanner to
2783         HTMLPreloadScanner.  We're not calling it PreloadScanner because we've
2784         factored out the CSSPreloadScanner and the HTMLPreloadScanner from the
2785         original PreloadScanner.
2786
2787         * Android.mk:
2788         * CMakeLists.txt:
2789         * GNUmakefile.am:
2790         * WebCore.gypi:
2791         * WebCore.pro:
2792         * WebCore.vcproj/WebCore.vcproj:
2793         * WebCore.xcodeproj/project.pbxproj:
2794         * html/HTML5PreloadScanner.cpp: Removed.
2795         * html/HTML5PreloadScanner.h: Removed.
2796         * html/HTMLDocumentParser.cpp:
2797         (WebCore::HTMLDocumentParser::pumpTokenizer):
2798         * html/HTMLDocumentParser.h:
2799         * html/HTMLPreloadScanner.cpp: Copied from WebCore/html/HTML5PreloadScanner.cpp.
2800         (WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
2801         (WebCore::HTMLPreloadScanner::appendToEnd):
2802         (WebCore::HTMLPreloadScanner::scan):
2803         (WebCore::HTMLPreloadScanner::processToken):
2804         (WebCore::HTMLPreloadScanner::scanningBody):
2805         * html/HTMLPreloadScanner.h: Copied from WebCore/html/HTML5PreloadScanner.h.
2806         * html/LegacyHTMLDocumentParser.cpp:
2807         (WebCore::LegacyHTMLDocumentParser::scriptHandler):
2808         (WebCore::LegacyHTMLDocumentParser::scriptExecution):
2809         * html/LegacyHTMLDocumentParser.h:
2810         * html/LegacyPreloadScanner.cpp: Copied from WebCore/html/PreloadScanner.cpp.
2811         (WebCore::LegacyPreloadScanner::LegacyPreloadScanner):
2812         (WebCore::LegacyPreloadScanner::~LegacyPreloadScanner):
2813         (WebCore::LegacyPreloadScanner::begin):
2814         (WebCore::LegacyPreloadScanner::end):
2815         (WebCore::LegacyPreloadScanner::reset):
2816         (WebCore::LegacyPreloadScanner::scanningBody):
2817         (WebCore::LegacyPreloadScanner::write):
2818         (WebCore::LegacyPreloadScanner::clearLastCharacters):
2819         (WebCore::LegacyPreloadScanner::rememberCharacter):
2820         (WebCore::LegacyPreloadScanner::lastCharactersMatch):
2821         (WebCore::LegacyPreloadScanner::consumeEntity):
2822         (WebCore::LegacyPreloadScanner::tokenize):
2823         (WebCore::LegacyPreloadScanner::processAttribute):
2824         (WebCore::LegacyPreloadScanner::emitCharacter):
2825         (WebCore::LegacyPreloadScanner::tokenizeCSS):
2826         (WebCore::LegacyPreloadScanner::emitTag):
2827         (WebCore::LegacyPreloadScanner::emitCSSRule):
2828         * html/LegacyPreloadScanner.h: Copied from WebCore/html/PreloadScanner.h.
2829         * html/PreloadScanner.cpp: Removed.
2830         * html/PreloadScanner.h: Removed.
2831         * page/XSSAuditor.cpp:
2832         (WebCore::XSSAuditor::decodeHTMLEntities):
2833
2834 2010-06-23  Adam Barth  <abarth@webkit.org>
2835
2836         Reviewed by Eric Seidel.
2837
2838         Yet more HTML5 => HTML renames
2839         https://bugs.webkit.org/show_bug.cgi?id=41051
2840
2841         This patch renames HTML5DocumentParser to HTMLDocumentParser and
2842         HTML5TreeBuilder to HTMLTreeBuilder.  There was some discussion about
2843         whether to use the name HTMLTreeBuilder or HTMLTreeConstructor, but
2844         tree builder seems to be the dominate name in other implementations.
2845
2846         * Android.mk:
2847         * CMakeLists.txt:
2848         * GNUmakefile.am:
2849         * WebCore.gypi:
2850         * WebCore.pro:
2851         * WebCore.vcproj/WebCore.vcproj:
2852         * WebCore.xcodeproj/project.pbxproj:
2853         * dom/DocumentFragment.cpp:
2854         (WebCore::DocumentFragment::parseHTML):
2855         * html/HTML5DocumentParser.cpp: Removed.
2856         * html/HTML5DocumentParser.h: Removed.
2857         * html/HTML5PreloadScanner.cpp:
2858         (WebCore::HTML5PreloadScanner::scan):
2859         (WebCore::HTML5PreloadScanner::processToken):
2860         * html/HTML5TreeBuilder.cpp: Removed.
2861         * html/HTML5TreeBuilder.h: Removed.
2862         * html/HTMLDocument.cpp:
2863         (WebCore::HTMLDocument::createParser):
2864         * html/HTMLDocumentParser.cpp: Copied from WebCore/html/HTML5DocumentParser.cpp.
2865         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
2866         (WebCore::HTMLDocumentParser::~HTMLDocumentParser):
2867         (WebCore::HTMLDocumentParser::begin):
2868         (WebCore::HTMLDocumentParser::stopParsing):
2869         (WebCore::HTMLDocumentParser::processingData):
2870         (WebCore::HTMLDocumentParser::pumpTokenizerIfPossible):
2871         (WebCore::HTMLDocumentParser::isScheduledForResume):
2872         (WebCore::HTMLDocumentParser::resumeParsingAfterYield):
2873         (WebCore::HTMLDocumentParser::runScriptsForPausedTreeConstructor):
2874         (WebCore::HTMLDocumentParser::pumpTokenizer):
2875         (WebCore::HTMLDocumentParser::willPumpLexer):
2876         (WebCore::HTMLDocumentParser::didPumpLexer):
2877         (WebCore::HTMLDocumentParser::write):
2878         (WebCore::HTMLDocumentParser::end):
2879         (WebCore::HTMLDocumentParser::attemptToEnd):
2880         (WebCore::HTMLDocumentParser::endIfDelayed):
2881         (WebCore::HTMLDocumentParser::finish):
2882         (WebCore::HTMLDocumentParser::finishWasCalled):
2883         (WebCore::HTMLDocumentParser::executingScript):
2884         (WebCore::HTMLDocumentParser::inScriptExecution):
2885         (WebCore::HTMLDocumentParser::lineNumber):
2886         (WebCore::HTMLDocumentParser::columnNumber):
2887         (WebCore::HTMLDocumentParser::htmlTreeConstructor):
2888         (WebCore::HTMLDocumentParser::isWaitingForScripts):
2889         (WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution):
2890         (WebCore::HTMLDocumentParser::watchForLoad):
2891         (WebCore::HTMLDocumentParser::stopWatchingForLoad):
2892         (WebCore::HTMLDocumentParser::shouldLoadExternalScriptFromSrc):
2893         (WebCore::HTMLDocumentParser::notifyFinished):
2894         (WebCore::HTMLDocumentParser::executeScriptsWaitingForStylesheets):
2895         (WebCore::HTMLDocumentParser::script):
2896         * html/HTMLDocumentParser.h: Copied from WebCore/html/HTML5DocumentParser.h.
2897         * html/HTMLParserScheduler.cpp:
2898         (WebCore::HTMLParserScheduler::HTMLParserScheduler):
2899         * html/HTMLParserScheduler.h:
2900         * html/HTMLTreeBuilder.cpp: Copied from WebCore/html/HTML5TreeBuilder.cpp.
2901         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
2902         (WebCore::HTMLTreeBuilder::~HTMLTreeBuilder):
2903         (WebCore::HTMLTreeBuilder::handleScriptStartTag):
2904         (WebCore::HTMLTreeBuilder::handleScriptEndTag):
2905         (WebCore::HTMLTreeBuilder::takeScriptToProcess):
2906         (WebCore::HTMLTreeBuilder::adjustedLexerState):
2907         (WebCore::HTMLTreeBuilder::passTokenToLegacyParser):
2908         (WebCore::HTMLTreeBuilder::constructTreeFromToken):
2909         (WebCore::HTMLTreeBuilder::processToken):
2910         (WebCore::HTMLTreeBuilder::finished):
2911         (WebCore::HTMLTreeBuilder::isScriptingFlagEnabled):
2912         * html/HTMLTreeBuilder.h: Copied from WebCore/html/HTML5TreeBuilder.h.
2913
2914 2010-06-23  Adam Barth  <abarth@webkit.org>
2915
2916         Reviewed by Eric Seidel.
2917
2918         More HTML5 => HTML renames
2919         https://bugs.webkit.org/show_bug.cgi?id=41049
2920
2921         This patch renames HTML5ScriptRunner, HTML5ScriptRunnerHost, and
2922         HTML5Token to remove the "5" from their names.  These clases aren't
2923         specific to HTML5 and will be used going forward.
2924
2925         * Android.mk:
2926         * CMakeLists.txt:
2927         * GNUmakefile.am:
2928         * WebCore.gypi:
2929         * WebCore.pro:
2930         * WebCore.vcproj/WebCore.vcproj:
2931         * WebCore.xcodeproj/project.pbxproj:
2932         * html/CSSPreloadScanner.cpp:
2933         (WebCore::CSSPreloadScanner::scan):
2934         * html/CSSPreloadScanner.h:
2935         * html/HTML5DocumentParser.cpp:
2936         (WebCore::HTML5DocumentParser::HTML5DocumentParser):
2937         (WebCore::HTML5DocumentParser::notifyFinished):
2938         * html/HTML5DocumentParser.h:
2939         * html/HTML5PreloadScanner.cpp:
2940         (WebCore::HTMLNames::PreloadTask::PreloadTask):
2941         (WebCore::HTMLNames::PreloadTask::processAttributes):
2942         (WebCore::HTML5PreloadScanner::processToken):
2943         * html/HTML5PreloadScanner.h:
2944         * html/HTML5ScriptRunner.cpp: Removed.
2945         * html/HTML5ScriptRunner.h: Removed.
2946         * html/HTML5ScriptRunnerHost.h: Removed.
2947         * html/HTML5Token.h: Removed.
2948         * html/HTML5TreeBuilder.cpp:
2949         (WebCore::convertToOldStyle):
2950         (WebCore::HTML5TreeBuilder::handleScriptEndTag):
2951         (WebCore::HTML5TreeBuilder::passTokenToLegacyParser):
2952         (WebCore::HTML5TreeBuilder::constructTreeFromToken):
2953         (WebCore::HTML5TreeBuilder::processToken):
2954         * html/HTML5TreeBuilder.h:
2955         * html/HTMLScriptRunner.cpp: Copied from WebCore/html/HTML5ScriptRunner.cpp.
2956         (WebCore::HTMLScriptRunner::HTMLScriptRunner):
2957         (WebCore::HTMLScriptRunner::~HTMLScriptRunner):
2958         (WebCore::HTMLScriptRunner::sourceFromPendingScript):
2959         (WebCore::HTMLScriptRunner::isPendingScriptReady):
2960         (WebCore::HTMLScriptRunner::executePendingScript):
2961         (WebCore::HTMLScriptRunner::executeScript):
2962         (WebCore::HTMLScriptRunner::hasScriptsWaitingForLoad):
2963         (WebCore::HTMLScriptRunner::watchForLoad):
2964         (WebCore::HTMLScriptRunner::stopWatchingForLoad):
2965         (WebCore::HTMLScriptRunner::execute):
2966         (WebCore::HTMLScriptRunner::haveParsingBlockingScript):
2967         (WebCore::HTMLScriptRunner::executeParsingBlockingScripts):
2968         (WebCore::HTMLScriptRunner::executeScriptsWaitingForLoad):
2969         (WebCore::HTMLScriptRunner::executeScriptsWaitingForStylesheets):
2970         (WebCore::HTMLScriptRunner::requestScript):
2971         (WebCore::HTMLScriptRunner::runScript):
2972         * html/HTMLScriptRunner.h: Copied from WebCore/html/HTML5ScriptRunner.h.
2973         * html/HTMLScriptRunnerHost.h: Copied from WebCore/html/HTML5ScriptRunnerHost.h.
2974         (WebCore::HTMLScriptRunnerHost::~HTMLScriptRunnerHost):
2975         * html/HTMLToken.h: Copied from WebCore/html/HTML5Token.h.
2976         (WebCore::HTMLToken::HTMLToken):
2977         * html/HTMLTokenizer.cpp:
2978         (WebCore::HTMLTokenizer::nextToken):
2979         (WebCore::HTMLTokenizer::emitCharacter):
2980         (WebCore::HTMLTokenizer::emitCurrentToken):
2981         (WebCore::HTMLTokenizer::shouldEmitBufferedCharacterToken):
2982         * html/HTMLTokenizer.h:
2983
2984 2010-06-23  Adam Barth  <abarth@webkit.org>
2985
2986         Reviewed by Eric Seidel.
2987
2988         Rename HTML5EntityParser to HTMLEntityParser
2989         https://bugs.webkit.org/show_bug.cgi?id=41048
2990
2991         Mostly the result of do-webcore-rename, but I tweaked the header guard
2992         and the name of the free function.
2993
2994         * Android.mk:
2995         * CMakeLists.txt:
2996         * GNUmakefile.am:
2997         * WebCore.gypi:
2998         * WebCore.pro:
2999         * WebCore.vcproj/WebCore.vcproj:
3000         * WebCore.xcodeproj/project.pbxproj:
3001         * html/HTML5EntityParser.cpp: Removed.
3002         * html/HTML5EntityParser.h: Removed.
3003         * html/HTMLEntityParser.cpp: Copied from WebCore/html/HTML5EntityParser.cpp.
3004         (WebCore::consumeHTMLEntity):
3005         * html/HTMLEntityParser.h: Copied from WebCore/html/HTML5EntityParser.h.
3006         * html/HTMLTokenizer.cpp:
3007         (WebCore::HTMLTokenizer::processEntity):
3008         (WebCore::HTMLTokenizer::nextToken):
3009
3010 2010-06-22  Yuta Kitamura  <yutak@chromium.org>
3011
3012         Reviewed by Alexey Proskuryakov.
3013
3014         Add a new class that stores information about WebSocket handshake response.
3015
3016         In the future, instances of the new class will be passed to the Web Inspector
3017         so that it will be able to display information about WebSocket handshake
3018         response.
3019
3020         WebSocket: Add WebSocketHandshakeResponse
3021         https://bugs.webkit.org/show_bug.cgi?id=38728
3022
3023         Test: websocket/tests/handshake-fail-by-no-cr.html
3024
3025         * GNUmakefile.am:
3026         * WebCore.gypi:
3027         * WebCore.pro:
3028         * WebCore.vcproj/WebCore.vcproj:
3029         * WebCore.xcodeproj/project.pbxproj:
3030         * websockets/WebSocketHandshake.cpp:
3031         (WebCore::trimConsoleMessage):
3032         (WebCore::WebSocketHandshake::readServerHandshake):
3033         (WebCore::WebSocketHandshake::serverHandshakeResponse):
3034         (WebCore::WebSocketHandshake::readStatusLine): Moved from extractResponseCode.
3035         Add more error checks and make error messages more descriptive.
3036         (WebCore::WebSocketHandshake::readHTTPHeaders):
3037         (WebCore::WebSocketHandshake::processHeaders):
3038         * websockets/WebSocketHandshake.h:
3039         * websockets/WebSocketHandshakeResponse.cpp: Added.
3040         (WebCore::WebSocketHandshakeResponse::ChallengeResponse::ChallengeResponse):
3041         (WebCore::WebSocketHandshakeResponse::ChallengeResponse::set):
3042         (WebCore::WebSocketHandshakeResponse::WebSocketHandshakeResponse):
3043         (WebCore::WebSocketHandshakeResponse::~WebSocketHandshakeResponse):
3044         (WebCore::WebSocketHandshakeResponse::statusCode):
3045         (WebCore::WebSocketHandshakeResponse::setStatusCode):
3046         (WebCore::WebSocketHandshakeResponse::statusText):
3047         (WebCore::WebSocketHandshakeResponse::setStatusText):
3048         (WebCore::WebSocketHandshakeResponse::headerFields):
3049         (WebCore::WebSocketHandshakeResponse::addHeaderField):
3050         (WebCore::WebSocketHandshakeResponse::clearHeaderFields):
3051         (WebCore::WebSocketHandshakeResponse::challengeResponse):
3052         (WebCore::WebSocketHandshakeResponse::setChallengeResponse):
3053         * websockets/WebSocketHandshakeResponse.h: Added.
3054
3055 2010-06-23  Yuzo Fujishima  <yuzo@google.com>
3056
3057         Reviewed by Shinichiro Hamaji.
3058
3059         Implement page format data programming interface.
3060         The final goal is to implement CSS Paged Media Module Level 3 (http://dev.w3.org/csswg/css3-page/).
3061         To begin with, this change adds methods to know:
3062         - if page box is visible,
3063         - the page area rectangle, and
3064         - preferred page size.
3065
3066         https://bugs.webkit.org/show_bug.cgi?id=37538
3067
3068         Test: printing/page-format-data.html
3069
3070         * WebCore.base.exp:
3071         * css/CSSParser.cpp:
3072         (WebCore::CSSParser::parseSizeParameter):
3073         * css/CSSStyleSelector.cpp:
3074         (WebCore::CSSStyleSelector::applyProperty):
3075         (WebCore::CSSStyleSelector::applyPageSizeProperty):
3076         (WebCore::CSSStyleSelector::pageSizeFromName):
3077         (WebCore::CSSStyleSelector::mmLength):
3078         (WebCore::CSSStyleSelector::inchLength):
3079         * css/CSSStyleSelector.h:
3080         * css/html.css:
3081         (@page):
3082         * dom/Document.cpp:
3083         (WebCore::Document::isPageBoxVisible):
3084         (WebCore::Document::pageAreaRectInPixels):
3085         (WebCore::Document::preferredPageSizeInPixels):
3086         * dom/Document.h:
3087         * page/PrintContext.cpp:
3088         (WebCore::PrintContext::isPageBoxVisible):
3089         (WebCore::PrintContext::pageAreaRectInPixels):
3090         (WebCore::PrintContext::preferredPageSizeInPixels):
3091         * page/PrintContext.h:
3092         * rendering/style/RenderStyle.h:
3093         (WebCore::InheritedFlags::pageSize):
3094         (WebCore::InheritedFlags::setPageSize):
3095         * rendering/style/StyleRareNonInheritedData.h:
3096
3097 2010-06-23  Adam Barth  <abarth@webkit.org>
3098
3099         Reviewed by Eric Seidel.
3100
3101         Rename lexer and m_lexer to tokenizer and m_tokenizer, respectively
3102         https://bugs.webkit.org/show_bug.cgi?id=41046
3103
3104         This is a follow up to the recent HTML5Lexer => HTMLTokenizer rename.
3105
3106         * html/HTML5DocumentParser.cpp:
3107         (WebCore::HTML5DocumentParser::HTML5DocumentParser):
3108         (WebCore::HTML5DocumentParser::begin):
3109         (WebCore::HTML5DocumentParser::pumpLexer):
3110         (WebCore::HTML5DocumentParser::willPumpLexer):
3111         (WebCore::HTML5DocumentParser::didPumpLexer):
3112         (WebCore::HTML5DocumentParser::lineNumber):
3113         (WebCore::HTML5DocumentParser::columnNumber):
3114         * html/HTML5DocumentParser.h:
3115         * html/HTML5PreloadScanner.cpp:
3116         (WebCore::HTML5PreloadScanner::scan):
3117         (WebCore::HTML5PreloadScanner::processToken):
3118         * html/HTML5PreloadScanner.h:
3119         * html/HTML5TreeBuilder.cpp:
3120         (WebCore::HTML5TreeBuilder::HTML5TreeBuilder):
3121         (WebCore::HTML5TreeBuilder::handleScriptStartTag):
3122         (WebCore::HTML5TreeBuilder::passTokenToLegacyParser):
3123         * html/HTML5TreeBuilder.h:
3124         * html/HTMLTokenizer.h:
3125         * html/LegacyHTMLDocumentParser.h:
3126
3127 2010-06-23  Nikolas Zimmermann  <nzimmermann@rim.com>
3128
3129         Reviewed by Eric Seidel.
3130
3131         Reproducible crash in com.apple.WebCore 0x01ed3784 WebCore::RenderLineBoxList::appendLineBox(WebCore::InlineFlowBox*) + 36
3132         https://bugs.webkit.org/show_bug.cgi?id=40953
3133
3134         REGRESSION (r58209-58231): Memory corruption with invalid SVG
3135         https://bugs.webkit.org/show_bug.cgi?id=40173
3136
3137         Fix several crashes, all related to <foreignObject> and/or invalid SVG documents.
3138         - Only allow <svg> nodes, as direct children of a <foreignObject>, not any other "partial" SVG content.
3139         - Assure to create RenderSVGRoot objects for <svg> nodes in <foreignObject>, treat them as "outermost SVG elements".
3140         - Never allow any partial SVG content to appear in any document. Only <svg> elements are allowed.
3141
3142         Tests: svg/custom/bug45331.svg
3143                svg/foreignObject/disallowed-svg-nodes-as-direct-children.svg
3144                svg/foreignObject/no-crash-with-svg-content-in-html-document.svg
3145                svg/foreignObject/svg-document-as-direct-child.svg
3146                svg/foreignObject/svg-document-in-html-document.svg
3147                svg/foreignObject/text-tref-02-b.svg
3148
3149         * dom/Element.cpp: Added childShouldCreateRenderer, with ENABLE(SVG) guards.
3150         (WebCore::Element::childShouldCreateRenderer): Only create a renderer for a SVG child, if we're a SVG element, or if the child is a <svg> element.
3151         * dom/Element.h: Added childShouldCreateRenderer, with ENABLE(SVG) guards.
3152         * svg/SVGForeignObjectElement.cpp:
3153         (WebCore::SVGForeignObjectElement::childShouldCreateRenderer): Disallow arbitary SVG content, only <svg> elements are allowed as direct children of a <foreignObject>
3154         * svg/SVGSVGElement.cpp:
3155         (WebCore::SVGSVGElement::isOutermostSVG): Be sure to create RenderSVGRoot objects for <svg> elements inside <foreignObject>
3156
3157 2010-06-22  Adam Barth  <abarth@webkit.org>
3158
3159         Reviewed by Eric Seidel.
3160
3161         Rename HTML5Lexer to HTMLTokenizer
3162         https://bugs.webkit.org/show_bug.cgi?id=41045
3163
3164         This might be slightly confusing given that the old class was called
3165         HTMLTokenizer, but it matches the terminology in the HTML5 spec.
3166
3167         * Android.mk:
3168         * CMakeLists.txt:
3169         * GNUmakefile.am:
3170         * WebCore.gypi:
3171         * WebCore.pro:
3172         * WebCore.vcproj/WebCore.vcproj:
3173         * WebCore.xcodeproj/project.pbxproj:
3174         * html/HTML5DocumentParser.cpp:
3175         (WebCore::HTML5DocumentParser::HTML5DocumentParser):
3176         (WebCore::HTML5DocumentParser::pumpLexer):
3177         * html/HTML5DocumentParser.h:
3178         * html/HTML5Lexer.cpp: Removed.
3179         * html/HTML5Lexer.h: Removed.
3180         * html/HTML5PreloadScanner.cpp:
3181         (WebCore::HTML5PreloadScanner::processToken):
3182         * html/HTML5PreloadScanner.h:
3183         * html/HTML5TreeBuilder.cpp:
3184         (WebCore::HTML5TreeBuilder::HTML5TreeBuilder):
3185         (WebCore::HTML5TreeBuilder::handleScriptStartTag):
3186         (WebCore::HTML5TreeBuilder::adjustedLexerState):
3187         * html/HTML5TreeBuilder.h:
3188         * html/HTMLTokenizer.cpp: Copied from WebCore/html/HTML5Lexer.cpp.
3189         (WebCore::HTMLNames::isEndTagBufferingState):
3190         (WebCore::HTMLTokenizer::HTMLTokenizer):
3191         (WebCore::HTMLTokenizer::~HTMLTokenizer):
3192         (WebCore::HTMLTokenizer::reset):
3193         (WebCore::HTMLTokenizer::processEntity):
3194         (WebCore::HTMLTokenizer::nextToken):
3195         (WebCore::HTMLTokenizer::temporaryBufferIs):
3196         (WebCore::HTMLTokenizer::addToPossibleEndTag):
3197         (WebCore::HTMLTokenizer::isAppropriateEndTag):
3198         (WebCore::HTMLTokenizer::emitCharacter):
3199         (WebCore::HTMLTokenizer::emitCodePoint):
3200         (WebCore::HTMLTokenizer::emitParseError):
3201         (WebCore::HTMLTokenizer::emitCurrentToken):
3202         (WebCore::HTMLTokenizer::shouldEmitBufferedCharacterToken):
3203         * html/HTMLTokenizer.h: Copied from WebCore/html/HTML5Lexer.h.
3204
3205 2010-06-22  Simon Hausmann  <simon.hausmann@nokia.com>
3206
3207         Unreviewed Qt/Symbian build fix.
3208
3209         Fix "make clean" to not try to execute clean commands for
3210         the extra targets we use to simulate "make install".
3211
3212         * WebCore.pro: Use no_clean in CONFIG of extra compilers.
3213
3214 2010-06-22  Eric Seidel  <eric@webkit.org>
3215
3216         Reviewed by Adam Barth.
3217
3218         Run clean-header-guards to fix some header guards
3219         https://bugs.webkit.org/show_bug.cgi?id=41044
3220
3221         No functional changes, thus no tests.
3222
3223         This entire change was generated by running
3224         clean-header-guards, and then reverting changes
3225         to files which shouldn't be changed.  Those which
3226         are left all should be updated.
3227
3228         Some of these changes are just fixing 755 permissions
3229         to be 644, since it seems various files have the wrong
3230         execute bit which don't need it.  clean-header-guards
3231         made those (welcome) permission fixes unintentionally.
3232
3233         * bindings/v8/custom/V8HTMLAudioElementConstructor.h:
3234         * bindings/v8/custom/V8HTMLImageElementConstructor.h:
3235         * bindings/v8/custom/V8HTMLOptionElementConstructor.h:
3236         * dom/Touch.h:
3237         * dom/TouchList.h:
3238         * dom/XMLDocumentParser.h:
3239         * dom/XMLDocumentParserScope.h:
3240         * html/HTML5DocumentParser.h:
3241         * html/LegacyHTMLTreeConstructor.h:
3242         * loader/CrossOriginPreflightResultCache.h:
3243         * page/OriginAccessEntry.h:
3244         * page/win/FrameWin.h:
3245         * platform/ThreadTimers.h:
3246         * platform/chromium/KeyboardCodes.h:
3247         * platform/graphics/chromium/FontPlatformDataChromiumWin.h:
3248         * platform/graphics/chromium/FontUtilsChromiumWin.h:
3249         * platform/graphics/filters/FEBlend.h:
3250         * platform/graphics/filters/FEColorMatrix.h:
3251         * platform/graphics/filters/FEComponentTransfer.h:
3252         * platform/graphics/filters/FEComposite.h:
3253         * platform/graphics/gstreamer/DataSourceGStreamer.h:
3254         * platform/graphics/gstreamer/VideoSinkGStreamer.h:
3255          - I checked, this crazy define was not referenced
3256            anywhere else.  It's safe to change the name. :)
3257         * platform/graphics/haiku/FontPlatformData.h:
3258         * platform/graphics/qt/FontCustomPlatformData.h:
3259         * platform/graphics/skia/SkiaFontWin.h:
3260         * platform/graphics/win/GraphicsLayerCACF.h:
3261         * platform/graphics/win/QTMovieWinTimer.h:
3262         * platform/graphics/win/RefCountedGDIHandle.h:
3263         * platform/graphics/win/WebLayer.h:
3264         * platform/graphics/win/WebTiledLayer.h:
3265         * platform/graphics/wince/FontPlatformData.h:
3266         * platform/graphics/wx/FontPlatformData.h:
3267         * platform/network/CredentialStorage.h:
3268         * platform/network/cf/FormDataStreamCFNet.h:
3269         * platform/network/curl/FormDataStreamCurl.h:
3270         * platform/network/qt/DnsPrefetchHelper.h:
3271         * platform/network/qt/QNetworkReplyHandler.h:
3272         * platform/win/PlatformScrollBar.h:
3273         * plugins/PluginDatabase.h:
3274         * plugins/PluginPackage.h:
3275         * plugins/PluginStream.h:
3276         * plugins/qt/PluginContainerQt.h:
3277         * plugins/symbian/npinterface.h:
3278         * rendering/RenderSelectionInfo.h:
3279         * rendering/SVGRenderSupport.h:
3280         * storage/IDBObjectStoreImpl.h:
3281         * svg/animation/SMILTimeContainer.h:
3282         * wml/WMLErrorHandling.h:
3283
3284 2010-06-22  Adam Barth  <abarth@webkit.org>
3285
3286         Reviewed by Eric Seidel.
3287
3288         Rename HTMLDocumentParser to LegacyHTMLDocumentParser
3289         https://bugs.webkit.org/show_bug.cgi?id=41043
3290
3291         As requested by Darin Adler.
3292
3293         * Android.mk:
3294         * CMakeLists.txt:
3295         * GNUmakefile.am:
3296         * WebCore.gypi:
3297         * WebCore.pro:
3298         * WebCore.vcproj/WebCore.vcproj:
3299         * WebCore.xcodeproj/project.pbxproj:
3300         * css/CSSStyleSheet.cpp:
3301         (WebCore::CSSStyleSheet::checkLoaded):
3302         * dom/Document.cpp:
3303         (WebCore::Document::write):
3304         * dom/DocumentFragment.cpp:
3305         * dom/DocumentParser.h:
3306         (WebCore::DocumentParser::asHTMLDocumentParser):
3307         * dom/XMLDocumentParserLibxml2.cpp:
3308         * dom/XMLDocumentParserQt.cpp:
3309         * html/HTML5Lexer.h:
3310         (WebCore::HTML5Lexer::columnNumber):
3311         * html/HTML5TreeBuilder.cpp:
3312         * html/HTMLDocument.cpp:
3313         (WebCore::HTMLDocument::createParser):
3314         * html/HTMLDocumentParser.cpp: Removed.
3315         * html/HTMLDocumentParser.h: Removed.
3316         * html/HTMLFormControlElement.cpp:
3317         * html/HTMLParserScheduler.cpp:
3318         (WebCore::parserChunkSize):
3319         * html/HTMLViewSourceDocument.cpp:
3320         (WebCore::HTMLViewSourceDocument::createParser):
3321         (WebCore::HTMLViewSourceDocument::addViewSourceToken):
3322         * html/HTMLViewSourceDocument.h:
3323         * html/LegacyHTMLDocumentParser.cpp: Copied from WebCore/html/HTMLDocumentParser.cpp.
3324         (WebCore::LegacyHTMLDocumentParser::LegacyHTMLDocumentParser):
3325         (WebCore::LegacyHTMLDocumentParser::reset):
3326         (WebCore::LegacyHTMLDocumentParser::begin):
3327         (WebCore::LegacyHTMLDocumentParser::setForceSynchronous):
3328         (WebCore::LegacyHTMLDocumentParser::processListing):
3329         (WebCore::LegacyHTMLDocumentParser::parseNonHTMLText):
3330         (WebCore::LegacyHTMLDocumentParser::scriptHandler):
3331         (WebCore::LegacyHTMLDocumentParser::scriptExecution):
3332         (WebCore::LegacyHTMLDocumentParser::parseComment):
3333         (WebCore::LegacyHTMLDocumentParser::parseServer):
3334         (WebCore::LegacyHTMLDocumentParser::parseProcessingInstruction):
3335         (WebCore::LegacyHTMLDocumentParser::parseText):
3336         (WebCore::LegacyHTMLDocumentParser::parseEntity):
3337         (WebCore::LegacyHTMLDocumentParser::parseDoctype):
3338         (WebCore::LegacyHTMLDocumentParser::parseTag):
3339         (WebCore::LegacyHTMLDocumentParser::continueProcessing):
3340         (WebCore::LegacyHTMLDocumentParser::advance):
3341         (WebCore::LegacyHTMLDocumentParser::willWriteHTML):
3342         (WebCore::LegacyHTMLDocumentParser::didWriteHTML):
3343         (WebCore::LegacyHTMLDocumentParser::write):
3344         (WebCore::LegacyHTMLDocumentParser::stopParsing):
3345         (WebCore::LegacyHTMLDocumentParser::processingData):
3346         (WebCore::LegacyHTMLDocumentParser::timerFired):
3347         (WebCore::LegacyHTMLDocumentParser::end):
3348         (WebCore::LegacyHTMLDocumentParser::finish):
3349         (WebCore::LegacyHTMLDocumentParser::finishWasCalled):
3350         (WebCore::LegacyHTMLDocumentParser::processToken):
3351         (WebCore::LegacyHTMLDocumentParser::processDoctypeToken):
3352         (WebCore::LegacyHTMLDocumentParser::~LegacyHTMLDocumentParser):
3353         (WebCore::LegacyHTMLDocumentParser::enlargeBuffer):
3354         (WebCore::LegacyHTMLDocumentParser::enlargeScriptBuffer):
3355         (WebCore::LegacyHTMLDocumentParser::executeScriptsWaitingForStylesheets):
3356         (WebCore::LegacyHTMLDocumentParser::notifyFinished):
3357         (WebCore::LegacyHTMLDocumentParser::executeExternalScriptsIfReady):
3358         (WebCore::LegacyHTMLDocumentParser::executeExternalScriptsTimerFired):
3359         (WebCore::LegacyHTMLDocumentParser::continueExecutingExternalScripts):
3360         (WebCore::LegacyHTMLDocumentParser::isWaitingForScripts):
3361         (WebCore::LegacyHTMLDocumentParser::setSrc):
3362         (WebCore::parseLegacyHTMLDocumentFragment):
3363         * html/LegacyHTMLDocumentParser.h: Copied from WebCore/html/HTMLDocumentParser.h.
3364         (WebCore::LegacyHTMLDocumentParser::asHTMLDocumentParser):
3365         * html/LegacyHTMLTreeConstructor.cpp:
3366         (WebCore::LegacyHTMLTreeConstructor::reportErrorToConsole):
3367         * html/LegacyHTMLTreeConstructor.h:
3368         * loader/FTPDirectoryDocument.cpp:
3369         (WebCore::FTPDirectoryDocumentParser::FTPDirectoryDocumentParser):
3370         (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
3371         (WebCore::FTPDirectoryDocumentParser::finish):
3372         * page/XSSAuditor.h:
3373
3374 2010-06-22  Shinichiro Hamaji  <hamaji@chromium.org>
3375
3376         Unreviewed attempt to fix the windows build.
3377
3378         Split out HTML5DocumentParser yield/resume logic into a separate class
3379         https://bugs.webkit.org/show_bug.cgi?id=41018
3380
3381         * WebCore.vcproj/WebCore.vcproj:
3382
3383 2010-06-22  Eric Seidel  <eric@webkit.org>
3384
3385         Reviewed by Adam Barth.
3386
3387         Split out HTML5DocumentParser yield/resume logic into a separate class
3388         https://bugs.webkit.org/show_bug.cgi?id=41018
3389
3390         The HTML5DocumentParser is just the coordinator, and shouldn't have
3391         any real parsing logic of his own.  Continuing along that path, I'm
3392         moving the when-to-yield/resume logic out into a separate class.
3393
3394         I could have create a new HTMLParserSchedulerHost virtual interface
3395         to allow the HTMLParserScheduler to talk back to the
3396         HTML5DocumentParser, but instead I just exposed the one method it
3397         needs (resumeParsing()) as a public method.  Since no code besides
3398         HTMLDocument (and DocumentFrament) ever should know about the
3399         HTML5DocumentParser DocumentParser subclass, no class should ever
3400         see the resumeParsing() method anyway.
3401
3402         Most of this change is just moving code from HTML5DocumentParser
3403         to the new HTMLParserScheduler.
3404
3405         Some of this change is wrapping previous direct access to
3406         m_continueNextChunkTimer.isActive() with isScheduledForResume().
3407
3408         * Android.mk:
3409         * CMakeLists.txt:
3410         * GNUmakefile.am:
3411         * WebCore.gypi:
3412         * WebCore.pro:
3413         * WebCore.xcodeproj/project.pbxproj:
3414         * html/HTML5DocumentParser.cpp:
3415         (WebCore::HTML5DocumentParser::HTML5DocumentParser):
3416         (WebCore::HTML5DocumentParser::stopParsing):
3417         (WebCore::HTML5DocumentParser::processingData):
3418         (WebCore::HTML5DocumentParser::pumpLexerIfPossible):
3419         (WebCore::HTML5DocumentParser::isScheduledForResume):
3420         (WebCore::HTML5DocumentParser::resumeParsing):
3421         (WebCore::HTML5DocumentParser::pumpLexer):
3422         (WebCore::HTML5DocumentParser::end):
3423         (WebCore::HTML5DocumentParser::attemptToEnd):
3424         (WebCore::HTML5DocumentParser::endIfDelayed):
3425         * html/HTML5DocumentParser.h:
3426         (WebCore::HTML5DocumentParser::document):
3427          - Exposed for HTMLParserScheduler.
3428         * html/HTMLParserScheduler.cpp: Added.
3429         (WebCore::parserTimeLimit): Moved from HTML5DocumentParser.
3430         (WebCore::parserChunkSize): ditto.
3431         (WebCore::HTMLParserScheduler::HTMLParserScheduler):
3432         (WebCore::HTMLParserScheduler::~HTMLParserScheduler):
3433         (WebCore::isLayoutTimerActive):
3434         (WebCore::HTMLParserScheduler::continueNextChunkTimerFired):
3435          - Moved from HTML5DocumentParser.
3436         * html/HTMLParserScheduler.h: Added.
3437         (WebCore::HTMLParserScheduler::PumpSession::PumpSession):
3438          - Moved from HTML5DocumentParser.
3439         (WebCore::HTMLParserScheduler::shouldContinueParsing):
3440         (WebCore::HTMLParserScheduler::isScheduledForResume):
3441
3442 2010-06-22  Pavel Feldman  <pfeldman@chromium.org>
3443
3444         Reviewed by Yury Semikhatsky.
3445
3446         Web Inspector: move nodeByPath from InjectedScript to InspectorBackend.
3447
3448         https://bugs.webkit.org/show_bug.cgi?id=40988
3449
3450         * inspector/InjectedScriptHost.cpp:
3451         * inspector/InjectedScriptHost.h:
3452         * inspector/InjectedScriptHost.idl:
3453         * inspector/InspectorBackend.cpp:
3454         (WebCore::InspectorBackend::pushNodeByPathToFrontend):
3455         * inspector/InspectorBackend.h:
3456         * inspector/InspectorBackend.idl:
3457         * inspector/InspectorDOMAgent.cpp:
3458         (WebCore::InspectorDOMAgent::pushNodeByPathToFrontend):
3459         (WebCore::InspectorDOMAgent::nodeForPath):
3460         * inspector/InspectorDOMAgent.h:
3461         * inspector/InspectorFrontend.cpp:
3462         (WebCore::InspectorFrontend::didPushNodeByPathToFrontend):
3463         * inspector/InspectorFrontend.h:
3464         * inspector/front-end/DOMAgent.js:
3465         * inspector/front-end/ElementsPanel.js:
3466         (WebInspector.ElementsPanel.prototype.setDocument):
3467         * inspector/front-end/InjectedScript.js:
3468         * inspector/front-end/InjectedScriptAccess.js:
3469
3470 2010-06-22  David Levin  <levin@chromium.org>
3471
3472         Reviewed by Alexey Proskuryakov.
3473
3474         REGRESSION: (r47291): Upload progress events are not fired for simple cross-site XHR.
3475         https://bugs.webkit.org/show_bug.cgi?id=39029
3476
3477         Specifically, WebKit should fire upload events if one or more event listeners are
3478         registered on the XMLHttpRequestUpload object when send is called in an async manner.
3479
3480         * xml/XMLHttpRequest.cpp:
3481         (WebCore::XMLHttpRequest::createRequest): Allow upload events to be fired when there are
3482         handlers for them in the cross-origin simple request case.
3483
3484 2010-06-22  Kent Tamura  <tkent@chromium.org>
3485
3486         Reviewed by Adam Barth.
3487
3488         Fix uninitialized SubframeLoader::m_containsPlugins
3489         https://bugs.webkit.org/show_bug.cgi?id=41035
3490
3491         * loader/SubframeLoader.cpp:
3492         (WebCore::SubframeLoader::SubframeLoader):
3493          Initialize m_containsPlugins with false.
3494
3495 2010-06-22  Kinuko Yasuda  <kinuko@chromium.org>
3496
3497         Reviewed by Adam Barth.
3498
3499         Add BlobBuilder.idl to expose BlobBuilder interface
3500         https://bugs.webkit.org/show_bug.cgi?id=40593
3501
3502         (Resubmitting with the correct file set.)
3503
3504         BlobBuilder is defined in FileAPI's FileWriter spec.
3505         (http://dev.w3.org/2009/dap/file-system/file-writer.html)
3506
3507         Also removes the ENABLE_FILE_WRITER ifdef guard for BlobBuilder.
3508
3509         Tests: http/tests/local/blob/send-data-blob.html
3510                http/tests/local/blob/send-hybrid-blob.html
3511                http/tests/local/blob/send-sliced-data-blob.html
3512
3513         * Android.derived.jscbindings.mk:
3514         * Android.derived.v8bindings.mk:
3515         * CMakeLists.txt:
3516         * DerivedSources.cpp:
3517         * DerivedSources.make:
3518         * GNUmakefile.am:
3519         * WebCore.gypi:
3520         * WebCore.pri:
3521         * WebCore.pro:
3522         * WebCore.vcproj/WebCore.vcproj:
3523         * WebCore.xcodeproj/project.pbxproj:
3524         * html/BlobBuilder.cpp:
3525         (WebCore::BlobBuilder::append):
3526         * html/BlobBuilder.h:
3527         * html/BlobBuilder.idl: Added.
3528         * page/DOMWindow.idl:
3529
3530 2010-06-22  Kent Tamura  <tkent@chromium.org>
3531
3532         Unreviewed, build fix for r61648.
3533
3534         * platform/graphics/GraphicsContext3D.h:
3535
3536 2010-06-22  Vangelis Kokkevis  <vangelis@chromium.org>
3537
3538         Reviewed by Kent Tamura.
3539
3540         Define GraphicsContext3D::platformLayer() for all remaining (non PLATFORM(MAC))
3541         ports to get RenderLayerBacking.cpp compiling again.
3542         https://bugs.webkit.org/show_bug.cgi?id=41026
3543
3544         * platform/graphics/GraphicsContext3D.h:
3545         (WebCore::GraphicsContext3D::platformLayer):
3546
3547 2010-06-22  Eric Seidel  <eric@webkit.org>
3548
3549         Unreviewed.  Rolling out http://trac.webkit.org/changeset/61638
3550         made a few tests crash.
3551
3552         Make PendingScript hold a CachedResourceClient open for its lifetime
3553         https://bugs.webkit.org/show_bug.cgi?id=40968
3554
3555         * html/HTML5DocumentParser.cpp:
3556         (WebCore::HTML5DocumentParser::watchForLoad):
3557         (WebCore::HTML5DocumentParser::notifyFinished):
3558         * html/HTML5ScriptRunner.cpp:
3559         (WebCore::HTML5ScriptRunner::~HTML5ScriptRunner):
3560         (WebCore::HTML5ScriptRunner::sourceFromPendingScript):
3561         (WebCore::HTML5ScriptRunner::isPendingScriptReady):
3562         (WebCore::HTML5ScriptRunner::executePendingScript):
3563         (WebCore::HTML5ScriptRunner::hasScriptsWaitingForLoad):
3564         (WebCore::HTML5ScriptRunner::watchForLoad):
3565         (WebCore::HTML5ScriptRunner::stopWatchingForLoad):
3566         (WebCore::HTML5ScriptRunner::executeScriptsWaitingForLoad):
3567         (WebCore::HTML5ScriptRunner::executeScriptsWaitingForStylesheets):
3568         (WebCore::HTML5ScriptRunner::requestScript):
3569         * html/HTML5ScriptRunner.h:
3570         (WebCore::HTML5ScriptRunner::PendingScript::):
3571         (WebCore::HTML5ScriptRunner::PendingScript::PendingScript):
3572         (WebCore::HTML5ScriptRunner::PendingScript::watchingForLoad):
3573         * html/HTML5ScriptRunnerHost.h:
3574
3575 2010-06-22  Adele Peterson  <adele@apple.com>
3576
3577         Reviewed by Darin Adler.
3578
3579         Fix for Crash when the renderer for the button in <input type="number"> goes away during event handling
3580         https://bugs.webkit.org/show_bug.cgi?id=41013
3581
3582         Test: fast/forms/input-number-crash.html
3583
3584         * rendering/TextControlInnerElements.cpp: (WebCore::SpinButtonElement::defaultEventHandler):
3585         Nil check the RenderBox since its possible the renderer has gone away during event handling.
3586
3587 2010-06-22  Tony Gentilcore  <tonyg@chromium.org>
3588
3589         Reviewed by Eric Seidel.
3590
3591         Pull script line number from DocumentParser instead of pushing it to ScriptController
3592         https://bugs.webkit.org/show_bug.cgi?id=40649
3593
3594         This approach is cleaner and improves WebCore/benchmarks/parser/html-parser.html by ~2%.
3595
3596         Tests: fast/js/script-line-number.html
3597
3598         * bindings/js/ScriptController.cpp:
3599         (WebCore::ScriptController::ScriptController):
3600         (WebCore::ScriptController::eventHandlerLineNumber):
3601         * bindings/js/ScriptController.h:
3602         * bindings/v8/ScriptController.cpp:
3603         (WebCore::ScriptController::eventHandlerLineNumber):
3604         (WebCore::ScriptController::eventHandlerColumnNumber):
3605         * bindings/v8/ScriptController.h:
3606         * bindings/v8/ScriptEventListener.cpp:
3607         (WebCore::createAttributeEventListener):
3608         * bindings/v8/V8Proxy.h:
3609         * dom/XMLDocumentParserLibxml2.cpp:
3610         (WebCore::XMLDocumentParser::startElementNs):
3611         * html/HTML5DocumentParser.cpp:
3612         (WebCore::HTML5DocumentParser::pumpLexer):
3613         * html/HTMLDocumentParser.cpp:
3614         (WebCore::HTMLDocumentParser::processToken):
3615
3616 2010-06-22  Tony Gentilcore  <tonyg@chromium.org>
3617
3618         Reviewed by Eric Seidel.
3619
3620         Make PendingScript hold a CachedResourceClient open for its lifetime
3621         https://bugs.webkit.org/show_bug.cgi?id=40968
3622
3623         This replaces the mechanism introduced in r61374 with a simpler
3624         approach from preventing unexpected purges; always keep a client open.
3625         This will approach will allow deferred scripts to add a client after
3626         the resource may have already been loaded without having to worry about
3627         the buffer being purged in the meantime.
3628
3629         No new tests because making a CachedResource purge itself is not
3630         testable from a LayoutTest.
3631
3632         * html/HTML5DocumentParser.cpp: