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