5571fb21d0496b61a9cd9f9d172fc35b3467cf57
[WebKit.git] / WebCore / ChangeLog
1 2010-07-15  Qi Zhang  <qi.2.zhang@nokia.com>
2
3         Reviewed by Kenneth Rohde Christiansen.
4
5         [Qt] Failure on http://philip.html5.org/tests/canvas/suite/tests/2d.shadow.alpha.5.html
6         https://bugs.webkit.org/show_bug.cgi?id=38400
7
8         FillRect with shadow need take alpha information from fillstyle
9
10         * platform/graphics/qt/GraphicsContextQt.cpp:
11         (WebCore::GraphicsContext::fillRect):
12
13 2010-07-17  Nikita Vasilyev  <me@elv1s.ru>
14
15         Reviewed by Pavel Feldman.
16
17         Web Inspector: [REGRESSION] Edit long CSS attributes works incorrect
18         https://bugs.webkit.org/show_bug.cgi?id=42476
19
20         * inspector/front-end/inspector.css:
21         (.editing):
22
23 2010-07-16  Andreas Kling  <andreas.kling@nokia.com>
24
25         Reviewed by Sam Weinig.
26
27         Failing 2d.path.arcTo.ensuresubpath.* philip canvas tests
28         https://bugs.webkit.org/show_bug.cgi?id=42186
29
30         Move code from Qt's Path::addArcTo() up to CanvasRenderingContext2D.
31
32         * html/canvas/CanvasRenderingContext2D.cpp:
33         (WebCore::CanvasRenderingContext2D::arcTo): Behave as moveTo(x1,y1)
34         if the current path is empty.
35         * platform/graphics/qt/PathQt.cpp:
36         (WebCore::Path::addArcTo): Remove now-redundant code.
37
38 2010-07-16  Andreas Kling  <andreas.kling@nokia.com>
39
40         Reviewed by Oliver Hunt.
41
42         QtWebkit creates an unnecessary deep copy of images when canvas drawing is done
43         A https://bugs.webkit.org/show_bug.cgi?id=32530
44
45         Solve this by adding ImageBuffer::imageForRendering() which returns an image
46         that can be used for rendering now, but isn't a copy to be kept around.
47
48         * platform/graphics/ImageBuffer.h:
49         (WebCore::ImageBuffer::imageForRendering):
50         * platform/graphics/qt/ImageBufferQt.cpp:
51         (WebCore::ImageBuffer::imageForRendering): Added to provide an image that can
52         be used for rendering now, but may change in the future.
53         * platform/graphics/qt/StillImageQt.cpp:
54         (WebCore::StillImage::StillImage):
55         (WebCore::StillImage::~StillImage):
56         (WebCore::StillImage::size):
57         (WebCore::StillImage::nativeImageForCurrentFrame):
58         (WebCore::StillImage::draw):
59         * platform/graphics/qt/StillImageQt.h:
60         (WebCore::StillImage::createForRendering): Added for use in
61         ImageBuffer::imageForRendering(), provides a thin wrapper around a QPixmap*.
62         * html/HTMLCanvasElement.cpp:
63         (WebCore::HTMLCanvasElement::paint): Paint with ImageBuffer::imageForRendering()
64
65 2010-07-16  Andreas Kling  <andreas.kling@nokia.com>
66
67         Reviewed by Oliver Hunt.
68
69         [Qt] Remove redundant logic in Path::addArcTo()
70         https://bugs.webkit.org/show_bug.cgi?id=42494
71
72         Bounds checking for arcTo() is now done in cross-platform code
73         thanks to <http://trac.webkit.org/changeset/63599>
74
75         * platform/graphics/qt/PathQt.cpp:
76         (WebCore::Path::addArcTo):
77
78 2010-07-16  Zhe Su  <suzhe@chromium.org>
79
80         Reviewed by Darin Adler.
81
82         REGRESSION(r61484): Broke focus behaviour on Qt and probably other platforms
83         https://bugs.webkit.org/show_bug.cgi?id=42253
84
85         This patch just reverts the change to WebCore/page/FocusController.cpp
86         made in changeset 61484, and add a new method named
87         willSetInputMethodState in EditorClient interface, which gets called
88         in FocusController just before changing the focused node.
89
90         No new tests, because no new functionality.
91
92         * loader/EmptyClients.h:
93         (WebCore::EmptyEditorClient::willSetInputMethodState):
94         * page/EditorClient.h:
95         * page/FocusController.cpp:
96         (WebCore::FocusController::setFocusedNode):
97
98 2010-07-16  Matthew Delaney  <mdelaney@apple.com>
99
100         Reviewed by Sam Weinig.
101
102         Failing 2d.path.stroke.prune.arc philip canvas test
103         https://bugs.webkit.org/show_bug.cgi?id=42188
104
105         * html/canvas/CanvasRenderingContext2D.cpp: 
106         Note, updated parameter names to match spec.
107         (WebCore::CanvasRenderingContext2D::lineTo): Pulled bound checking code out of lower code to have checks for all platforms.
108         (WebCore::CanvasRenderingContext2D::arcTo): Bound checking per the spec for arcTo parameters. Updated parameter names to match spec.
109         * platform/graphics/Path.h: Added in new method to expose the current position.
110         * platform/graphics/cairo/PathCairo.cpp:
111         (WebCore::Path::currentPoint): Added in likely correct implementation for this call with a FIXME just in case.
112         * platform/graphics/cg/PathCG.cpp:
113         (WebCore::Path::currentPoint): Added in support for this call.
114         * platform/graphics/haiku/PathHaiku.cpp:
115         (WebCore::Path::currentPoint): Added in stub for this call.
116         * platform/graphics/openvg/PathOpenVG.cpp:
117         (WebCore::Path::currentPoint): Added in likely implementation for this call with a FIXME just in case.
118         * platform/graphics/qt/PathQt.cpp:
119         (WebCore::Path::currentPoint): Added in implementation for this call courtesy of Andrea Kling.
120         * platform/graphics/skia/PathSkia.cpp:
121         (WebCore::Path::currentPoint): Added in stub for this call.
122         * platform/graphics/wince/PathWince.cpp:
123         (WebCore::Path::currentPoint): Added in stub for this call.
124         * platform/graphics/wx/PathWx.cpp:
125         (WebCore::Path::currentPoint): Added in stub for this call.
126
127 2010-07-16  Sheriff Bot  <webkit.review.bot@gmail.com>
128
129         Unreviewed, rolling out r63593.
130         http://trac.webkit.org/changeset/63593
131         https://bugs.webkit.org/show_bug.cgi?id=42487
132
133         Broke a few chromium pixel tests (Requested by tony^work on
134         #webkit).
135
136         * platform/graphics/skia/GraphicsContextSkia.cpp:
137         (WebCore::GraphicsContext::drawConvexPolygon):
138         (WebCore::GraphicsContext::drawEllipse):
139         (WebCore::GraphicsContext::drawLine):
140         (WebCore::GraphicsContext::strokeArc):
141         (WebCore::GraphicsContext::strokePath):
142         (WebCore::GraphicsContext::strokeRect):
143
144 2010-07-16  Dan Bernstein  <mitz@apple.com>
145
146         Reviewed by Sam Weinig.
147
148         Part of <rdar://problem/7233974> Deprecate +[WebView _setShouldUseFontSmoothing:]
149         https://bugs.webkit.org/show_bug.cgi?id=29355
150
151         * WebCore.exp.in: Updated.
152         * platform/graphics/Font.cpp:
153         (WebCore::Font::Font): Added a font smoothing mode parameter to the constructor.
154         Set the font smoothing mode in the font description.
155         * platform/graphics/Font.h:
156
157 2010-07-16  Satish Sampath  <satish@chromium.org>
158
159         Reviewed by Anders Carlsson.
160
161         Add speech attribute to IDL for enabling access from JS.
162         https://bugs.webkit.org/show_bug.cgi?id=42483
163
164         No tests added, this change is a pre-requisite for future layout tests.
165
166         * html/HTMLInputElement.cpp:
167         (WebCore::HTMLInputElement::parseMappedAttribute): Update the renderer when speech attribute changes.
168         * html/HTMLInputElement.idl: Added the speech attribute to IDL.
169
170 2010-07-16  Fady Samuel  <fsamuel@chromium.org>
171
172         Reviewed by David Levin.
173         
174         Avoids adding stroke when stroke-width is zero.
175
176         SVG - stroke-width:0 bug with stroke other than "none"
177         https://bugs.webkit.org/show_bug.cgi?id=42387
178
179         Test: svg/stroke/path-zero-strokewidth-test.svg
180
181         * platform/graphics/skia/GraphicsContextSkia.cpp:
182         (WebCore::GraphicsContext::drawConvexPolygon):
183         (WebCore::GraphicsContext::drawEllipse):
184         (WebCore::GraphicsContext::drawLine):
185         (WebCore::GraphicsContext::strokeArc):
186         (WebCore::GraphicsContext::strokePath):
187         (WebCore::GraphicsContext::strokeRect):
188
189 2010-07-16  Kent Tamura  <tkent@chromium.org>
190
191         Unreviewed, build fix.
192
193         * rendering/RenderThemeChromiumWin.cpp:
194         (WebCore::RenderThemeChromiumWin::getThemeData): Fix a typo.
195
196 2010-07-16  Kent Tamura  <tkent@chromium.org>
197
198         Reviewed by Darin Fisher.
199
200         [Chromium] <input type=number> UI implementation for Windows
201         https://bugs.webkit.org/show_bug.cgi?id=42259
202
203         No additional tests.  Existing tests cover this change and we'll
204         update expectations.
205
206         * platform/chromium/ChromiumBridge.h: Add paintSpinButton().
207         * rendering/RenderThemeChromiumWin.cpp:
208         (WebCore::RenderThemeChromiumWin::determineState):
209          Add ControlSubPart parameter and add support for spin buttons.
210         (WebCore::RenderThemeChromiumWin::determineClassicState): ditto.
211         (WebCore::RenderThemeChromiumWin::getThemeData): ditto.
212         (WebCore::RenderThemeChromiumWin::adjustInnerSpinButtonStyle): Added.
213         (WebCore::RenderThemeChromiumWin::paintInnerSpinButton): Added.
214         * rendering/RenderThemeChromiumWin.h:
215           Declare ControlSubpart, and add it to some functions.
216
217 2010-07-16  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
218
219         Reviewed by Antonio Gomes.
220
221         [EFL] Use function provided by EFL for system beep
222         https://bugs.webkit.org/show_bug.cgi?id=42481
223
224         EFL port does not support automated tests, yet.
225
226         * platform/efl/SoundEfl.cpp:
227         (WebCore::systemBeep):
228
229 2010-07-16  Sarah Strong  <sarah.e.strong@gmail.com>
230
231         Reviewed by Gustavo Noronha Silva.
232
233         [GTK] Clipboard data is lost on exit
234         https://bugs.webkit.org/show_bug.cgi?id=27411
235
236         No new tests. To manually test the bug fixed by this patch:
237         1) Open an application that uses a webkit webview on a GNOME-based system
238         2) Copy some text from that application
239         3) Optional: paste it to another application. This should work properly with and without this patch.
240         4) Exit the application completely.
241         5) Paste:
242                   Without this patch, you cannot because your clipboard is empty.
243                   With this patch, pasting succeeds.
244         I have not included an automated test because of the difficulty of testing behaviour after application exit.
245
246 2010-07-16  Kent Tamura  <tkent@chromium.org>
247
248         Reviewed by Darin Fisher.
249
250         Keyboard operations for <input type=number>
251         https://bugs.webkit.org/show_bug.cgi?id=42076
252
253         - The up arrow key works as stepUp().
254         - The down arrow key works as stepDown().
255         - Reject characters other than + - 0-9 . e E
256
257         Test: fast/forms/input-number-keyoperation.html
258
259         * html/HTMLInputElement.cpp:
260         (WebCore::HTMLInputElement::defaultEventHandler):
261          Add up/down arrow keys support, and call handleBeforeTextInsertedEvent().
262         (WebCore::isNumberCharacter):
263         (WebCore::HTMLInputElement::handleBeforeTextInsertedEvent):
264          For type=number, remove unacceptable characters.
265         * html/HTMLInputElement.h:
266
267 2010-07-16  Kent Tamura  <tkent@chromium.org>
268
269         Reviewed by Darin Fisher.
270
271         Improve hover state handling for spin buttons
272         https://bugs.webkit.org/show_bug.cgi?id=42260
273
274         Background:
275         When we move the mouse cursor to a node from the outside of the node,
276         the following steps are executed.
277          1. setHovered(true) is called.
278          2. The node is repainted for the hover state.
279          3. 'mousemove' event is dispatched for the node.
280         For a spin-button, RenderTheme::paint{Inner,Outer}SpinButton() is
281         called before the event handler of the spin-button. So we can't
282         detect which of the up part or the down part is hovered correctly.
283
284         Solution:
285         The hover state of a spin-button is one of three states;
286         Indeterminate, Up, and Down. The state is Indeterminate since
287         setHovered(true) is called and until 'mousemove' event is
288         dispatched.
289
290         No new tests because there are no implementation of spin-buttons
291         with hovered state yet.
292
293         * rendering/RenderTheme.cpp:
294         (WebCore::RenderTheme::isSpinUpButtonPartPressed):
295         (WebCore::RenderTheme::isHovered):
296          Return false if the node is a spin-button and the state is Indeterminate.
297         (WebCore::RenderTheme::isSpinUpButtonPartHovered):
298         * rendering/TextControlInnerElements.cpp:
299         (WebCore::SpinButtonElement::SpinButtonElement):
300          Initialize m_upDownState.
301         (WebCore::SpinButtonElement::defaultEventHandler):
302         (WebCore::SpinButtonElement::setHovered):
303          Set the state to Indeterminate.
304         * rendering/TextControlInnerElements.h:
305         (WebCore::SpinButtonElement::upDownState):
306
307 2010-07-16  Dan Bernstein  <mitz@apple.com>
308
309         Reviewed by Simon Fraser.
310
311         <rdar://problem/7527532> Crash beneath setSelection() during detach()
312         https://bugs.webkit.org/show_bug.cgi?id=42020
313
314         No test because I am unable to reproduce the crash.
315
316         * rendering/RenderView.cpp:
317         (WebCore::RenderView::setSelection): In the clearSelection() case, where the repaint mode is
318         RepaintNewMinusOld, avoid making RenderBlockSelectionInfo instances, and thereby avoid calling
319         localToAbsolute() during detach().
320
321 2010-07-16  Anders Carlsson  <andersca@apple.com>
322
323         Fix release build.
324
325         * storage/Database.cpp:
326         (WebCore::DerefContextTask::performTask):
327
328 2010-07-16  Simon Fraser  <simon.fraser@apple.com>
329
330         Reviewed by Sam Weinig.
331
332         Safari pegs CPU and drops frames on http://neography.com/experiment/circles/solarsystem/ (CSS animations)
333         https://bugs.webkit.org/show_bug.cgi?id=41409
334         
335         AnimationController::isAnimatingPropertyOnRenderer() really asked whether an accelerated animation
336         or transition was running. This prevented us from falling into compositing layers for animation
337         on platforms, like Windows, that don't have accelerated animations.
338         
339         Fix by making things more explicit: we now have two methods, isRunningAnimationOnRenderer()
340         and isRunningAcceleratedAnimationOnRenderer().
341         
342         Changes are more extensive because I flipped the sense of 'm_fallbackAnimating', which is
343         now 'm_isAccelerated', for clarity.
344
345         Test: compositing/animation/animation-compositing.html
346
347         * page/animation/AnimationBase.cpp:
348         (WebCore::AnimationBase::AnimationBase): m_fallbackAnimating -> m_isAccelerated
349         (WebCore::AnimationBase::blendProperties): Ditto.
350         (WebCore::AnimationBase::updateStateMachine): Ditto.
351         * page/animation/AnimationBase.h:
352         (WebCore::AnimationBase::isAnimatingProperty): Takes new acceleratedOnly parameter
353         which causes the method to only return true if the animation is accelerated.
354         (WebCore::AnimationBase::isAccelerated): Changed from isFallbackAnimating.
355
356         * page/animation/AnimationController.cpp:
357         (WebCore::AnimationControllerPrivate::isRunningAnimationOnRenderer):
358         (WebCore::AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
359         (WebCore::AnimationController::isRunningAnimationOnRenderer):
360         (WebCore::AnimationController::isRunningAcceleratedAnimationOnRenderer):
361
362         * page/animation/CompositeAnimation.h:
363         * page/animation/AnimationController.h: Rename isAnimatingPropertyOnRenderer(), add
364         isRunningAcceleratedAnimationOnRenderer().
365         * page/animation/AnimationControllerPrivate.h: Ditto.
366         * page/animation/CompositeAnimation.cpp:
367         (WebCore::CompositeAnimation::updateTransitions): !isFallbackAnimating() -> isAccelerated().
368         (WebCore::CompositeAnimation::isAnimatingProperty): Pass acceleratedOnly down.
369
370         * page/animation/ImplicitAnimation.cpp:
371         (WebCore::ImplicitAnimation::timeToNextService): !isFallbackAnimating() -> isAccelerated().
372
373         * page/animation/KeyframeAnimation.cpp:
374         (WebCore::KeyframeAnimation::timeToNextService): isFallbackAnimating() -> !isAccelerated().
375
376         * rendering/RenderLayerBacking.cpp:
377         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Avoid touching the transform or
378         opacity if an accelerated animation is running.
379
380         * rendering/RenderLayerCompositor.cpp:
381         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation): Make compositing layers
382         if an animation of transform or opacity is running.
383
384 2010-07-16  Simon Fraser  <simon.fraser@apple.com>
385
386         Reviewed by Sam Weinig.
387
388         Assertion when turning Accelerated Compositing off on a composited page
389         https://bugs.webkit.org/show_bug.cgi?id=42408
390
391         When accelerated compositing is turned off, check m_hasAcceleratedCompositing
392         before saying that the root layer will be composited. Fixes an assertion.
393
394         * rendering/RenderLayerCompositor.cpp:
395         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
396
397 2010-07-16  Antonio Gomes  <tonikitoo@webkit.org>
398
399         Reviewed by Simon Fraser.
400
401         Spatial navigation: do not consider outline for focusable element boundaries
402         https://bugs.webkit.org/show_bug.cgi?id=42474
403
404         Test: fast/events/spatial-navigation/snav-zero-margin-content.html
405
406         Currently in WebCore::renderRectRelativeToRootDocument function, we are calling
407         RenderObject::absoluteClippedOverflowRect to obtain the rect boundary of a given
408         renderer/element. This method deals with outline, which is out of elements boundary.
409         It makes spatial navigation to fail on common sites like google.gom: "Web, Images, Map, etc"
410         are inaccessible.
411
412         Patch replaces RenderObject::absoluteClippedOverflowRect by Node::getRect,
413         which returns only the absolute bounding box rect of the Element.
414
415         * page/SpatialNavigation.cpp:
416         (WebCore::renderRectRelativeToRootDocument):
417         (WebCore::checkNegativeCoordsForNode):
418
419 2010-07-15  Antonio Gomes  <tonikitoo@webkit.org>
420
421         Reviewed by Gustavo Noronha.
422
423         [Qt] Remove unnecessary WebKit headers inclusion from WebCore files
424         https://bugs.webkit.org/show_bug.cgi?id=42416
425
426         There are some places in WebCore unnecessarily including WebKit headers.
427
428         Cleaning up only, no testing needed.
429
430         * platform/network/qt/ResourceHandleQt.cpp:
431         * platform/qt/RenderThemeQt.cpp:
432         * platform/qt/WidgetQt.cpp:
433
434 2010-07-16  Dan Bernstein  <mitz@apple.com>
435
436         Reviewed by Anders Carlsson.
437
438         Refinement of r63556: moved the tab width computation back to Font, but added a
439         SimpleFontData parameter.
440
441         * platform/graphics/Font.h:
442         (WebCore::Font::tabWidth):
443         * platform/graphics/WidthIterator.cpp:
444         (WebCore::WidthIterator::advance):
445         * platform/graphics/mac/ComplexTextController.cpp:
446         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
447
448 2010-07-16  Tony Gentilcore  <tonyg@chromium.org>
449
450         Reviewed by Pavel Feldman.
451
452         Fix unit error in calculating timings from ResourceLoadTiming API
453         https://bugs.webkit.org/show_bug.cgi?id=42473
454
455         The start and end offsets are already in milliseconds so they should not be multiplied by 1000.0 like requestTime.
456
457         No new tests because, for a yet unknown reason, the ResourceLoadTiming API is not populated in the chromium test shell like it is in full chromium. This means the test that would have caught this bug (fast/dom/webtiming.html) currently has its expectation set to FAIL.
458
459         * page/Timing.cpp:
460         (WebCore::Timing::domainLookupStart):
461         (WebCore::Timing::domainLookupEnd):
462         (WebCore::Timing::connectStart):
463         (WebCore::Timing::connectEnd):
464         (WebCore::Timing::requestStart):
465         (WebCore::Timing::requestEnd):
466         (WebCore::Timing::responseStart):
467
468 2010-07-16  Anders Carlsson  <andersca@apple.com>
469
470         Reviewed by Sam Weinig.
471
472         clang++ build fixes for JavaScriptCore and WebCore
473         https://bugs.webkit.org/show_bug.cgi?id=42478
474
475         * platform/network/Credential.cpp:
476         (WebCore::Credential::type):
477         * platform/network/Credential.h:
478         Remove const qualifier on Credential::type since it doesn't have an effect on the type.
479
480 2010-07-16  Anders Carlsson  <andersca@apple.com>
481
482         Reviewed by David Levin.
483
484         Really add WARN_UNUSED_RESULT to leakRef
485         https://bugs.webkit.org/show_bug.cgi?id=42464
486
487         Get rid of a call to releaseRef here by passing the ScriptExecutionContext
488         reference through to the DerefContextTask.
489
490         * storage/Database.cpp:
491         (WebCore::DerefContextTask::create):
492         (WebCore::DerefContextTask::performTask):
493         (WebCore::DerefContextTask::DerefContextTask):
494         (WebCore::Database::~Database):
495
496 2010-07-16  Ilya Tikhonovsky  <loislo@chromium.org>
497
498         Reviewed by Yury Semikhatsky.
499
500         WebInspector: The current implementation of generator is not ready
501         for generation Backend part of Inspector interface. The full patch
502         with Backend is quite big and I've split it.
503         https://bugs.webkit.org/show_bug.cgi?id=42462
504
505         * inspector/CodeGeneratorInspector.pm:
506         * inspector/Inspector.idl:
507         * inspector/InspectorValues.cpp:
508         (WebCore::InspectorArray::get):
509         * inspector/InspectorValues.h:
510         (WebCore::InspectorArray::length):
511
512 2010-07-15  Rob Buis  <rwlbuis@gmail.com>
513
514         Reviewed by Darin Adler.
515
516         An empty value for xml:lang isn't considered
517         https://bugs.webkit.org/show_bug.cgi?id=42042
518
519         Allow :lang selector to match empty values for xml:lang and
520         lang attributes.
521
522         Test: fast/css/lang-selector-empty-attribute.xhtml
523
524         * css/CSSStyleSelector.cpp:
525         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
526
527 2010-07-16  Alexander Pavlov  <apavlov@chromium.org>
528
529         Reviewed by Pavel Feldman.
530
531         Web Inspector: Shift-Enter does not do a reverse search. It searches forward.
532         https://bugs.webkit.org/show_bug.cgi?id=42459
533
534         * inspector/front-end/inspector.js:
535         (WebInspector.performSearch):
536
537 2010-07-16  Pavel Feldman  <pfeldman@chromium.org>
538
539         Reviewed by Yury Semikhatsky.
540
541         Web Inspector: do not include SSL time into Waiting time.
542
543         https://bugs.webkit.org/show_bug.cgi?id=42458
544
545         * inspector/front-end/ResourcesPanel.js:
546         (WebInspector.ResourcesPanel.prototype._showPopover):
547
548 2010-07-16  Dan Bernstein  <mitz@apple.com>
549
550         Reviewed by Anders Carlsson.
551
552         <rdar://problem/8198266> white-space: pre text containing tabs is not laid out correctly when the font lacks a space glyph
553         https://bugs.webkit.org/show_bug.cgi?id=42437
554
555         No test because none of the fonts available to DumpRenderTree are missing a space glyph.
556
557         Changed the tab width computation to use the width of the space glyph from the font that has
558         a space glyph, which may be a fallback font if the primary font lacks a space glyph.
559
560         * platform/graphics/Font.h: Removed Font::tabWidth().
561         * platform/graphics/WidthIterator.cpp:
562         (WebCore::WidthIterator::advance):
563         * platform/graphics/mac/ComplexTextController.cpp:
564         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
565
566 2010-07-16  Yury Semikhatsky  <yurys@chromium.org>
567
568         Unreviewed. Chromium build fix. Add missing include.
569
570         * inspector/ConsoleMessage.h:
571
572 2010-07-16  Andreas Kling  <andreas.kling@nokia.com>
573
574         Reviewed by Antonio Gomes.
575
576         [Qt] Path: Avoid creating a new GraphicsContext in strokeContains() and strokeBoundingRect()
577         https://bugs.webkit.org/show_bug.cgi?id=42456
578
579         * platform/graphics/qt/PathQt.cpp:
580         (WebCore::scratchContext): Added, provides a scratch GraphicsContext.
581         (WebCore::Path::strokeContains): Use the scratch context instead
582         of creating a new GraphicsContext.
583         (WebCore::Path::strokeBoundingRect): Ditto.
584
585 2010-07-16  Pavel Podivilov  <podivilov@chromium.org>
586
587         Reviewed by Yury Semikhatsky.
588
589         [V8] V8Proxy::retrieve may return null if javascript is disabled. Add a check
590         to avoid crashes in inspected page.
591         https://bugs.webkit.org/show_bug.cgi?id=42065
592
593         * bindings/v8/ScriptDebugServer.cpp:
594         (WebCore::ScriptDebugServer::addListener):
595
596 2010-07-16  Pavel Feldman  <pfeldman@chromium.org>
597
598         Reviewed by Yury Semikhatsky.
599
600         Web Inspector: add SSL time label into the resources popover.
601
602         https://bugs.webkit.org/show_bug.cgi?id=42458
603
604         * English.lproj/localizedStrings.js:
605         * inspector/InspectorResource.cpp:
606         (WebCore::InspectorResource::buildObjectForTiming):
607         * inspector/front-end/ResourcesPanel.js:
608         (WebInspector.ResourcesPanel.prototype._showPopover):
609
610 2010-07-16  Pavel Feldman  <pfeldman@chromium.org>
611
612         Reviewed by Yury Semikhatsky.
613
614         Web Inspector: disable AppCache in chromium.
615
616         https://bugs.webkit.org/show_bug.cgi?id=41858
617
618         * inspector/front-end/Settings.js:
619         * inspector/front-end/StoragePanel.js:
620         (WebInspector.StoragePanel):
621         (WebInspector.StoragePanel.prototype.reset):
622         (WebInspector.StoragePanel.prototype.addApplicationCache):
623
624 2010-07-16  Yury Semikhatsky  <yurys@chromium.org>
625
626         Reviewed by Pavel Feldman.
627
628         console.trace should show file and line number for each function in the stack
629         https://bugs.webkit.org/show_bug.cgi?id=21180
630
631         Test: inspector/console-trace.html
632
633         * bindings/js/ScriptCallStack.cpp:
634         (WebCore::ScriptCallStack::initialize):
635         * bindings/v8/ScriptCallFrame.cpp:
636         (WebCore::ScriptCallFrame::ScriptCallFrame):
637         * bindings/v8/ScriptCallFrame.h:
638         * bindings/v8/ScriptCallStack.cpp:
639         (WebCore::getFrameLocation):
640         (WebCore::toScriptCallFrame):
641         (WebCore::ScriptCallStack::create):
642         (WebCore::ScriptCallStack::ScriptCallStack):
643         (WebCore::ScriptCallStack::at):
644         (WebCore::ScriptCallStack::size):
645         * bindings/v8/ScriptCallStack.h:
646         * bindings/v8/custom/V8ConsoleCustom.cpp:
647         (WebCore::V8Console::traceCallback):
648         * inspector/ConsoleMessage.cpp:
649         (WebCore::ConsoleMessage::CallFrame::CallFrame):
650         (WebCore::ConsoleMessage::CallFrame::isEqual):
651         (WebCore::ConsoleMessage::CallFrame::createFrontendObject):
652         (WebCore::ConsoleMessage::ConsoleMessage):
653         (WebCore::ConsoleMessage::addToFrontend):
654         (WebCore::ConsoleMessage::isEqual):
655         * inspector/ConsoleMessage.h:
656         * inspector/front-end/ConsoleView.js:
657         (WebInspector.ConsoleMessage.prototype._formatMessage):
658         (WebInspector.ConsoleMessage.prototype._createStackTraceElement):
659         (WebInspector.ConsoleMessage.prototype._createSourceUrlLink):
660         * inspector/front-end/inspector.css:
661         (.console-message.expandable > .console-message-text::before):
662         (.console-message.expandable.collapsed > .console-message-text::before):
663         (.console-message.expandable.collapsed > ol.stack-trace):
664         (.console-message > ol.stack-trace):
665         (.console-message.repeated-message > ol.stack-trace):
666         (.console-message.repeated-message > ol.stack-trace.trace-message):
667         * page/Console.idl:
668
669 2010-07-16  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
670
671         Reviewed by Antonio Gomes.
672
673         [EFL] Build with MathML enabled. Fix build when MathML is enabled and
674         make it the default.
675         https://bugs.webkit.org/show_bug.cgi?id=42453
676
677         EFL port does not support automated tests, yet.
678
679         * CMakeLists.txt: add missing source file and sort.
680
681 2010-07-16  Hans Wennborg  <hans@chromium.org>
682
683         Reviewed by Steve Block.
684
685         DeviceOrientationEvent.h should not forward-declare DeviceOrientation
686         https://bugs.webkit.org/show_bug.cgi?id=42447
687
688         When destructing m_orientation, DeviceOrientation cannot be an incomplete type.
689
690         * dom/DeviceOrientationEvent.h:
691
692 2010-07-16  Nikolas Zimmermann  <nzimmermann@rim.com>
693
694         Reviewed by Dirk Schulze.
695
696         gradientTransform + objectBoundingBox is wrong
697         https://bugs.webkit.org/show_bug.cgi?id=42446
698
699         gradientTransform + gradientUnits="objectBoundingBox" is wrong. Reverse multiplication order of both transforms.
700
701         * rendering/RenderSVGResourceGradient.cpp: s/multiply/multLeft/
702
703 2010-07-16  Mikhail Naganov  <mnaganov@chromium.org>
704
705         Reviewed by Pavel Feldman.
706
707         Make JS memory stats available via 'Performance' object (Web Timing).
708         This statistics is populated only if 'WebKitMemoryInfoEnabled'
709         preference is set.
710
711         'console.memory' is kept until Web Timing object becomes visible by
712         default (currently it is hidden under compile-time flag).  These stats
713         are guarded with the same preference.
714
715         https://bugs.webkit.org/show_bug.cgi?id=41617
716
717         * bindings/js/JSConsoleCustom.cpp:
718         * bindings/v8/custom/V8ConsoleCustom.cpp:
719         * page/Console.cpp:
720         (WebCore::Console::disconnectFrame):
721         (WebCore::Console::memory):
722         * page/Console.h:
723         * page/Console.idl:
724         * page/MemoryInfo.cpp:
725         (WebCore::MemoryInfo::MemoryInfo):
726         * page/MemoryInfo.h:
727         (WebCore::MemoryInfo::create):
728         * page/Performance.cpp:
729         (WebCore::Performance::disconnectFrame):
730         (WebCore::Performance::memory):
731         * page/Performance.h:
732         * page/Performance.idl:
733         * page/Settings.cpp:
734         (WebCore::Settings::Settings):
735         * page/Settings.h:
736         (WebCore::Settings::setMemoryInfoEnabled):
737         (WebCore::Settings::memoryInfoEnabled):
738
739 2010-07-16  Nikolas Zimmermann  <nzimmermann@rim.com>
740
741         Reviewed by Dirk Schulze.
742
743         Convolution computation causes bad alpha channel values
744         https://bugs.webkit.org/show_bug.cgi?id=42273
745
746         Unbreak the convolve matrix filter, fixing svg/W3C-SVG-1.1/filters-conv-01-f.svg.
747
748         1) Fix clamping the rgb values:
749         "image->set(pixel++, clampRGBAValue(totals[0], maxAlpha));" totals[0] -> totals[i].
750
751         2) Don't apply the divisior divison and bias addition multiple times, accumulated!
752     
753         * svg/graphics/filters/SVGFEConvolveMatrix.cpp:
754         (WebCore::setDestinationPixels): Fix two evil bugs, breaking feConvolveMatrix.
755
756 2010-07-16  Nikolas Zimmermann  <nzimmermann@rim.com>
757
758         Reviewed by Dirk Schulze.
759
760         relative positioning does not work for radialGradient after window resize
761         https://bugs.webkit.org/show_bug.cgi?id=41249
762
763         Redesign the way resources are invalidated. No longer utilize the DOM tree, specifically SVGStyledElement::svgAttributeChanged(), to invalidate
764         all resources in the ancestor chain (including itself) when any attribute changes. rect.setAttribute("foo", "bar") should never invalidate the
765         resources. Also the old approach didn't work correctly if the root layout changed (eg. window size change) - we failed to invalidate the resources,
766         thus leading to wrong renderings.
767
768         Instead of calling setNeedsLayout(true) from the SVG*Element classes, call RenderSVGResource::markForLayoutAndParentResourceInvalidation(), which
769         does the same thing and invalidates all resources in the ancestor chain (removing the cached results from the HashMaps). This only happens from
770         the various svgAttributeChanged() methods, if we know which attribute changed, and what action has to be taken.
771
772         All SVG renderers now invalidate their own resources on layout() if the layout changed (selfNeedsLayout()=true). The resources will be recreated
773         and cached during the following paint() call.
774
775         Tests: svg/custom/marker-child-changes-css.svg
776                svg/custom/relative-sized-content-with-resources.xhtml
777
778         * rendering/RenderForeignObject.cpp:
779         (WebCore::RenderForeignObject::layout): If our layout changed, invalidate our resources, by calling RenderSVGResource::invalidateAllResourcesOfRenderer().
780         * rendering/RenderPath.cpp:
781         (WebCore::RenderPath::layout): Ditto.
782         * rendering/RenderSVGContainer.cpp:
783         (WebCore::RenderSVGContainer::layout): Ditto.
784         * rendering/RenderSVGImage.cpp:
785         (WebCore::RenderSVGImage::layout): Ditto.
786         * rendering/RenderSVGModelObject.cpp:
787         (WebCore::RenderSVGModelObject::styleDidChange): Added, to invalidate resources on CSS changes, covered by new svg/custom/marker-child-changes-css.svg test.
788         * rendering/RenderSVGModelObject.h:
789         * rendering/RenderSVGResource.cpp:
790         (WebCore::RenderSVGResource::markForLayoutAndResourceInvalidation): Add new "needsBoundaries" parameter, calling setNeedsBoundaries() on the target render object,
791                                                                             simplifying all RenderSVGResource* code.
792         (WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation): New static method used from DOM tree to invalidate all cached resources in the ancestor chain
793                                                                                   for a render object. Also marks the renderer for layout, if needed. 
794         * rendering/RenderSVGResource.h:
795         * rendering/RenderSVGResourceClipper.cpp: Simplify code, remove no longer needed hacks, as invalidation is now carried out by render tree.
796         (WebCore::RenderSVGResourceClipper::RenderSVGResourceClipper): Add m_invalidationBlocked hack, to avoid invalidations, while we're mutating the render styles (which is a hack!).
797         (WebCore::RenderSVGResourceClipper::invalidateClients): Don't do anything if m_invalidationBlocked=true.
798         (WebCore::RenderSVGResourceClipper::invalidateClient): Ditto.
799         (WebCore::RenderSVGResourceClipper::createClipData): Set m_invalidationBlocked before mutating render styles, as they are restored immediately after creating the clip image.
800         (WebCore::RenderSVGResourceClipper::resourceBoundingBox): Remove no longer needed hack to initialize ClipperData earlier than applyResource() would do.
801         * rendering/RenderSVGResourceClipper.h:
802         * rendering/RenderSVGResourceFilter.cpp:
803         (WebCore::RenderSVGResourceFilter::invalidateClients): Simplify code using markForLayoutAndResourceInvalidation.
804         (WebCore::RenderSVGResourceFilter::invalidateClient): Remove wrong assertion.
805         * rendering/RenderSVGResourceGradient.cpp:
806         (WebCore::RenderSVGResourceGradient::invalidateClients): Simplify code using markForLayoutAndResourceInvalidation.
807         (WebCore::RenderSVGResourceGradient::invalidateClient): Remove wrong assertion.
808         * rendering/RenderSVGResourceMarker.cpp:
809         (WebCore::RenderSVGResourceMarker::invalidateClients): Simplify code using markForLayoutAndResourceInvalidation.
810         (WebCore::RenderSVGResourceMarker::invalidateClient): Remove wrong assertion.
811         * rendering/RenderSVGResourceMasker.cpp:
812         (WebCore::RenderSVGResourceMasker::invalidateClients): Simplify code using markForLayoutAndResourceInvalidation.
813         (WebCore::RenderSVGResourceMasker::invalidateClient): Remove wrong assertion.
814         (WebCore::RenderSVGResourceMasker::resourceBoundingBox): Remove no longer needed hack to initializer MaskerData earlier than applyResource() would do.
815         * rendering/RenderSVGResourcePattern.cpp:
816         (WebCore::RenderSVGResourcePattern::invalidateClients): Simplify code using markForLayoutAndResourceInvalidation.
817         (WebCore::RenderSVGResourcePattern::invalidateClient): Remove wrong assertion.
818         * rendering/RenderSVGText.cpp:
819         (WebCore::RenderSVGText::layout): If our layout changed, invalidate our resources, by calling RenderSVGResource::invalidateAllResourcesOfRenderer().
820         * svg/SVGAnimateMotionElement.cpp:
821         (WebCore::SVGAnimateMotionElement::applyResultsToTarget): Call RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer) instead of renderer->setNeedsLayout(true).
822         * svg/SVGAnimateTransformElement.cpp:
823         (WebCore::SVGAnimateTransformElement::applyResultsToTarget): Ditto.
824         * svg/SVGCircleElement.cpp:
825         (WebCore::SVGCircleElement::svgAttributeChanged): Ditto.
826         * svg/SVGEllipseElement.cpp:
827         (WebCore::SVGEllipseElement::svgAttributeChanged): Ditto.
828         * svg/SVGFEImageElement.cpp:
829         (WebCore::SVGFEImageElement::notifyFinished): Ditto.
830         * svg/SVGForeignObjectElement.cpp:
831         (WebCore::SVGForeignObjectElement::svgAttributeChanged): Ditto.
832         * svg/SVGGElement.cpp:
833         (WebCore::SVGGElement::svgAttributeChanged): Ditto.
834         * svg/SVGImageElement.cpp:
835         (WebCore::SVGImageElement::svgAttributeChanged): Ditto.
836         * svg/SVGLineElement.cpp:
837         (WebCore::SVGLineElement::svgAttributeChanged): Ditto.
838         * svg/SVGPathElement.cpp:
839         (WebCore::SVGPathElement::svgAttributeChanged): Ditto.
840         * svg/SVGPolyElement.cpp:
841         (WebCore::SVGPolyElement::svgAttributeChanged): Ditto.
842         * svg/SVGRectElement.cpp:
843         (WebCore::SVGRectElement::svgAttributeChanged): Ditto.
844         * svg/SVGSVGElement.cpp:
845         (WebCore::SVGSVGElement::setCurrentScale): Ditto.
846         (WebCore::SVGSVGElement::svgAttributeChanged): Ditto.
847         (WebCore::SVGSVGElement::inheritViewAttributes): Ditto.
848         * svg/SVGStopElement.cpp:
849         (WebCore::SVGStopElement::SVGStopElement): Changed m_offset initialization from 0.0f to 0.
850         (WebCore::SVGStopElement::svgAttributeChanged): Add missing implementation, calling RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer) on offsetAttr changes.
851         * svg/SVGStopElement.h:
852         * svg/SVGStyledElement.cpp:
853         (WebCore::SVGStyledElement::svgAttributeChanged): Don't call invalidateResourceInAncestorChain() on every attribute change, do it in all classes inheriting from us,
854                                                           for specific attributes. Also stop calling RenderSVGResource::invalidateAllResourcesOfRenderer(), all handled in the render tree now.
855         (WebCore::SVGStyledElement::invalidateResourceClients): Early exit, if document is still parsing.
856         * svg/SVGStyledElement.h:
857         * svg/SVGTRefElement.cpp:
858         (WebCore::SVGTRefElement::svgAttributeChanged): Call RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer) instead of renderer->setNeedsLayout(true).
859         * svg/SVGTextElement.cpp:
860         (WebCore::SVGTextElement::svgAttributeChanged): Ditto.
861         * svg/SVGTextPathElement.cpp:
862         (WebCore::SVGTextPathElement::svgAttributeChanged): Ditto.
863         * svg/SVGTextPositioningElement.cpp:
864         (WebCore::SVGTextPositioningElement::svgAttributeChanged): Ditto.
865         * svg/SVGUseElement.cpp:
866         (WebCore::SVGUseElement::svgAttributeChanged): Ditto.
867         (WebCore::SVGUseElement::updateContainerSizes): Ditto.
868         (WebCore::SVGUseElement::updateContainerOffsets): Ditto.
869
870 2010-07-16  Cosmin Truta  <ctruta@chromium.org>
871
872         Reviewed by Eric Seidel.
873
874         Some SVGs with empty <g> elements crash Chromium on Linux
875         https://bugs.webkit.org/show_bug.cgi?id=41175
876
877         Avoid painting of zero-sized image buffers. Skia can't handle it.
878
879         Test: svg/filters/filter-empty-g.svg
880
881         * WebCore/platform/graphics/skia/ImageBufferSkia.cpp:
882         (ImageBuffer::ImageBuffer):
883
884 2010-07-16  Nate Chapin  <japhet@chromium.org>
885
886         Reviewed by Darin Fisher.
887
888         Regression in r63100: Don't clear m_loadType in
889         FrameLoader::handledOnloadEvents, as it is used
890         to make some decisions after the load has actually
891         completed.
892
893         Tickling this bug requires manipulation
894         via the API (layout tests don't appear to traverse
895         the correct codepath), so no layout test.
896
897         https://bugs.webkit.org/show_bug.cgi?id=42298
898
899         * loader/FrameLoader.cpp:
900         (WebCore::FrameLoader::handledOnloadEvents): Don't reset m_loadType.
901         (WebCore::FrameLoader::addExtraFieldsToRequest): Set subresource cache
902            policy in one place and don't depend on m_loadType.
903
904 2010-07-15  Shinichiro Hamaji  <hamaji@chromium.org>
905
906         Reviewed by Darin Adler.
907
908         Printing test results differ between machines, we should use ImageDiff instead
909         https://bugs.webkit.org/show_bug.cgi?id=20011
910
911         Added spoolAllPagesWithBoundaries into PrintContext.
912
913         Test: printing/setPrinting.html
914
915         * WebCore.base.exp:
916         * page/PrintContext.cpp:
917         (WebCore::PrintContext::spoolAllPagesWithBoundaries):
918         * page/PrintContext.h:
919
920 2010-07-15  Kent Tamura  <tkent@chromium.org>
921
922         Unreviewed, small style fixes.
923
924         * platform/chromium/ThemeChromiumMac.mm:
925         (WebCore::ThemeChromiumMac::inflateControlPaintRect):
926         * platform/mac/ThemeMac.mm:
927         (WebCore::ThemeMac::inflateControlPaintRect):
928
929 2010-07-15  Adam Barth  <abarth@webkit.org>
930
931         Reviewed by Eric Seidel.
932
933         Update LegacyHTMLTreeBuilder to insert whitespace between </head> and <body>
934         https://bugs.webkit.org/show_bug.cgi?id=42431
935
936         Insert these whitespace text nodes into the HTML element between <head>
937         and <body>, as required by HTML5.  Previously, we just dropped them on
938         the floor.
939
940         * html/LegacyHTMLTreeBuilder.cpp:
941         (WebCore::LegacyHTMLTreeBuilder::handleError):
942
943 2010-07-15  Victor Wang  <victorw@chromium.org>
944
945         Reviewed by David Levin.
946
947         [chromium] update KURLGoogle decodeURLEscapeSequences to
948         use googleurl public api so it does not access functions in
949         url_canon_internal. This is for chromium multi-dll build.
950
951         https://bugs.webkit.org/show_bug.cgi?id=42177
952
953         Test: (unittest) WebKit\chromium\tests\KURLTest.cpp
954
955         * platform/KURLGoogle.cpp:
956         (WebCore::decodeURLEscapeSequences):
957
958 2010-07-15  Kent Tamura  <tkent@chromium.org>
959
960         Reviewed by Eric Seidel.
961
962         [Chromium] Update ThemeChromiumMac.mm for the recent changes of ThemeMac.mm
963         https://bugs.webkit.org/show_bug.cgi?id=41932
964
965         Sync with ThemeMac.mm r61760.
966         This change doesn't contain r54299, r57603, r57734, r57741, and
967         r58533 because they conflict with Chromium change for
968         FlippedView().
969
970         * platform/chromium/ThemeChromiumMac.mm:
971         (WebCore::sizeFromNSControlSize):
972         (WebCore::sizeFromFont):
973         (WebCore::controlSizeFromPixelSize):
974         (WebCore::setControlSize):
975         (WebCore::convertControlStatesToThemeDrawState):
976         (WebCore::stepperSizes):
977         (WebCore::stepperControlSizeForFont):
978         (WebCore::paintStepper):
979         (WebCore::ThemeChromiumMac::controlSize):
980         (WebCore::ThemeChromiumMac::minimumControlSize):
981         (WebCore::ThemeChromiumMac::inflateControlPaintRect):
982         (WebCore::ThemeChromiumMac::paint):
983
984 2010-07-15  MORITA Hajime  <morrita@google.com>
985
986         Reviewed by David Levin.
987
988         [Chromium][Win] Crashes with <keygen> with huge padding.
989         https://bugs.webkit.org/show_bug.cgi?id=41737
990
991         When we try to draw a large region, TransparencyWin can fail to
992         allocate a temporal buffer for composition.  This change adds a
993         fallback path to ThemePainter to handle the buffer allocation
994         failure.
995
996         ThemePainter is no longer a subclass of TransparencyWin.  It has
997         a TransparencyWin as a member.
998
999         Test: fast/forms/large-parts.html
1000
1001         * rendering/RenderThemeChromiumWin.cpp:
1002         (WebCore::ThemePainter): Added a fallback path.
1003
1004 2010-07-15  Yuzo Fujishima  <yuzo@google.com>
1005
1006         Reviewed by Darin Adler.
1007
1008         Fix for Bug 42362 - CSSSegmentedFontFace::isLoaded() const is not used anywhere
1009         Remove the method.
1010         https://bugs.webkit.org/show_bug.cgi?id=42362
1011
1012         No new tests because of no behavior changes.
1013
1014         * css/CSSSegmentedFontFace.cpp:
1015         * css/CSSSegmentedFontFace.h:
1016
1017 2010-07-15  Erik Arvidsson  <arv@chromium.org>
1018
1019         Reviewed by David Levin.
1020
1021         Add directional property enums to the switch in applyProperty
1022         https://bugs.webkit.org/show_bug.cgi?id=42438
1023
1024         Build fix for chromium mac.
1025
1026         * css/CSSStyleSelector.cpp:
1027         (WebCore::CSSStyleSelector::applyProperty):
1028
1029 2010-07-13  Zhenyao Mo  <zmo@google.com>
1030
1031         Reviewed by Nate Chapin.
1032
1033         bufferData and bufferSubData generate wrong error when null buffer is bound
1034         https://bugs.webkit.org/show_bug.cgi?id=42125
1035
1036         * html/canvas/WebGLRenderingContext.cpp:
1037         (WebCore::WebGLRenderingContext::bufferData): Call validateBufferDataParameters().
1038         (WebCore::WebGLRenderingContext::bufferSubData): Ditto.
1039         (WebCore::WebGLRenderingContext::validateBufferDataParameters): Parameters validation for buffer{Sub}Data().
1040         * html/canvas/WebGLRenderingContext.h: Declare validateBufferDataParameters().
1041
1042 2010-07-15  Jay Civelli  <jcivelli@chromium.org>
1043
1044         Reviewed by David Levin.
1045
1046         [chromium] Making the popup label color visible when the item is
1047         selected.
1048         https://bugs.webkit.org/show_bug.cgi?id=42271
1049
1050         * platform/chromium/PopupMenuChromium.cpp:
1051         (WebCore::PopupListBox::paintRow): paint the label text with a
1052         different color when it is selected. 
1053
1054 2010-07-13  Zhenyao Mo  <zmo@google.com>
1055
1056         Reviewed by Nate Chapin.
1057
1058         WebGL rendering results must be made available to Canvas.toDataURL and 2D drawImage
1059         https://bugs.webkit.org/show_bug.cgi?id=34719
1060
1061         Tests: fast/canvas/webgl/canvas-test.html
1062                fast/canvas/webgl/gl-pixelstorei.html
1063
1064         * html/HTMLCanvasElement.cpp:
1065         (WebCore::HTMLCanvasElement::makeRenderingResultsAvailable): Paint the WebGL rendering results to canvas if it's 3d.
1066         (WebCore::HTMLCanvasElement::toDataURL): Paint the WebGL rendering results to canvas if it's 3d.
1067         * html/canvas/CanvasRenderingContext2D.cpp:
1068         (WebCore::CanvasRenderingContext2D::drawImage): Paint the WebGL rendering results to canvas if it's 3d before drawing.
1069         * html/canvas/WebGLRenderingContext.cpp:
1070         (WebCore::WebGLRenderingContext::markContextChanged): Mark it always for canvas2d.drawImage purpose.
1071         (WebCore::WebGLRenderingContext::paintRenderingResultsToCanvas): Paint the WebGL rendering results to canvas if it's dirty.
1072         * html/canvas/WebGLRenderingContext.h: Declare paintRenderingResultsToCanvas().
1073         * platform/graphics/GraphicsContext3D.h: Declare paintRenderingResultsToCanvas() & paintToCanvas().
1074         * platform/graphics/cg/GraphicsContext3DCG.cpp:
1075         (WebCore::GraphicsContext3D::paintToCanvas): Paint the rendered image pixels to the canvas.
1076         * platform/graphics/mac/GraphicsContext3DMac.mm:
1077         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): Implement paintRenderingResultsToCanvas().
1078         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1079         (WebCore::GraphicsContext3D::beginPaint): Just call paintRenderingResultsToCanvas().
1080         (WebCore::GraphicsContext3D::endPaint):
1081         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): Implement paintRenderingResultsToCanvas().
1082
1083 2010-07-15  Nico Weber  <thakis@chromium.org>
1084
1085         Reviewed by Ojan Vafai.
1086
1087         chromium/skia: Fix canvas.toDataURL in the presence of transparency
1088         https://bugs.webkit.org/show_bug.cgi?id=42214
1089
1090         The problem was that SkBitmaps contain premultiplied data, but pnglib
1091         doesn't expect premultiplied data. Now, the encoder unpremultiplies
1092         data before sending it to pnglib.
1093
1094         Patch partially by deanm.
1095
1096         Covered by fast/canvas/toDataURL-alpha.html.
1097
1098         * platform/image-encoders/skia/PNGImageEncoder.cpp:
1099         (WebCore::preMultipliedBGRAtoRGBA):
1100         (WebCore::encodeImpl):
1101         (WebCore::PNGImageEncoder::encode):
1102
1103 2010-07-15  Alex Nicolaou  <anicolao@chromium.org>
1104
1105         Reviewed by Eric Seidel.
1106
1107         Convolution computation causes bad alpha channel values
1108         https://bugs.webkit.org/show_bug.cgi?id=42273
1109
1110         Fixed by clamping colour channel values to the alpha value so that 
1111         r <= a, g <= a, and b <= a after the convolution is applied. See
1112         the bug for why I believe the SVG specification needs to be updated. 
1113         Test must be drawn to crash. 100x100 green rectangle is used to 
1114         indicate pass to minimize the chance of regression.
1115
1116         Test: svg/custom/convolution-crash.svg
1117
1118         * platform/graphics/skia/SkiaUtils.cpp:
1119         (WebCore::SkPMColorToColor):
1120         * svg/graphics/filters/SVGFEConvolveMatrix.cpp:
1121         (WebCore::clampRGBAValue):
1122         (WebCore::setDestinationPixels):
1123         (WebCore::FEConvolveMatrix::fastSetInteriorPixels):
1124         (WebCore::FEConvolveMatrix::fastSetOuterPixels):
1125
1126 2010-07-15  Dumitru Daniliuc  <dumi@chromium.org>
1127
1128         Unreviewed, Chromium-specific changes that I forgot to make in r63278.
1129
1130         1. DatabaseTrackerChromium::getMaxSizeForDatabase() is called on
1131         the context thread by sync DBs.
1132         2. Forgot to change V8SQLTransactionSyncCustom to return the
1133         result set when executeSql() is called.
1134
1135         * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
1136         (WebCore::V8SQLTransactionSync::executeSqlCallback):
1137         * storage/chromium/DatabaseTrackerChromium.cpp:
1138         (WebCore::DatabaseTracker::getMaxSizeForDatabase):
1139
1140 2010-07-15  Martin Robinson  <mrobinson@igalia.com>
1141
1142         Reviewed by Oliver Hunt.
1143
1144         [GTK] Simplify the distribution step
1145         https://bugs.webkit.org/show_bug.cgi?id=42414
1146
1147         No new tests as this is just a build change.
1148
1149         * GNUmakefile.am: Modify EXTRA_DIST directly and make sure the list
1150         of files is sorted. Also handle distributing the IDL files from the
1151         WebCore source tree.
1152
1153 2010-07-15  Eric Seidel  <eric@webkit.org>
1154
1155         Reviewed by Adam Barth.
1156
1157         LegacyHTMLTreeBuilder should insert an implicit <colgroup> before inserting <col> to match HTML5
1158         https://bugs.webkit.org/show_bug.cgi?id=42346
1159
1160         This turned out to be an easy fix.
1161
1162         This is covered by lots of layout tests.  I believe
1163         all of the changed results to be progressions.
1164
1165         This change had no measurable effect on the parser benchmark.
1166
1167         * html/LegacyHTMLTreeBuilder.cpp:
1168         (WebCore::LegacyHTMLTreeBuilder::colCreateErrorCheck):
1169         (WebCore::LegacyHTMLTreeBuilder::getNode):
1170         * html/LegacyHTMLTreeBuilder.h:
1171
1172 2010-07-15  Sam Weinig  <sam@webkit.org>
1173
1174         Reviewed by Oliver Hunt.
1175
1176         Patch for https://bugs.webkit.org/show_bug.cgi?id=42410
1177         Many leaking DatasetDOMStringMaps seen on buildbot
1178
1179         * dom/NodeRareData.h:
1180         (WebCore::NodeRareData::~NodeRareData): Add a virtual destructor so
1181         that the ElementRareData's destructor will be called when this is deleted
1182         from the Node's destructor.
1183
1184 2010-07-15  Chris Fleizach  <cfleizach@apple.com>
1185
1186         Reviewed by Darin Adler.
1187
1188         AX: Crash when table has empty thead tag
1189         https://bugs.webkit.org/show_bug.cgi?id=42391
1190
1191         Test: accessibility/table-with-empty-thead-causes-crash.html
1192
1193         * accessibility/AccessibilityTableColumn.cpp:
1194         (WebCore::AccessibilityTableColumn::headerObjectForSection):
1195
1196 2010-07-15  Anders Carlsson  <andersca@apple.com>
1197
1198         Reviewed by Sam Weinig.
1199
1200         Start loading plug-in streams
1201         https://bugs.webkit.org/show_bug.cgi?id=42407
1202
1203         Export some ResourceRequestBase getters.
1204
1205         * WebCore.exp.in:
1206
1207 2010-07-15  Kenneth Russell  <kbr@google.com>
1208
1209         Reviewed by Nate Chapin.
1210
1211         Query of NUM_COMPRESSED_TEXTURE_FORMATS must be handled by WebGL
1212         https://bugs.webkit.org/show_bug.cgi?id=42401
1213
1214         No new tests; covered by gl-get-calls.html.
1215
1216         * html/canvas/WebGLRenderingContext.cpp:
1217         (WebCore::WebGLRenderingContext::getParameter):
1218          - Return 0 for getParameter(NUM_COMPRESSED_TEXTURE_FORMATS).
1219
1220 2010-07-07  John Gregg  <johnnyg@google.com>
1221
1222         Reviewed by Jian Li.
1223
1224         Experimental directory upload feature.
1225         https://bugs.webkit.org/show_bug.cgi?id=40872
1226
1227         This patch adds a new HTML attribute webkitdirectory which applies to 
1228         <input type="file"> tags and allows the user to specify a folder
1229         which is recursively enumerated so that all the files in that folder
1230         are added to the file list.
1231
1232         The files chosen in that way have a .webkitRelativePath attribute which contains
1233         the relative path starting from the chosen folder.  The relative path is
1234         also appended to each item in the FormData when uploaded.
1235
1236         All the code is behind an ENABLE_DIRECTORY_UPLOAD flag.
1237
1238         Test: fast/forms/input-file-directory-upload.html
1239
1240         * html/Blob.cpp:
1241         (WebCore::Blob::Blob):
1242         * html/Blob.h:
1243         * html/File.cpp:
1244         (WebCore::File::File):
1245         (WebCore::File::Init):
1246         (WebCore::File::webkitRelativePath):
1247         * html/File.h:
1248         (WebCore::File::create):
1249         * html/File.idl:
1250         * html/HTMLAttributeNames.in: add webkitdirectory attribute
1251         * html/HTMLInputElement.cpp:
1252         (WebCore::HTMLInputElement::setFileListFromRenderer):
1253         (WebCore::HTMLInputElement::webkitdirectory):
1254         * html/HTMLInputElement.h:
1255         * html/HTMLInputElement.idl:
1256         * platform/BlobItem.cpp:
1257         (WebCore::FileBlobItem::create):
1258         (WebCore::FileBlobItem::FileBlobItem):
1259         * platform/BlobItem.h:
1260         (WebCore::FileBlobItem::relativePath):
1261         * platform/FileChooser.h:
1262         (WebCore::FileChooser::allowsDirectoryUpload):
1263         * platform/network/FormData.cpp:
1264         (WebCore::FormData::appendKeyValuePairItems):
1265         * rendering/RenderFileUploadControl.cpp:
1266         (WebCore::RenderFileUploadControl::allowsMultipleFiles):
1267         (WebCore::RenderFileUploadControl::allowsDirectoryUpload):
1268         * rendering/RenderFileUploadControl.h:
1269
1270 2010-07-15  Simon Fraser  <simon.fraser@apple.com>
1271
1272         Reviewed by Dan Bernstein.
1273
1274         Avoid creating huge compositing layers for elements that project outside the viewport
1275         https://bugs.webkit.org/show_bug.cgi?id=42338
1276
1277         The logic that computed the bounds of compositing layers naively used the
1278         union of the bounds of descendant, non-composited RenderLayers, without regard
1279         to what is actually visible. This could result in huge layers for page with
1280         elements are large negative offsets, or with large negative text-indent (both
1281         common).
1282         
1283         For elements without transforms on them or in their ancestor chain, and when
1284         no 3d transforms or hardware-accelerated animations are used, can clip compositing
1285         layers to the size of the document, or based on CSS overflow and clip.
1286
1287         Tests: compositing/geometry/limit-layer-bounds-clipping-ancestor.html
1288                compositing/geometry/limit-layer-bounds-fixed-positioned.html
1289                compositing/geometry/limit-layer-bounds-overflow-repaint.html
1290                compositing/geometry/limit-layer-bounds-positioned-transition.html
1291                compositing/geometry/limit-layer-bounds-positioned.html
1292                compositing/geometry/limit-layer-bounds-transformed-overflow.html
1293                compositing/geometry/limit-layer-bounds-transformed.html
1294
1295         * rendering/RenderLayerBacking.cpp:
1296         (WebCore::enclosingOverflowClipAncestor):  Walk up the RenderLayer tree
1297         looking for an ancestor that has overflow, or to the root. Along the way, check for
1298         transformed elements.
1299         (WebCore::RenderLayerBacking::updateCompositedBounds):  If we're in "consult
1300         overlap" mode, and we don't have transforms, then constrain the bounds
1301         of composited layers by the RenderView's layoutOverflowRect(), or by the
1302         enclosing layer with overflow.
1303         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): If the offset from the renderer changes,
1304         we need to repaint the layer.
1305
1306 2010-07-15  Alex Nicolaou  <anicolao@chromium.org>
1307
1308         Reviewed by Dirk Schulze.
1309
1310         https://bugs.webkit.org/show_bug.cgi?id=42228
1311         
1312         SVG Masks were in the wrong colour space for non-CG graphics layers,
1313         because for those cases ImageBuffer needs to be explicitly told to
1314         convert the pixels. This change adds a test that demonstrates the
1315         problem and the conversion call to make the mask LinearRGB.
1316
1317         Test: svg/custom/mask-colorspace.svg
1318
1319         * rendering/RenderSVGResourceMasker.cpp:
1320         (WebCore::RenderSVGResourceMasker::createMaskImage):
1321
1322 2010-07-15  Daniel Bates  <dbates@rim.com>
1323
1324         Reviewed by Darin Adler.
1325
1326         [Mac] Implement LayoutTestController::markerTextForListItem()
1327         https://bugs.webkit.org/show_bug.cgi?id=37929
1328
1329         Export symbols for WebCore::markerTextForListItem() and WebCore::toElement().
1330
1331         * WebCore.exp.in:
1332
1333 2010-07-15  Andreas Kling  <andreas.kling@nokia.com>
1334
1335         Rubber-stamped by Kenneth Rohde Christiansen.
1336
1337         [Qt] Remove an unused variable in BitmapImage::draw()
1338
1339         * platform/graphics/qt/ImageQt.cpp:
1340         (WebCore::BitmapImage::draw): Remove selfSize.
1341
1342 2010-07-15  Yury Semikhatsky  <yurys@chromium.org>
1343
1344         Reviewed by Pavel Feldman.
1345
1346         Web Inspector: pass all parameters to WebInspector.addConsoleMessage as a single payload object
1347         https://bugs.webkit.org/show_bug.cgi?id=42345
1348
1349         This refactoring is covered by existing console tests.
1350
1351         * bindings/js/ScriptArray.cpp:
1352         (WebCore::ScriptArray::set):
1353         * bindings/js/ScriptArray.h:
1354         (WebCore::ScriptArray::ScriptArray):
1355         (WebCore::ScriptArray::jsArray):
1356         * bindings/v8/ScriptArray.cpp:
1357         (WebCore::ScriptArray::set):
1358         * bindings/v8/ScriptArray.h:
1359         (WebCore::ScriptArray::ScriptArray):
1360         (WebCore::ScriptArray::~ScriptArray):
1361         * inspector/ConsoleMessage.cpp:
1362         (WebCore::ConsoleMessage::addToFrontend):
1363         * inspector/InspectorFrontend.cpp:
1364         (WebCore::InspectorFrontend::addConsoleMessage):
1365         * inspector/InspectorFrontend.h:
1366         * inspector/front-end/ConsoleView.js:
1367         (WebInspector.ConsoleView.prototype.updateMessageRepeatCount):
1368         (WebInspector.ConsoleMessage):
1369         (WebInspector.ConsoleMessage.createTextMessage):
1370         (WebInspector.ConsoleCommandResult):
1371         * inspector/front-end/ElementsPanel.js:
1372         (WebInspector.ElementsPanel.prototype.generateStylesheet):
1373         * inspector/front-end/InjectedScriptAccess.js:
1374         (InjectedScriptAccess._installHandler.InjectedScriptAccess.prototype.methodName.myCallback):
1375         (InjectedScriptAccess._installHandler.InjectedScriptAccess.prototype.methodName):
1376         (InjectedScriptAccess._installHandler):
1377         * inspector/front-end/Resource.js:
1378         (WebInspector.Resource.prototype._checkWarning):
1379         * inspector/front-end/inspector.js:
1380         (WebInspector.updateConsoleMessageExpiredCount):
1381         (WebInspector.addConsoleMessage):
1382         (WebInspector.log.logMessage):
1383         (WebInspector.log):
1384
1385 2010-07-14  Tony Gentilcore  <tonyg@chromium.org>
1386
1387         Reviewed by Darin Fisher.
1388
1389         Backfill DNS and connect times rather than exposing hard zeros
1390         https://bugs.webkit.org/show_bug.cgi?id=42303
1391
1392         There are several cases where domain lookup is not performed and/or a new connection is not established. Previously in these cases, we exposed a "0" to the API. Now, we instead "backfill" with the most recent mark's time.
1393
1394         Also, previously, I was using the ResourceLoadTiming API incorrectly. Each mark is an integer representing offset in milliseconds from requestTime. So all values need to be added to requestTime.
1395
1396         No new test because existing test expectations are set to FAIL because disable disabled by default. The expected results of existings tests change as expected when enabled.
1397
1398         * page/Timing.cpp:
1399         (WebCore::toIntegerMilliseconds): Move to file static instead of class static because it might generate more optimal code. Also, instead of converting negative doubles to zero, ASSERT that they are >= 0. This is because we no longer expose hard zeros for DNS and connect, so we want to be sure that the -1s returned by the API are properly handled.
1400         (WebCore::Timing::domainLookupStart):
1401         (WebCore::Timing::domainLookupEnd):
1402         (WebCore::Timing::connectStart):
1403         (WebCore::Timing::connectEnd):
1404         (WebCore::Timing::requestStart):
1405         (WebCore::Timing::requestEnd):
1406         (WebCore::Timing::responseStart):
1407         * page/Timing.h:
1408
1409 2010-07-15  Pavel Feldman  <pfeldman@chromium.org>
1410
1411         Reviewed by Yury Semikhatsky.
1412
1413         Web Inspector: differentiate between blocking and connecting timers.
1414
1415         https://bugs.webkit.org/show_bug.cgi?id=42372
1416
1417         * inspector/InspectorResource.cpp:
1418         (WebCore::InspectorResource::InspectorResource):
1419         (WebCore::InspectorResource::updateResponse):
1420         (WebCore::InspectorResource::updateScriptObject):
1421         (WebCore::InspectorResource::buildObjectForTiming):
1422         * inspector/InspectorResource.h:
1423         * inspector/front-end/Resource.js:
1424         (WebInspector.Resource.prototype.get cached):
1425         (WebInspector.Resource.prototype.set cached):
1426         * inspector/front-end/ResourcesPanel.js:
1427         (WebInspector.ResourcesPanel.prototype._showPopover):
1428         (WebInspector.ResourceGraph):
1429         (WebInspector.ResourceGraph.prototype.refresh):
1430         (WebInspector.ResourceGraph.prototype._cachedChanged):
1431         * inspector/front-end/inspector.js:
1432         (WebInspector.updateResource):
1433         * loader/FrameLoader.cpp:
1434         (WebCore::FrameLoader::loadedResourceFromMemoryCache):
1435         * loader/FrameLoader.h:
1436         * platform/network/ResourceResponseBase.cpp:
1437         (WebCore::ResourceResponseBase::ResourceResponseBase):
1438         (WebCore::ResourceResponseBase::connectionReused):
1439         (WebCore::ResourceResponseBase::setConnectionID):
1440         * platform/network/ResourceResponseBase.h:
1441
1442 2010-07-15  MORITA Hajime  <morrita@google.com>
1443
1444         Text layout is wrong with a SVG Font that lacks <missing-glyph> element
1445         https://bugs.webkit.org/show_bug.cgi?id=42352
1446
1447         floatWidthOfSubStringUsingSVGFont() calculated a wrong value for a
1448         sub-run, and a fallback to system font triggers such a computation.
1449         This change made floatWidthOfSubStringUsingSVGFont() to deal with
1450         sub-runs.
1451         
1452         Test: svg/custom/svg-fonts-without-missing-glyph.xhtml
1453
1454         * svg/SVGFont.cpp:
1455         (WebCore::floatWidthOfSubStringUsingSVGFont):
1456
1457 2010-07-15  Nikolas Zimmermann  <nzimmermann@rim.com>
1458
1459         Reviewed by Dirk Schulze.
1460
1461         Cycle detection needs to include shadow tree
1462         https://bugs.webkit.org/show_bug.cgi?id=42360
1463
1464         Search for cycles in shadow tree fragments as well. Extended the svg/custom/recursion-* tests. No more crashes in any of them.
1465
1466         * rendering/RenderSVGResourceContainer.h:
1467         (WebCore::RenderSVGResourceContainer::containsCyclicReference):
1468         * rendering/RenderSVGShadowTreeRootContainer.cpp: Implemented here, not inline, so that clients don't need to include SVGShadowTreeElements.h
1469         (WebCore::RenderSVGShadowTreeRootContainer::rootElement): Expose helper function, that returns the shadow tree root element as Node*.
1470         * rendering/RenderSVGShadowTreeRootContainer.h:
1471
1472 2010-07-15  Nikolas Zimmermann  <nzimmermann@rim.com>
1473
1474         Reviewed by Dirk Schulze.
1475
1476         clipPath is missing cycle detection
1477         https://bugs.webkit.org/show_bug.cgi?id=42350
1478
1479         Detect cyclic clipper resources, and ignore them on rendering. Early exit in applyResource just like the pattern/mask resources do.
1480
1481         * rendering/RenderSVGResourceClipper.cpp:
1482         (WebCore::RenderSVGResourceClipper::applyResource):
1483         (WebCore::RenderSVGResourceClipper::hitTestClipContent):
1484         (WebCore::RenderSVGResourceClipper::childElementReferencesResource):
1485         * rendering/RenderSVGResourceClipper.h:
1486
1487 2010-07-15  Mark Rowe  <mrowe@apple.com>
1488
1489         Reviewed by Maciej Stachowiak.
1490
1491         Fix a leak of Vector instances seen on the build bot.
1492
1493         * rendering/RenderObject.cpp:
1494         (WebCore::RenderObject::drawBoxSideFromPath): Don't unnecessarily heap allocate then leak the DashArray.
1495
1496 2010-07-15  Mark Rowe  <mrowe@apple.com>
1497
1498         Update the sorting in the Xcode project files.
1499
1500         * WebCore.xcodeproj/project.pbxproj:
1501
1502 2010-07-15  Nikolas Zimmermann  <nzimmermann@rim.com>
1503
1504         Reviewed by Eric Seidel.
1505
1506         SVG patterns and masks should not be able to reference themselves
1507         https://bugs.webkit.org/show_bug.cgi?id=32171
1508
1509         Pattern still had an issue, when using constructs like:
1510         <pattern id="pattern1" xlink:href="#pattern2"/>
1511         <pattern id="pattern2"><rect fill="url(#pattern1)"/></pattern>
1512
1513         Extended test svg/custom/recursive-pattern.svg to cover this situation.
1514
1515         * rendering/RenderSVGResourcePattern.cpp:
1516         (WebCore::RenderSVGResourcePattern::applyResource): Don't perform the cycle check against node()...
1517         (WebCore::RenderSVGResourcePattern::createTileImage): .. but against the "patternContentElement" which respect the xlink:href chaining.
1518
1519 2010-07-15  Nikolas Zimmermann  <nzimmermann@rim.com>
1520
1521         Reviewed by Adam Barth.
1522
1523         Pixel test failure in moving-shadow-on-path.html and moving-shadow-on-container.html
1524         https://bugs.webkit.org/show_bug.cgi?id=42249
1525
1526         Partly revert <http://trac.webkit.org/changeset/63307>. The RenderSVGRoot change caused a pixel test regression in two fast/repaint tests.
1527
1528         * rendering/RenderSVGRoot.cpp:
1529         (WebCore::RenderSVGRoot::layout): Include selfNeedsLayout() check in LayoutStateRepainter argument.
1530
1531 2010-07-14  Sheriff Bot  <webkit.review.bot@gmail.com>
1532
1533         Unreviewed, rolling out r63352.
1534         http://trac.webkit.org/changeset/63352
1535         https://bugs.webkit.org/show_bug.cgi?id=42341
1536
1537         Broke plugin-initiate-popup-window.html and plugin-javascript-
1538         access.html on snow leopard (Requested by abarth on #webkit).
1539
1540         * bindings/v8/NPV8Object.cpp:
1541         (_NPN_EvaluateHelper):
1542
1543 2010-07-14  Eric Seidel  <eric@webkit.org>
1544
1545         Reviewed by Adam Barth.
1546
1547         Make the LegacyHTMLTreeBuilder coalesce text nodes
1548         https://bugs.webkit.org/show_bug.cgi?id=42314
1549
1550         This is slightly tricky as we're side-stepping the old
1551         parsers insertion logic in the cases where we know we can
1552         safely merge text into an existing text node instead of
1553         inserting a new one.
1554
1555         This affects lots of tests (which will need to change for
1556         the HTML5 TreeBuilder anyway) and causes the LegacyHTMLTreeBuilder
1557         to now pass a bunch more subtests in html5lib/runner.html.
1558
1559         The parser benchmark thinks that this is a small speedup.
1560         I think I happen to have been lucky enough to get the right
1561         cache alignment, and that this is likely a wash.
1562
1563         * html/LegacyHTMLTreeBuilder.cpp:
1564         (WebCore::LegacyHTMLTreeBuilder::parseToken):
1565
1566 2010-07-14  Evan Stade  <estade@chromium.org>
1567
1568         Reviewed by Kent Tamura.
1569
1570         [chromium] Linux scrollbar steppers are "clickable" even when disabled
1571         https://bugs.webkit.org/show_bug.cgi?id=42231
1572
1573         Not tested by layout tests.
1574
1575         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
1576         (WebCore::ScrollbarThemeChromiumLinux::paintButton):
1577
1578 2010-07-14  Sheriff Bot  <webkit.review.bot@gmail.com>
1579
1580         Unreviewed, rolling out r63389.
1581         http://trac.webkit.org/changeset/63389
1582         https://bugs.webkit.org/show_bug.cgi?id=42311
1583
1584         It broke the Chromium Linux build. (Requested by dave_levin on
1585         #webkit).
1586
1587         * platform/KURLGoogle.cpp:
1588         (WebCore::decodeURLEscapeSequences):
1589
1590 2010-07-13  Mirko Damiani  <mirko@develer.com>
1591
1592         Reviewed by Simon Hausmann.
1593
1594         [Qt] CSS border style not cleared for SVG object
1595         https://bugs.webkit.org/show_bug.cgi?id=42150
1596
1597         For tests and description see:
1598         https://bugs.webkit.org/show_bug.cgi?id=25738
1599
1600         * platform/graphics/qt/GraphicsContextQt.cpp:
1601         (WebCore::GraphicsContext::setLineDash):
1602
1603 2010-07-14  Adam Barth  <abarth@webkit.org>
1604
1605         Reviewed by Eric Seidel.
1606
1607         HTMLTreeBuilder shouldn't crash during fast/parser/remove-parser-current-node.html
1608         https://bugs.webkit.org/show_bug.cgi?id=42312
1609
1610         We were crashing because of an ASSERT I added to the attach logic in
1611         the HTMLConstructionSite.  I knew this ASSERT was wrong when I added
1612         it, I just wanted to make sure we had test coverage of those cases.
1613         Turns out we do!  :)
1614
1615         * html/HTMLConstructionSite.cpp:
1616         (WebCore::HTMLConstructionSite::attach):
1617         (WebCore::HTMLConstructionSite::attachAtSite):
1618
1619 2010-07-14  Victor Wang  <victorw@chromium.org>
1620
1621         Reviewed by Darin Fisher.
1622
1623         [chromium] update KURLGoogle decodeURLEscapeSequences to
1624         use googleurl public api so it does not access functions in
1625         url_canon_internal. This is for chromium multi-dll build.
1626
1627         https://bugs.webkit.org/show_bug.cgi?id=42177
1628
1629         Test: (unittest) WebKit\chromium\tests\KURLTest.cpp
1630
1631         * platform/KURLGoogle.cpp:
1632         (WebCore::decodeURLEscapeSequences):
1633
1634 2010-07-14  Adam Barth  <abarth@webkit.org>
1635
1636         Reviewed by Eric Seidel.
1637
1638         Avoid extra memcpy of character tokens
1639         https://bugs.webkit.org/show_bug.cgi?id=42002
1640
1641         Eric tells me this patch makes the new tree builder 1% faster than the
1642         old tree builder on our parser benchmark.
1643
1644         * html/HTMLToken.h:
1645         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
1646         (WebCore::AtomicHTMLToken::characters):
1647         * html/HTMLTreeBuilder.cpp:
1648         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::ExternalCharacterTokenBuffer):
1649         (WebCore::convertToOldStyle):
1650         (WebCore::HTMLTreeBuilder::processFakeCharacters):
1651
1652 2010-07-14  Eric Seidel  <eric@webkit.org>
1653
1654         Reviewed by Adam Barth.
1655
1656         HTMLTreeBuilder foster parents when it should not
1657         https://bugs.webkit.org/show_bug.cgi?id=42235
1658
1659         Regarding foster parenting of nodes inside tables:
1660         "Process the token using the rules for the "in body" insertion mode,
1661         except that if the current node is a table, tbody, tfoot, thead, or
1662         tr element, then, whenever a node would be inserted into the current
1663         node, it must instead be foster parented."
1664
1665         We were forgetting the "when the current node is" part of that check
1666         and always foster parenting, even if we had just inserted another
1667         element (which would have just changed the current node).
1668
1669         This was covered by multiple tests in html5lib/runner.html
1670         but I wrote a reduction (one which I included) as it makes it
1671         easier to see what's going on.
1672
1673         * html/HTMLConstructionSite.cpp:
1674         (WebCore::HTMLNames::causesFosterParenting):
1675         (WebCore::HTMLConstructionSite::attach):
1676         (WebCore::HTMLConstructionSite::insertHTMLHtmlElement):
1677         (WebCore::HTMLConstructionSite::insertHTMLHeadElement):
1678         (WebCore::HTMLConstructionSite::insertHTMLBodyElement):
1679         (WebCore::HTMLConstructionSite::insertTextNode):
1680         (WebCore::HTMLConstructionSite::shouldFosterParent):
1681         * html/HTMLConstructionSite.h:
1682         * html/HTMLTreeBuilder.cpp:
1683         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
1684
1685 2010-07-14  Brady Eidson  <beidson@apple.com>
1686
1687         Reviewed by Mark Rowe.
1688
1689         <rdar://problem/8131355> Apps load stale versions of pages when initial load happens via back/forward navigation.
1690
1691         No test case is added because DumpRenderTree is not able to test the scenario where the initial load in a WebView
1692         occurs via a back/forward navigation.
1693
1694         * loader/FrameLoader.cpp:
1695         (WebCore::FrameLoader::navigateToDifferentDocument): When the first load in a page is a back/forward navigation, we
1696           shouldn't try to prefer cached data but should do revalidation by default.
1697         (WebCore::FrameLoader::addExtraFieldsToRequest): Ditto.
1698
1699 2010-07-14  James Robinson  <jamesr@chromium.org>
1700
1701         Reviewed by Darin Fisher.
1702
1703         Breaks all dependencies on Page from platform/ and cleans up GLES2Context lifetime
1704         https://bugs.webkit.org/show_bug.cgi?id=42203
1705
1706         Rather than constructing a GLES2Context from a Page, pass the LayerRendererChromium
1707         a GLES2Context in from the constructor.  This way the platform/ directory can remain
1708         ignorant of Page and friends.  Also adds functions on ChromeClientChromium to request
1709         onscreen and offscreen GLES2Contexts for callers in WebCore that need them.
1710
1711         * page/chromium/ChromeClientChromium.h:
1712         * platform/chromium/GLES2Context.h:
1713         * platform/graphics/chromium/LayerRendererChromium.cpp:
1714         (WebCore::LayerRendererChromium::create):
1715         (WebCore::LayerRendererChromium::LayerRendererChromium):
1716         * platform/graphics/chromium/LayerRendererChromium.h:
1717
1718 2010-07-14  Andreas Kling  <andreas.kling@nokia.com>
1719
1720         Reviewed by Darin Adler.
1721
1722         Add functions to extract individual RGBA32 components
1723         https://bugs.webkit.org/show_bug.cgi?id=42305
1724
1725         * html/canvas/CanvasRenderingContext2D.cpp:
1726         (WebCore::CanvasRenderingContext2D::willDraw): Use alphaChannel()
1727         * platform/graphics/Color.h:
1728         (WebCore::redChannel):
1729         (WebCore::greenChannel):
1730         (WebCore::blueChannel):
1731         (WebCore::alphaChannel):
1732         (WebCore::Color::red):
1733         (WebCore::Color::green):
1734         (WebCore::Color::blue):
1735         (WebCore::Color::alpha):
1736
1737 2010-07-14  Alexey Proskuryakov  <ap@apple.com>
1738
1739         Not reviewed.
1740
1741         https://bugs.webkit.org/show_bug.cgi?id=42201
1742         Use ResourceHandle object for synchronous loading
1743
1744         * platform/network/mac/ResourceHandleMac.mm:
1745         (WebCore::ResourceHandle::loadResourceSynchronously): Fix an obvious typo.
1746
1747 2010-07-14  Alexey Proskuryakov  <ap@apple.com>
1748
1749         Reviewed by Brady Eidson.
1750
1751         https://bugs.webkit.org/show_bug.cgi?id=42201
1752         Use ResourceHandle object for synchronous loading
1753
1754         Fix a Tiger test failure.
1755
1756         Setting NSURLRequest properties has been moved to createNSURLConnection to share code between
1757         sync and async cases, but on Tiger, we don't call this function.
1758
1759         There is more refactoring needed to make this nice, and we need to figure out if some of
1760         request-tweaking code in createNSURLConnection needs to run on every redirect, as it happens
1761         with CFNetwork version.
1762
1763         * platform/network/mac/ResourceHandleMac.mm:
1764         (WebCore::ResourceHandle::loadResourceSynchronously): Set main document for cookies, which is
1765         the only thing we've been missing.
1766
1767 2010-07-14  Mark Rowe  <mrowe@apple.com>
1768
1769         Rubber-stamped by Dan Bernstein.
1770
1771         * WebCore.xcodeproj/project.pbxproj: Silence rsync.
1772
1773 2010-07-14  Darin Adler  <darin@apple.com>
1774
1775         Reviewed by Gavin Barraclough.
1776
1777         Fix warning seen with newer gcc (on Qt buildbot).
1778
1779         * html/HTMLTreeBuilder.cpp:
1780         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
1781         Add parentheses around && expression.
1782
1783 2010-07-14  Adam Barth  <abarth@webkit.org>
1784
1785         Reviewed by Eric Seidel.
1786
1787         Avoid extra memcpy of character tokens
1788         https://bugs.webkit.org/show_bug.cgi?id=42002
1789
1790         This patch is just some cleanup to make fixing this bug easier.
1791
1792         * html/HTMLTreeBuilder.cpp:
1793         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::ExternalCharacterTokenBuffer):
1794         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::~ExternalCharacterTokenBuffer):
1795         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::isEmpty):
1796         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::skipLeadingWhitespace):
1797         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeLeadingWhitespace):
1798         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeRemaining):
1799         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::giveRemainingTo):
1800         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeRemainingWhitespace):
1801         (WebCore::HTMLTreeBuilder::processDoctypeToken):
1802         (WebCore::HTMLTreeBuilder::processStartTag):
1803         (WebCore::HTMLTreeBuilder::processEndTag):
1804         (WebCore::HTMLTreeBuilder::processComment):
1805         (WebCore::HTMLTreeBuilder::processCharacter):
1806         (WebCore::HTMLTreeBuilder::processCharacterBuffer):
1807         (WebCore::HTMLTreeBuilder::processEndOfFile):
1808         (WebCore::HTMLTreeBuilder::defaultForInitial):
1809         (WebCore::HTMLTreeBuilder::defaultForBeforeHTML):
1810         (WebCore::HTMLTreeBuilder::defaultForBeforeHead):
1811         (WebCore::HTMLTreeBuilder::defaultForInHead):
1812         (WebCore::HTMLTreeBuilder::defaultForInHeadNoscript):
1813         (WebCore::HTMLTreeBuilder::defaultForAfterHead):
1814         (WebCore::HTMLTreeBuilder::defaultForInTableText):
1815         * html/HTMLTreeBuilder.h:
1816
1817 2010-07-14  Andreas Kling  <andreas.kling@nokia.com>
1818
1819         Reviewed by Darin Adler.
1820
1821         Canvas: Don't add shadow rect to dirty region when shadow alpha is 0
1822         https://bugs.webkit.org/show_bug.cgi?id=42300
1823
1824         * html/canvas/CanvasRenderingContext2D.cpp:
1825         (WebCore::CanvasRenderingContext2D::willDraw):
1826
1827 2010-07-14  Kevin Ollivier  <kevino@theolliviers.com>
1828
1829         [CURL] Build fix after request -> firstRequest rename.
1830
1831         * platform/network/curl/FormDataStreamCurl.cpp:
1832         (WebCore::FormDataStream::read):
1833         (WebCore::FormDataStream::hasMoreElements):
1834         * platform/network/curl/ResourceHandleManager.cpp:
1835         (WebCore::headerCallback):
1836         (WebCore::ResourceHandleManager::setupPOST):
1837         (WebCore::parseDataUrl):
1838         (WebCore::ResourceHandleManager::dispatchSynchronousJob):
1839         (WebCore::ResourceHandleManager::startJob):
1840         (WebCore::ResourceHandleManager::initializeHandle):
1841
1842 2010-07-14  Simon Fraser  <simon.fraser@apple.com>
1843
1844         Reviewed by John Sullivan.
1845
1846         <rdar://problem/8186963> Expose information about compositing layers.
1847
1848         Expose information about the types of compositing layers via RenderLayerBacking::compositingLayerType().
1849
1850         * WebCore.exp.in: Export WebCore::SpaceSplitStringData::createVector().
1851         * WebCore.xcodeproj/project.pbxproj: Make RenderLayerBacking.h a Private header for use by WebKit.
1852         * platform/graphics/GraphicsLayer.h: Add hasContentsLayer() and usingTiledLayer() methods.
1853         (WebCore::GraphicsLayer::hasContentsLayer):
1854         (WebCore::GraphicsLayer::usingTiledLayer):
1855         * platform/graphics/mac/GraphicsLayerCA.h:
1856         (WebCore::GraphicsLayerCA::hasContentsLayer): Return true if we have a contents layer.
1857         * rendering/RenderLayerBacking.cpp:
1858         (WebCore::RenderLayerBacking::compositingLayerType): Return information about the type of composited layer.
1859         * rendering/RenderLayerBacking.h:
1860
1861 2010-07-14  Darin Adler  <darin@apple.com>
1862
1863         Reviewed by Sam Weinig.
1864
1865         TreeWalker::previousSibling calls firstChild instead of lastChild when handling FILTER_SKIP
1866         https://bugs.webkit.org/show_bug.cgi?id=42008
1867
1868         TreeWalker::previousNode does not handle FILTER_REJECT when processing lastChild
1869         https://bugs.webkit.org/show_bug.cgi?id=42010
1870
1871         Tests: fast/dom/TreeWalker/previousNodeLastChildReject.html
1872                fast/dom/TreeWalker/previousSiblingLastChildSkip.html
1873
1874         * dom/TreeWalker.cpp:
1875         (WebCore::TreeWalker::previousSibling): Call lastChild instead of firstChild.
1876         (WebCore::TreeWalker::previousNode): Fix handling of FILTER_REJECT by exiting
1877         the lastChild loop when we encounter it.
1878
1879 2010-07-14  Sam Weinig  <sam@webkit.org>
1880
1881         Reviewed by Brady Eidson.
1882
1883         Fix crashing layout test on snowleopard.
1884
1885         * platform/mac/CursorMac.mm:
1886         (WebCore::Cursor::ensurePlatformCursor): Make sure to retain the cursor.
1887
1888 2010-07-14  Chris Fleizach  <cfleizach@apple.com>
1889
1890         Reviewed by Darin Adler.
1891
1892         AX: aria-checked not recognized on image map radio buttons
1893         https://bugs.webkit.org/show_bug.cgi?id=42055
1894
1895         Moves some code from AccessibilityRenderObject to AccessibilityObject so that
1896         elements that do not have render objects, but do have Nodes (like image map links 
1897         and list box options) can still make use of certain aria attributes.
1898
1899         Test: platform/mac/accessibility/image-map-link-used-as-radiobutton.html
1900
1901         * accessibility/AccessibilityImageMapLink.cpp:
1902         (WebCore::AccessibilityImageMapLink::roleValue):
1903         (WebCore::AccessibilityImageMapLink::accessibilityDescription):
1904         (WebCore::AccessibilityImageMapLink::title):
1905            Make imageMap use standard AccessibilityObject methods for getAttribute()
1906         * accessibility/AccessibilityImageMapLink.h:
1907         (WebCore::AccessibilityImageMapLink::node):
1908         * accessibility/AccessibilityListBoxOption.cpp:
1909         (WebCore::AccessibilityListBoxOption::accessibilityIsIgnored):
1910         (WebCore::AccessibilityListBoxOption::stringValue):
1911         * accessibility/AccessibilityListBoxOption.h:
1912         (WebCore::AccessibilityListBoxOption::node):
1913        * accessibility/AccessibilityObject.cpp:
1914         (WebCore::AccessibilityObject::language):
1915              Language method doesn't need a node() anymore, it can use the node from AccessibilityObject.
1916         (WebCore::renderListItemContainerForNode):
1917         (WebCore::AccessibilityObject::getAttribute):
1918         (WebCore::AccessibilityObject::intValue):
1919            Move intValue into AccessibilityObject.
1920         (WebCore::AccessibilityObject::hasIntValue):
1921         * accessibility/AccessibilityObject.h:
1922         (WebCore::AccessibilityObject::isCheckbox):
1923         (WebCore::AccessibilityObject::isRadioButton):
1924         (WebCore::AccessibilityObject::isCheckboxOrRadio):
1925            Consolidate what defines a checkbox and radio button into AccessibilityObject.
1926         (WebCore::AccessibilityObject::node):
1927         (WebCore::AccessibilityObject::headingLevel):
1928        (WebCore::AccessibilityObject::isDetached):
1929         * accessibility/AccessibilityRenderObject.cpp:
1930         (WebCore::AccessibilityRenderObject::isPasswordField):
1931         (WebCore::AccessibilityRenderObject::headingLevel):
1932         (WebCore::AccessibilityRenderObject::selectedTabItem):
1933         (WebCore::AccessibilityRenderObject::hierarchicalLevel):
1934         (WebCore::AccessibilityRenderObject::node):
1935         (WebCore::AccessibilityRenderObject::intValue):
1936         * accessibility/AccessibilityRenderObject.h:
1937         * rendering/RenderMenuList.cpp:
1938         (WebCore::RenderMenuList::itemAccessibilityText):
1939             Stop using AccessibilityObjects getAttribute (no reason to use it really).
1940
1941 2010-07-14  Dan Bernstein  <mitz@apple.com>
1942
1943         Reviewed by Simon Fraser.
1944
1945         <rdar://problem/7759909> Certain text runs measure 1 pixel wider when measured as a whole than when measured piecewise
1946         https://bugs.webkit.org/show_bug.cgi?id=42279
1947
1948         No test because the issue cannot be reproduced with standard fonts.
1949
1950         Word- and run-rounding works by advancing ahead to the nearest integral width. As the total
1951         width accumulated becomes large, the float type’s low precision results in accumulated rounding
1952         error, sometimes crossing an integer. Consequently, word-rounding makes different decisions when
1953         measuring a multi-word run than when measuring its words individually. To work around this,
1954         word- and run-rounding are applied only to the width accumulated since the last rounding
1955         character.
1956
1957         * platform/graphics/WidthIterator.cpp:
1958         (WebCore::WidthIterator::advance):
1959         * platform/graphics/mac/ComplexTextController.cpp:
1960         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
1961
1962 2010-07-14  Tony Gentilcore  <tonyg@chromium.org>
1963
1964         Reviewed by Darin Adler.
1965
1966         Fix enum value names for Navigation.{idl|h}
1967         https://bugs.webkit.org/show_bug.cgi?id=42282
1968
1969         This is necessary after https://bugs.webkit.org/show_bug.cgi?id=42250.
1970
1971         No new tests because no new functionality.
1972
1973         * page/Navigation.cpp:
1974         (WebCore::Navigation::type):
1975         * page/Navigation.h:
1976         (WebCore::Navigation::):
1977
1978 2010-07-14  Johnny Ding  <jnd@chromium.org>
1979
1980         Reviewed by Adam Barth.
1981
1982         https://bugs.webkit.org/show_bug.cgi?id=41292
1983         Set right UserGestureIndicator to indicate whether the NPN_Evaluate allows popup window or not.
1984
1985         Test: plugins/plugin-initiate-popup-window.html
1986
1987         * bindings/v8/NPV8Object.cpp:
1988         (_NPN_EvaluateHelper):
1989
1990 2010-07-14  Chris Fleizach  <cfleizach@apple.com>
1991
1992         Reviewed by Darin Adler.
1993
1994         Bug 42117 - AX: Data table heuristics: consider assuming data table for 'zebra-striped' rows
1995         https://bugs.webkit.org/show_bug.cgi?id=42117
1996
1997         Test: platform/mac/accessibility/table-with-zebra-rows.html
1998
1999         * accessibility/AccessibilityTable.cpp:
2000         (WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
2001
2002 2010-07-14  Chris Fleizach  <cfleizach@apple.com>
2003
2004         Reviewed by Darin Adler.
2005
2006         AX: VoiceOver cannot navigate this page because Safari is taking too long
2007         https://bugs.webkit.org/show_bug.cgi?id=42219
2008
2009         No tests. Existing tests cover change.
2010
2011         * accessibility/AccessibilityRenderObject.cpp:
2012         (WebCore::AccessibilityRenderObject::boundingBoxRect):
2013
2014 2010-07-14  Andreas Kling  <andreas.kling@nokia.com>
2015
2016         Reviewed by Darin Adler.
2017
2018         Canvas: Fast-path for assigning the same color string as before to fillStyle or strokeStyle
2019         https://bugs.webkit.org/show_bug.cgi?id=42272
2020
2021         Always route assignment of color strings via setFillColor() or setStrokeColor()
2022         where we can check it against the previous value and return early if it's the same.
2023
2024         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2025         (WebCore::toHTMLCanvasStyle):
2026         (WebCore::JSCanvasRenderingContext2D::strokeStyle):
2027         (WebCore::JSCanvasRenderingContext2D::setStrokeStyle):
2028         (WebCore::JSCanvasRenderingContext2D::setFillStyle):
2029         * html/canvas/CanvasRenderingContext2D.cpp:
2030         (WebCore::CanvasRenderingContext2D::setStrokeStyle):
2031         (WebCore::CanvasRenderingContext2D::setFillStyle):
2032         (WebCore::CanvasRenderingContext2D::setStrokeColor):
2033         (WebCore::CanvasRenderingContext2D::setFillColor):
2034         * html/canvas/CanvasRenderingContext2D.h:
2035
2036 2010-07-14  Kinuko Yasuda  <kinuko@chromium.org>
2037
2038         Reviewed by Jian Li.
2039
2040         Separate line-ending conversion code from BlobItem
2041         https://bugs.webkit.org/show_bug.cgi?id=40932
2042
2043         Add common line-ending normalization code under platform/text.
2044         No new tests as it doesn't change any functionality.
2045
2046         * CMakeLists.txt:
2047         * GNUmakefile.am:
2048         * WebCore.gypi:
2049         * WebCore.pro:
2050         * WebCore.vcproj/WebCore.vcproj:
2051         * WebCore.xcodeproj/project.pbxproj:
2052         * html/BlobBuilder.cpp:
2053         (WebCore::BlobBuilder::appendString):
2054         * html/FormDataList.cpp:
2055         (WebCore::FormDataList::appendString):
2056         * platform/BlobItem.cpp:
2057         * platform/BlobItem.h:
2058         * platform/text/LineEnding.cpp: Added.
2059         * platform/text/LineEnding.h: Added.
2060
2061 2010-07-14  Erik Arvidsson  <arv@chromium.org>
2062
2063         Reviewed by Darin Adler.
2064
2065         Implement border-start and border-end properties
2066         https://bugs.webkit.org/show_bug.cgi?id=41782
2067
2068         Test: fast/css/border-start-end.html
2069
2070         * css/CSSComputedStyleDeclaration.cpp:
2071         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2072         * css/CSSParser.cpp:
2073         (WebCore::CSSParser::parseValue):
2074         * css/CSSProperty.cpp:
2075         (WebCore::CSSProperty::resolveDirectionAwareProperty):
2076         * css/CSSPropertyNames.in:
2077         * inspector/front-end/SourceCSSTokenizer.js:
2078         (WebInspector.SourceCSSTokenizer):
2079
2080 2010-07-14  Alexey Proskuryakov  <ap@apple.com>
2081
2082         Tiger and Gtk build fixes.
2083
2084         https://bugs.webkit.org/show_bug.cgi?id=42201
2085         Use ResourceHandle object for synchronous loading
2086
2087         * platform/network/mac/ResourceHandleMac.mm:
2088         (WebCore::ResourceHandle::createNSURLConnection):
2089         (WebCore::ResourceHandle::loadResourceSynchronously):
2090         * platform/network/soup/ResourceHandleSoup.cpp:
2091         (WebCore::startHttp):
2092
2093 2010-07-14  Sam Weinig  <sam@webkit.org>
2094
2095         Reviewed by Darin Adler.
2096
2097         Patch for https://bugs.webkit.org/show_bug.cgi?id=42232
2098         Make changing Cursors work in WebKit2.
2099
2100         - Converted Mac and Windows Cursor implementations to lazily
2101           create the platform cursor.
2102         - Add HostWindow function to set the cursor and use it from Widget::setCursor.
2103         - Rework Windows cursor code to use fewer global variables.
2104
2105         * WebCore.exp.in: Updated
2106         * loader/EmptyClients.h:
2107         (WebCore::EmptyChromeClient::setCursor): 
2108         (WebCore::EmptyChromeClient::setLastSetCursorToCurrentCursor):
2109         Added empty implementations.
2110
2111         * page/Chrome.cpp:
2112         (WebCore::Chrome::setCursor):
2113         * page/Chrome.h:
2114         * page/ChromeClient.h:
2115         Change existing setCursor() function to take a Cursor instead of a
2116         PlatformCursorHandle. Added setLastSetCursorToCurrentCursor.
2117
2118         * platform/Cursor.cpp:
2119         * platform/Cursor.h:
2120         Added Cursor Type and the option of lazily creating the native cursor
2121         (used on Mac and Windows for now).
2122
2123         * platform/HostWindow.h:
2124         Add setCursor.
2125
2126         * platform/mac/CursorMac.mm:
2127         (WebCore::createCustomCursor): This no longer needs to call determineHotSpot
2128         as that is done when on construction of the cursor now and the hotSpot passed
2129         in is correct.
2130         (WebCore::Cursor::ensurePlatformCursor):
2131         (WebCore::Cursor::Cursor):
2132         (WebCore::Cursor::~Cursor):
2133         (WebCore::Cursor::operator=):
2134         (WebCore::Cursor::platformCursor):
2135         Convert to lazily creating the native cursor on the first request and
2136         storing the type.
2137
2138         * platform/mac/WidgetMac.mm:
2139         (WebCore::Widget::setCursor):
2140         Use HostWindow::setCursor to set the cursor. This in turn will call the
2141         ChromeClient.
2142
2143         * platform/win/CursorWin.cpp:
2144         (WebCore::createSharedCursor):
2145         (WebCore::loadSharedCursor):
2146         (WebCore::loadCursorByName):
2147         (WebCore::Cursor::ensurePlatformCursor):
2148         (WebCore::SharedCursor::~SharedCursor):
2149         (WebCore::Cursor::Cursor):
2150         (WebCore::Cursor::~Cursor):
2151         (WebCore::Cursor::operator=):
2152         (WebCore::Cursor::platformCursor):
2153         Convert to lazily creating the native cursor on the first request and
2154         storing the type.
2155
2156         * platform/win/WidgetWin.cpp:
2157         (WebCore::Widget::setCursor):
2158         Use HostWindow::setCursor to set the cursor. This in turn will call the
2159         ChromeClient.
2160
2161         * plugins/win/PluginViewWin.cpp:
2162         (WebCore::PluginView::handleMouseEvent):
2163         Use the new setLastSetCursorToCurrentCursor client function to ensure
2164         the cursor is properly updated when over a plugin.
2165
2166         * platform/chromium/CursorChromium.cpp:
2167         * platform/efl/CursorEfl.cpp:
2168         * platform/gtk/CursorGtk.cpp:
2169         * platform/haiku/CursorHaiku.cpp:
2170         * platform/wince/CursorWince.cpp:
2171         * platform/wx/CursorWx.cpp:
2172         * platform/qt/CursorQt.cpp:
2173         Change m_impl -> m_platformCursor.
2174
2175 2010-07-13  Eric Seidel  <eric@webkit.org>
2176
2177         Reviewed by Adam Barth.
2178
2179         reconstructActiveFormElements should reconstruct attributes as well
2180         https://bugs.webkit.org/show_bug.cgi?id=42222
2181
2182         The case in question is "<p><b foo='bar'></p>text</b>".
2183         When the "b" is re-opened to wrap the text it should include
2184         any attributes from the original (now closed) tag name.
2185
2186         There are also similar cases for the Adoption Agency algorithm, but since
2187         the html5lib test suite did not cover those (and it wasn't immediately
2188         obvious to me how to test those) I've saved fixing that bug for a
2189         later patch.  For now I've just made the adoption agency use
2190         HTMLConstructionSite::createHTMLElementFromElementRecord so the
2191         FIXME can be in one place instead of two.
2192
2193         In order to cleanly support createHTMLElementFromSavedElement
2194         I re-factored "attachToCurrent" out from createHTMLElementAndAttachToCurrent
2195         and changed all callers to use attachToCurrent(createHTMLElement(token)).
2196
2197         This is covered by two existing tests in html5lib/runner.html
2198         and I wrote two more.  One to cover the basic case that we now pass
2199         and a second to cover an evil edge case which we do not.
2200
2201         * html/HTMLConstructionSite.cpp:
2202         (WebCore::HTMLConstructionSite::attachToCurrent):
2203         (WebCore::HTMLConstructionSite::insertHTMLHtmlElement):
2204         (WebCore::HTMLConstructionSite::insertHTMLHeadElement):
2205         (WebCore::HTMLConstructionSite::insertHTMLBodyElement):
2206         (WebCore::HTMLConstructionSite::insertHTMLElement):
2207         (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement):
2208         (WebCore::HTMLConstructionSite::insertScriptElement):
2209         (WebCore::HTMLConstructionSite::insertForeignElement):
2210         (WebCore::HTMLConstructionSite::createHTMLElementFromElementRecord):
2211         (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
2212         (WebCore::HTMLConstructionSite::reconstructTheActiveFormattingElements):
2213         * html/HTMLConstructionSite.h:
2214         * html/HTMLTreeBuilder.cpp:
2215         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
2216
2217 2010-07-13  Alexey Proskuryakov  <ap@apple.com>
2218
2219         Reviewed by Darin Adler.
2220
2221         https://bugs.webkit.org/show_bug.cgi?id=42201
2222         Use ResourceHandle object for synchronous loading
2223
2224         * platform/network/ResourceHandle.cpp:
2225         (WebCore::ResourceHandle::ResourceHandle): Moved common tasks from create() to constructor.
2226         (WebCore::ResourceHandle::firstRequest): Renamed from request(). This is not changed with
2227         redirect, so the old name was quite confusing.
2228
2229         * platform/network/ResourceHandle.h: Made createNSURLConnection() a member function, since
2230         it now needs access to both ResourceHandle and ResourceHandleInternal. Added createCFURLConnection().
2231
2232         * platform/network/ResourceHandleInternal.h:
2233         (WebCore::ResourceHandleInternal::ResourceHandleInternal): Renamed m_request to m_firstRequest.
2234
2235         * platform/network/mac/ResourceHandleMac.mm:
2236         (WebCoreSynchronousLoaderClient): Replaced an Objective C delegate class with a ResourceHandleClient
2237         subclass. This allows for much better code sharing, with common logic is in ResourceHandle.
2238         (WebCore::ResourceHandle::createNSURLConnection): Factored out more code that is common
2239         between sync and async parts.
2240         (WebCore::ResourceHandle::start): Ditto.
2241         (WebCore::ResourceHandle::cancel): Updated for firstRequest() renaming.
2242         (WebCore::ResourceHandle::loadResourceSynchronously): Use ResourceHandle and ResourceHandleClient,
2243         like a good loader.
2244         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Updated for firstRequest() renaming.
2245         (WebCore::ResourceHandle::receivedCredential): Ditto.
2246         (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]): Ditto.
2247         (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]): Ditto.
2248         (-[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:]): Ditto.
2249         (-[WebCoreResourceHandleAsDelegate connection:didFailWithError:]): Ditto.
2250
2251         * platform/network/cf/ResourceHandleCFNet.cpp:
2252         (WebCore::WebCoreSynchronousLoaderClient::create):
2253         (WebCore::WebCoreSynchronousLoaderClient::setAllowStoredCredentials):
2254         (WebCore::WebCoreSynchronousLoaderClient::isDone):
2255         (WebCore::WebCoreSynchronousLoaderClient::data):
2256         (WebCore::WebCoreSynchronousLoaderClient::WebCoreSynchronousLoaderClient):
2257         (WebCore::willSendRequest):
2258         (WebCore::didReceiveResponse):
2259         (WebCore::didReceiveData):
2260         (WebCore::shouldUseCredentialStorageCallback):
2261         (WebCore::didFinishLoading):
2262         (WebCore::didFail):
2263         (WebCore::didReceiveChallenge):
2264         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
2265         (WebCore::ResourceHandle::~ResourceHandle):
2266         (WebCore::ResourceHandle::createCFURLConnection):
2267         (WebCore::ResourceHandle::start):
2268         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
2269         (WebCore::ResourceHandle::receivedCredential):
2270         (WebCore::ResourceHandle::loadResourceSynchronously):
2271         (WebCore::WebCoreSynchronousLoaderClient::willSendRequest):
2272         (WebCore::WebCoreSynchronousLoaderClient::didReceiveResponse):
2273         (WebCore::WebCoreSynchronousLoaderClient::didReceiveData):
2274         (WebCore::WebCoreSynchronousLoaderClient::didFinishLoading):
2275         (WebCore::WebCoreSynchronousLoaderClient::didFail):
2276         (WebCore::WebCoreSynchronousLoaderClient::didReceiveAuthenticationChallenge):
2277         (WebCore::WebCoreSynchronousLoaderClient::shouldUseCredentialStorage):
2278         Same changes for CFNetwork version. Now it's a more direct copy/paste than before, some
2279         day we'll share the code.
2280
2281         * loader/MainResourceLoader.cpp:
2282         (WebCore::MainResourceLoader::continueAfterContentPolicy):
2283         * loader/appcache/ApplicationCacheGroup.cpp:
2284         (WebCore::ApplicationCacheGroup::createResourceHandle):
2285         (WebCore::ApplicationCacheGroup::didReceiveResponse):
2286         (WebCore::ApplicationCacheGroup::didFinishLoading):
2287         (WebCore::ApplicationCacheGroup::didFail):
2288         (WebCore::ApplicationCacheGroup::didReceiveManifestResponse):
2289         * loader/icon/IconLoader.cpp:
2290         (WebCore::IconLoader::didReceiveResponse):
2291         (WebCore::IconLoader::didFail):
2292         (WebCore::IconLoader::didFinishLoading):
2293         * platform/network/curl/ResourceHandleManager.cpp:
2294         (WebCore::headerCallback):
2295         * platform/network/qt/QNetworkReplyHandler.cpp:
2296         (WebCore::QNetworkReplyHandler::start):
2297         * platform/network/qt/ResourceHandleQt.cpp:
2298         (WebCore::ResourceHandle::start):
2299         (WebCore::ResourceHandle::loadResourceSynchronously):
2300         * platform/network/soup/ResourceHandleSoup.cpp:
2301         (WebCore::startHttp):
2302         Updated for request() -> firstRequest renaming.
2303
2304 2010-07-14  Marcus Bulach  <bulach@chromium.org>
2305
2306         Reviewed by Jeremy Orlow.
2307
2308         Code generator: ensure generated constants match their corresponding enums.
2309         https://bugs.webkit.org/show_bug.cgi?id=42250
2310
2311         Specific interfaces can use DontCheckEnums attribute to avoid generating the compile-time check.
2312
2313         Tests: updated bindings tests. Generated code should compile.
2314
2315         * bindings/scripts/CodeGenerator.pm:
2316         * bindings/scripts/CodeGeneratorJS.pm:
2317         * bindings/scripts/CodeGeneratorV8.pm:
2318         * bindings/scripts/test/CPP/WebDOMTestObj.h:
2319         (WebDOMTestObj::):
2320         * bindings/scripts/test/JS/JSTestObj.cpp:
2321         (WebCore::):
2322         (WebCore::JSTestObjPrototype::getOwnPropertySlot):
2323         (WebCore::JSTestObjPrototype::getOwnPropertyDescriptor):
2324         (WebCore::jsTestObjCONST_VALUE_0):
2325         (WebCore::jsTestObjCONST_VALUE_1):
2326         (WebCore::jsTestObjCONST_VALUE_2):
2327         (WebCore::jsTestObjCONST_VALUE_4):
2328         (WebCore::jsTestObjCONST_VALUE_8):
2329         * bindings/scripts/test/JS/JSTestObj.h:
2330         * bindings/scripts/test/ObjC/DOMTestObj.h:
2331         * bindings/scripts/test/TestObj.idl:
2332         * bindings/scripts/test/V8/V8TestObj.cpp:
2333         (WebCore::):
2334         (WebCore::ConfigureV8TestObjTemplate):
2335         * css/WebKitCSSTransformValue.idl:
2336         * dom/DOMCoreException.idl:
2337         * dom/EventException.idl:
2338         * dom/Node.idl:
2339         * dom/OverflowEvent.idl:
2340         * dom/RangeException.idl:
2341         * html/FileError.idl:
2342         * html/FileReader.idl:
2343         * html/canvas/Float32Array.idl:
2344         * html/canvas/Int16Array.idl:
2345         * html/canvas/Int32Array.idl:
2346         * html/canvas/Int8Array.idl:
2347         * html/canvas/Uint16Array.idl:
2348         * html/canvas/Uint32Array.idl:
2349         * html/canvas/Uint8Array.idl:
2350         * html/canvas/WebGLRenderingContext.idl:
2351         * inspector/JavaScriptCallFrame.idl:
2352         * loader/appcache/DOMApplicationCache.idl:
2353         * storage/SQLException.idl:
2354         * svg/SVGComponentTransferFunctionElement.idl:
2355         * svg/SVGException.idl:
2356         * svg/SVGFEBlendElement.idl:
2357         * svg/SVGFEColorMatrixElement.idl:
2358         * svg/SVGFECompositeElement.idl:
2359         * svg/SVGFEConvolveMatrixElement.idl:
2360         * svg/SVGFEDisplacementMapElement.idl:
2361         * svg/SVGFEMorphologyElement.idl:
2362         * svg/SVGFETurbulenceElement.idl:
2363         * svg/SVGGradientElement.idl:
2364         * xml/XMLHttpRequestException.idl:
2365         * xml/XPathException.idl:
2366
2367 2010-07-14  Andreas Kling  <andreas.kling@nokia.com>
2368
2369         Reviewed by Ojan Vafai.
2370
2371         Unbreak fast/canvas/gradient-add-second-start-end-stop.html
2372
2373         Assigning the same CanvasGradient or CanvasPattern to fillStyle
2374         or strokeStyle may not be a no-op since the object could have been
2375         modified since it was last set.
2376
2377         Regressed with <http://trac.webkit.org/changeset/63327>
2378
2379         * html/canvas/CanvasStyle.cpp:
2380         (WebCore::operator==):
2381
2382 2010-07-14  Andreas Kling  <andreas.kling@nokia.com>
2383
2384         Reviewed by Darin Adler.
2385
2386         Canvas: Make assigning the same fillStyle or strokeStyle a fast no-op
2387         https://bugs.webkit.org/show_bug.cgi?id=42267
2388
2389         Avoid calling into GraphicsContext when setting a style to its current value.
2390
2391         * html/canvas/CanvasRenderingContext2D.cpp:
2392         (WebCore::CanvasRenderingContext2D::setStrokeStyle): Return early if the
2393         new style is the same as the current one.
2394         (WebCore::CanvasRenderingContext2D::setFillStyle): Same.
2395         * html/canvas/CanvasStyle.cpp:
2396         (WebCore::operator==): Added operator==(CanvasStyle, CanvasStyle)
2397         * html/canvas/CanvasStyle.h:
2398
2399 2010-07-14  Tony Gentilcore  <tonyg@chromium.org>
2400
2401         Reviewed by Darin Fisher.
2402
2403         Implement Web Timing redirectStart, redirectEnd, redirectCount
2404         https://bugs.webkit.org/show_bug.cgi?id=42018
2405
2406         Tests: http/tests/misc/webtiming-one-redirect.php
2407                http/tests/misc/webtiming-two-redirects.php
2408
2409         * loader/FrameLoaderTypes.h:
2410         (WebCore::FrameLoadTimeline::FrameLoadTimeline):
2411         * loader/MainResourceLoader.cpp:
2412         (WebCore::MainResourceLoader::willSendRequest): This method is called for each request (including server redirects). fetchStart is updated to the current time on each invocation so that it represents fetching of the final document and doesn't include redirect time. For each redirect, redirectCount is incremented and redirectStart to redirectEnd measures the cumulative fetch time for all redirects.
2413         * page/Navigation.cpp:
2414         (WebCore::Navigation::redirectCount): http://dev.w3.org/2006/webapi/WebTiming/#nt-redirect-count
2415         * page/Timing.cpp:
2416         (WebCore::Timing::redirectStart): http://dev.w3.org/2006/webapi/WebTiming/#nt-redirect-start
2417         (WebCore::Timing::redirectEnd): http://dev.w3.org/2006/webapi/WebTiming/#nt-redirect-end
2418         * page/Timing.h:
2419         * page/Timing.idl:
2420
2421 2010-07-14  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
2422
2423         Reviewed by Antonio Gomes.
2424
2425         Generate MathML files with CMake even if MathML is disabled. This
2426         fixes EFL build after r63274.
2427         https://bugs.webkit.org/show_bug.cgi?id=42263
2428
2429         No new functionality, so no new tests.
2430
2431         * CMakeLists.txt:
2432
2433 2010-07-14  Martin Robinson  <mrobinson@igalia.com>
2434
2435         Reviewed by Xan Lopez.
2436
2437         [GTK] Get rid of libWebCoreJS
2438         https://bugs.webkit.org/show_bug.cgi?id=42083
2439
2440         Remove the need to build libWebCoreJS.
2441
2442         * GNUmakefile.am: List all auto-generated source files for libWebCoreJS
2443         instead of relying on make to build libWebCoreJS. This is a more autotools-
2444         -friendly approach.
2445
2446 2010-07-14  Eric Carlson  <eric.carlson@apple.com>
2447
2448         One more unreviewed build fix for r63319.
2449
2450         * html/TimeRanges.cpp:
2451         (TimeRanges::nearest):
2452
2453 2010-07-14  Alexander Pavlov  <apavlov@chromium.org>
2454
2455         Reviewed by Pavel Feldman.
2456
2457         Web Inspector: Enable toggling of the "Inspect Element" mode from the browser
2458         https://bugs.webkit.org/show_bug.cgi?id=42169
2459
2460         * inspector/front-end/ElementsPanel.js:
2461         (WebInspector.ElementsPanel):
2462         (WebInspector.ElementsPanel.prototype.handleShortcut):
2463         (WebInspector.ElementsPanel.prototype.toggleSearchingForNode):
2464         * inspector/front-end/inspector.js:
2465         (WebInspector.toggleSearchingForNode):
2466
2467 2010-07-14  Eric Carlson  <eric.carlson@apple.com>
2468
2469         Unreviewed, build fix for r63319.
2470
2471         * html/TimeRanges.cpp:
2472         (TimeRanges::nearest): Include math.h and use narrowPrecisionToFloat.
2473
2474 2010-07-14  Eric Carlson  <eric.carlson@apple.com>
2475
2476         Reviewed by Darin Adler.
2477
2478         Update media element's seeking logic
2479         https://bugs.webkit.org/show_bug.cgi?id=42178
2480         <rdar://problem/8185817>
2481
2482         * html/HTMLMediaElement.cpp:
2483         (WebCore::HTMLMediaElement::seek): When asked to seek to an unbuffered time, seek to the 
2484         nearest time instead of generating an exception. Re-order the logic to match spec text.
2485
2486         * html/TimeRanges.cpp:
2487         (TimeRanges::nearest): New, return the value closest to the specified time.
2488         * html/TimeRanges.h:
2489
2490 2010-07-14  Hans Wennborg  <hans@chromium.org>
2491
2492         Reviewed by Steve Block.
2493
2494         Rename DeviceOrientationController::onOrientationChange to didChangeDeviceOrientation
2495         https://bugs.webkit.org/show_bug.cgi?id=42257
2496
2497         According to convention, we should avoid "on" in favor of "did" in function names.
2498
2499         * dom/DeviceOrientationController.cpp:
2500         (WebCore::DeviceOrientationController::didChangeDeviceOrientation):
2501         * dom/DeviceOrientationController.h:
2502
2503 2010-07-14  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
2504
2505         Reviewed by Kent Tamura.
2506
2507         Notify browser about popup being deleted. In EFL and BREW ports, the
2508         WebCore::Popup object was being deleted leaving the popup in browser
2509         alive. Popups can be deleted in two ways: either from browser to webcore or
2510         from webcore to browser. The first path was ok. The problem was when the
2511         user changed the page with a popup still opened. This would trigger the
2512         second path and would cause WebCore::Popup to be deleted without
2513         notifying browser.
2514         https://bugs.webkit.org/show_bug.cgi?id=41877
2515
2516         No new functionality so no new tests.
2517
2518         * platform/brew/PopupMenuBrew.cpp:
2519         (WebCore::PopupMenu::~PopupMenu): call hide() when object is
2520         destroyed.
2521         * platform/efl/PopupMenuEfl.cpp:
2522         (WebCore::PopupMenu::~PopupMenu): ditto.
2523
2524 2010-07-14  Satish Sampath  <satish@chromium.org>
2525
2526         Reviewed by Kent Tamura.
2527
2528         Invoke speech recognition when user clicks on the speech button of input elements.
2529         http://bugs.webkit.org/show_bug.cgi?id=42047
2530
2531         No new tests, the relevant LayoutTestController bindings will be added in a subsequent patch.
2532
2533         * rendering/TextControlInnerElements.cpp:
2534         (WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement):
2535         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler): Added click handling.
2536         (WebCore::InputFieldSpeechButtonElement::speechInput):
2537         (WebCore::InputFieldSpeechButtonElement::recordingComplete): Callback to indicate recording progress.
2538         (WebCore::InputFieldSpeechButtonElement::setRecognitionResult): Callback to receive recognized text.
2539         (WebCore::InputFieldSpeechButtonElement::detach):
2540         * rendering/TextControlInnerElements.h:
2541
2542 2010-07-14  Sheriff Bot  <webkit.review.bot@gmail.com>
2543
2544         Unreviewed, rolling out r63305.
2545         http://trac.webkit.org/changeset/63305
2546         https://bugs.webkit.org/show_bug.cgi?id=42256
2547
2548         "debugger-breakpoints-not-activated-on-reload.html fails on
2549         GTK" (Requested by yurys on #webkit).
2550
2551         * inspector/front-end/ScriptView.js:
2552         (WebInspector.ScriptView.prototype._addBreakpoint):
2553         * inspector/front-end/ScriptsPanel.js:
2554         (WebInspector.ScriptsPanel):
2555         (WebInspector.ScriptsPanel.prototype._resourceLoadingFinished):
2556         (WebInspector.ScriptsPanel.prototype._breakpointAdded):
2557         (WebInspector.ScriptsPanel.prototype._scriptOrResourceForURLAndLine):
2558         (WebInspector.ScriptsPanel.prototype._showScriptOrResource):
2559         (WebInspector.ScriptsPanel.prototype._toggleBreakpointsClicked):
2560         * inspector/front-end/SourceView.js:
2561         (WebInspector.SourceView.prototype._addBreakpoint):
2562
2563 2010-07-14  Steve Block  <steveblock@google.com>
2564
2565         Reviewed by Jeremy Orlow.
2566
2567         Provide implementation of DeviceOrientationController and hook into DOMWindow
2568         https://bugs.webkit.org/show_bug.cgi?id=39588
2569
2570         Added DeviceOrientationController::addListener() and removeListener()
2571         to start and stop the client and added calls from DomWindow. Implemented
2572         DeviceOrientationController::onDeviceOrientationChange() to fire a
2573         DeviceOrientationEvent on the window object.
2574
2575         No new tests yet, pending LayoutTestController methods for mock DeviceOrientation.
2576
2577         * dom/DeviceOrientationClient.h:
2578         * dom/DeviceOrientationController.cpp:
2579         (WebCore::DeviceOrientation::addListener):
2580         (WebCore::DeviceOrientation::removeListener):
2581         (WebCore::DeviceOrientation::removeAllListeners):
2582         (WebCore::DeviceOrientationController::onDeviceOrientationChange):
2583         * dom/DeviceOrientationController.h:
2584         * page/DOMWindow.cpp:
2585         (WebCore::DOMWindow::addEventListener):
2586         (WebCore::DOMWindow::removeEventListener):
2587         (WebCore::DOMWindow::removeAllEventListeners):
2588
2589 2010-07-14  Yury Semikhatsky  <yurys@chromium.org>
2590
2591         Reviewed by Pavel Feldman.
2592
2593         Web Inspector: remove v8 debugger code that doesn't use ScriptDebugServer
2594         https://bugs.webkit.org/show_bug.cgi?id=42164
2595
2596         * bindings/v8/ScriptDebugServer.cpp:
2597         (WebCore::retrieveFrame):
2598         (WebCore::ScriptDebugServer::addListener):
2599         (WebCore::ScriptDebugServer::setBreakpoint):
2600         (WebCore::ScriptDebugServer::removeBreakpoint):
2601         (WebCore::ScriptDebugServer::clearBreakpoints):
2602         (WebCore::ScriptDebugServer::setBreakpointsActivated):
2603         (WebCore::ScriptDebugServer::pauseOnExceptionsState):
2604         (WebCore::ScriptDebugServer::setPauseOnExceptionsState):
2605         (WebCore::ScriptDebugServer::continueProgram):
2606         (WebCore::ScriptDebugServer::stepIntoStatement):
2607         (WebCore::ScriptDebugServer::stepOverStatement):
2608         (WebCore::ScriptDebugServer::stepOutOfFunction):
2609         (WebCore::ScriptDebugServer::editScriptSource):
2610         (WebCore::ScriptDebugServer::handleV8DebugEvent):
2611         * bindings/v8/ScriptDebugServer.h:
2612
2613 2010-07-14  Ilya Tikhonovsky  <loislo@chromium.org>
2614
2615         Reviewed by Yury Semikhatsky.
2616
2617         WebInspector: Clean-up InspectorBackend code. In the next changes
2618         InspectorBackend content will be generated by scripts. As far as
2619         generator is very simple thing all nontrivial function should be
2620         moved to InspectorController and DOMAgent.
2621         https://bugs.webkit.org/show_bug.cgi?id=42171
2622
2623         * bindings/js/ScriptDebugServer.cpp:
2624         (WebCore::ScriptDebugServer::pause):
2625         * bindings/js/ScriptDebugServer.h:
2626         (WebCore::ScriptDebugServer::activateBreakpoints):
2627         (WebCore::ScriptDebugServer::deactivateBreakpoints):
2628         * bindings/v8/ScriptDebugServer.h:
2629         (WebCore::ScriptDebugServer::activateBreakpoints):
2630         (WebCore::ScriptDebugServer::deactivateBreakpoints):
2631         (WebCore::ScriptDebugServer::pause):
2632         * inspector/Inspector.idl:
2633         * inspector/InspectorBackend.cpp:
2634         (WebCore::InspectorBackend::saveApplicationSettings):
2635         (WebCore::InspectorBackend::saveSessionSettings):
2636         (WebCore::InspectorBackend::enableSearchingForNode):
2637         (WebCore::InspectorBackend::disableSearchingForNode):
2638         (WebCore::InspectorBackend::enableMonitoringXHR):
2639         (WebCore::InspectorBackend::disableMonitoringXHR):
2640         (WebCore::InspectorBackend::getResourceContent):
2641         (WebCore::InspectorBackend::reloadPage):
2642         (WebCore::InspectorBackend::activateBreakpoints):
2643         (WebCore::InspectorBackend::deactivateBreakpoints):
2644         (WebCore::InspectorBackend::pause):
2645         (WebCore::InspectorBackend::resume):
2646         (WebCore::InspectorBackend::stepOverStatement):
2647         (WebCore::InspectorBackend::stepIntoStatement):
2648         (WebCore::InspectorBackend::stepOutOfFunction):
2649         (WebCore::InspectorBackend::setPauseOnExceptionsState):
2650         (WebCore::InspectorBackend::copyNode):
2651         (WebCore::InspectorBackend::pushNodeByPathToFrontend):
2652         (WebCore::InspectorBackend::highlightDOMNode):
2653         (WebCore::InspectorBackend::hideDOMNodeHighlight):
2654         * inspector/InspectorBackend.h:
2655         * inspector/InspectorBackend.idl:
2656         * inspector/InspectorController.cpp:
2657         (WebCore::InspectorController::saveApplicationSettings):
2658         (WebCore::InspectorController::saveSessionSettings):
2659         (WebCore::InspectorController::highlightDOMNode):
2660         (WebCore::InspectorController::resume):
2661         (WebCore::InspectorController::setPauseOnExceptionsState):
2662         (WebCore::InspectorController::getResourceContent):
2663         (WebCore::InspectorController::reloadPage):
2664         * inspector/InspectorController.h:
2665         (WebCore::InspectorController::hideDOMNodeHighlight):
2666         (WebCore::InspectorController::startProfiling):
2667         (WebCore::InspectorController::stopProfiling):
2668         (WebCore::InspectorController::enableSearchingForNode):
2669         (WebCore::InspectorController::disableSearchingForNode):
2670         (WebCore::InspectorController::enableMonitoringXHR):
2671         (WebCore::InspectorController::disableMonitoringXHR):
2672         * inspector/InspectorDOMAgent.cpp:
2673         (WebCore::InspectorDOMAgent::copyNode):
2674         (WebCore::InspectorDOMAgent::pushNodeByPathToFrontend):
2675         * inspector/InspectorDOMAgent.h:
2676         * inspector/front-end/InspectorBackendStub.js:
2677         (.WebInspector.InspectorBackendStub.prototype.pause):
2678         (.WebInspector.InspectorBackendStub.prototype.resume):
2679         (.WebInspector.InspectorBackendStub.prototype.stepIntoStatement):
2680         (.WebInspector.InspectorBackendStub.prototype.stepOutOfFunction):
2681         (.WebInspector.InspectorBackendStub.prototype.stepOverStatement):
2682         * inspector/front-end/ScriptsPanel.js:
2683         (WebInspector.ScriptsPanel.prototype._togglePause):
2684         (WebInspector.ScriptsPanel.prototype._stepOverClicked):
2685         (WebInspector.ScriptsPanel.prototype._stepIntoClicked):
2686         (WebInspector.ScriptsPanel.prototype._stepOutClicked):
2687         * loader/FrameLoader.cpp:
2688         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
2689
2690 2010-07-14  Joone Hur  <joone@kldp.org>
2691
2692         Reviewed by Jian Li.
2693
2694         [GTK] Enabling File Reader/Writer APIs
2695         https://bugs.webkit.org/show_bug.cgi?id=40209
2696
2697         The layout test fast/files will be enabled after eventSender.beginDragWithFiles is implemented for GTK.
2698
2699         * platform/gtk/FileSystemGtk.cpp:
2700         (WebCore::openFile): Added.
2701         (WebCore::readFromFile): Added.
2702
2703 2010-07-14  Nikolas Zimmermann  <nzimmermann@rim.com>
2704
2705         Reviewed by Dirk Schulze.
2706
2707         Inconsistent LayoutRepainter usage in the SVG renderers
2708         https://bugs.webkit.org/show_bug.cgi?id=42245
2709
2710         Unify LayoutRepainter usage in the SVG renders, as RenderBlock does it, always use:
2711         LayoutRepainter repainter(*this, m_everHadLayout && checkForRepaintDuringLayout());
2712         instead of including selfWillPaint / selfNeedsLayout checks. This improves layout test
2713         performance by 8s on my machine with a debug build (from 76.72s -> 68.59s, averaged over 5 runs)
2714
2715         * rendering/RenderForeignObject.cpp:
2716         (WebCore::RenderForeignObject::layout):
2717         * rendering/RenderPath.cpp:
2718         (WebCore::RenderPath::layout):
2719         * rendering/RenderSVGContainer.cpp:
2720         (WebCore::RenderSVGContainer::layout):
2721         * rendering/RenderSVGImage.cpp:
2722         (WebCore::RenderSVGImage::layout):
2723         * rendering/RenderSVGRoot.cpp:
2724         (WebCore::RenderSVGRoot::layout):
2725         * rendering/RenderSVGText.cpp:
2726         (WebCore::RenderSVGText::layout):
2727
2728 2010-07-14  Kent Tamura  <tkent@chromium.org>
2729
2730         Unreviewed, build fix for r63300.
2731
2732         * rendering/RenderSVGResourceContainer.h:
2733         (WebCore::RenderSVGResourceContainer::containsCyclicReference):
2734
2735 2010-07-14  Pavel Podivilov  <podivilov@chromium.org>
2736
2737         Reviewed by Yury Semikhatsky.
2738
2739         Web Inspector: do not activate all breakpoints on page reload
2740         https://bugs.webkit.org/show_bug.cgi?id=41461
2741
2742         Test: inspector/debugger-breakpoints-not-activated-on-reload.html
2743
2744         * inspector/front-end/ScriptView.js:
2745         (WebInspector.ScriptView.prototype._addBreakpoint):
2746         * inspector/front-end/ScriptsPanel.js:
2747         (WebInspector.ScriptsPanel):
2748         (WebInspector.ScriptsPanel.prototype._breakpointAdded):
2749         (WebInspector.ScriptsPanel.prototype.toggleBreakpointsClicked):
2750         * inspector/front-end/SourceView.js:
2751         (WebInspector.SourceView.prototype._addBreakpoint):
2752
2753 2010-07-14  Yury Semikhatsky  <yurys@chromium.org>
2754
2755         Reviewed by Pavel Feldman.
2756
2757         Web Inspector: use OwnPtr to manage ConsoleMessages in InspectorController
2758         https://bugs.webkit.org/show_bug.cgi?id=42243
2759
2760         * inspector/InspectorController.cpp:
2761         (WebCore::InspectorController::~InspectorController):
2762         (WebCore::InspectorController::addConsoleMessage):
2763         (WebCore::InspectorController::clearConsoleMessages):
2764         * inspector/InspectorController.h:
2765         (WebCore::InspectorController::consoleMessages):
2766
2767 2010-07-14  Nikolas Zimmermann  <nzimmermann@rim.com>
2768
2769         Reviewed by Eric Seidel.
2770
2771         SVG patterns and masks should not be able to reference themselves
2772         https://bugs.webkit.org/show_bug.cgi?id=32171
2773
2774         Don't apply pattern/mask resources, if they contain cyclic references. Gradients/Filters are not affected.
2775         Clippers are already correcly handling this on their own, as well as markers (all which require subtle quirks, covered by existing tests).
2776
2777         Tests: svg/custom/recursive-filter.svg
2778                svg/custom/recursive-gradient.svg
2779                svg/custom/recursive-mask.svg
2780                svg/custom/recursive-pattern.svg
2781
2782         * rendering/RenderSVGResourceContainer.h:
2783         (WebCore::RenderSVGResourceContainer::RenderSVGResourceContainer): Stop using idForStyleResolution(), but use getIdAttribute(), no functional change though.
2784         (WebCore::RenderSVGResourceContainer::idChanged): Ditto.
2785         (WebCore::RenderSVGResourceContainer::childElementReferencesResource): To be implemented by classes inheriting from us. Defaults to false.
2786         (WebCore::RenderSVGResourceContainer::containsCyclicReference): Check whether this resource contains contains a child which references ourselves.
2787         * rendering/RenderSVGResourceMasker.cpp:
2788         (WebCore::RenderSVGResourceMasker::childElementReferencesResource): Check whether the masker child specifies mask=".." with the same URI than ourselves.
2789         (WebCore::RenderSVGResourceMasker::applyResource): Early exit if we contain a cylic reference.
2790         * rendering/RenderSVGResourceMasker.h:
2791         * rendering/RenderSVGResourcePattern.cpp:
2792         (WebCore::RenderSVGResourcePattern::childElementReferencesResource): Check whether the masker child specifies fill=".." with the same URI than ourselves.
2793         (WebCore::RenderSVGResourcePattern::applyResource): Early exit if we contain a cylic reference.
2794         * rendering/RenderSVGResourcePattern.h:
2795         * svg/SVGPaint.cpp:
2796         (WebCore::SVGPaint::matchesTargetURI): Add new helper function comparing a SVGPaint URI with a given reference id.
2797         * svg/SVGPaint.h:
2798
2799 2010-07-14  Eric Seidel  <eric@webkit.org>
2800
2801         Reviewed by Nikolas Zimmermann.
2802
2803         Selection dumping code should not dump body's offset in the document
2804         https://bugs.webkit.org/show_bug.cgi?id=42238
2805
2806         This requires updating the results of many layout tests,
2807         but has no functional change.
2808
2809         * rendering/RenderTreeAsText.cpp:
2810         (WebCore::nodePosition):
2811
2812 2010-07-14  Kent Tamura  <tkent@chromium.org>
2813
2814         Reviewed by Darin Fisher.
2815
2816         <input type=number> UI: inner spin button layout
2817         https://bugs.webkit.org/show_bug.cgi?id=41924
2818
2819         Add layout/event/style code for the inner spin button, which is
2820         going to be used for Windows implementation.
2821         No new tests because no ports implement the inner spin button yet.
2822
2823         * rendering/RenderTextControlSingleLine.cpp:
2824           Introduce m_innerSpinButton.
2825         (WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine):
2826           Detach m_innerSpinButton.
2827         (WebCore::RenderTextControlSingleLine::layout):
2828           Set position and size of m_innerSpinButton.
2829         (WebCore::RenderTextControlSingleLine::nodeAtPoint):
2830           Handle m_innerSpinButton.
2831         (WebCore::RenderTextControlSingleLine::forwardEvent):
2832           Handle m_innerSpinButton.
2833         (WebCore::RenderTextControlSingleLine::textBlockWidth):
2834           Shorten the text block width by m_innerSpinButton width.
2835         (WebCore::RenderTextControlSingleLine::preferredContentWidth):
2836           Add m_innerSpinButton width.
2837         (WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded):
2838           Handle m_innerSpinButton.
2839         (WebCore::RenderTextControlSingleLine::createInnerSpinButtonStyle):
2840           Make style for m_innerSpinButton with INNER_SPIN_BUTTON pseudo class.
2841         * rendering/RenderTextControlSingleLine.h:
2842
2843 2010-07-14  Kent Tamura  <tkent@chromium.org>
2844
2845         Reviewed by Darin Fisher.
2846
2847         <input type=number> UI: Support disabled/readonly states
2848         https://bugs.webkit.org/show_bug.cgi?id=38568
2849
2850         Implement isEnabledFormControl() and isReadOnlyFormControl() of
2851         SpinButtonElement. They returns the states of the parent <input> element.
2852         The existing isEnabledFormControl() had a bug. It didn't have 'const'
2853         modifier.
2854
2855         Test: fast/forms/input-appearance-spinbutton-disabled-readonly.html
2856
2857         * rendering/TextControlInnerElements.cpp:
2858         (WebCore::SpinButtonElement::defaultEventHandler):
2859          - If the input element is disabled or read-only, don't process events.
2860          - Protect 'input' object from destruction during focus().
2861          - Fix a hit-test issue. We don't need to add renderBox()->y() because
2862            'local' is relative to the RenderBox.
2863          - Some code cleanup
2864         * rendering/TextControlInnerElements.h:
2865         (WebCore::SpinButtonElement::isEnabledFormControl):
2866         (WebCore::SpinButtonElement::isReadOnlyFormControl):
2867
2868 2010-07-13  Simon Fraser  <simon.fraser@apple.com>
2869
2870         Reviewed by Dan Bernstein.
2871
2872         Page flashes to mostly white towards the end of loading
2873         https://bugs.webkit.org/show_bug.cgi?id=42230
2874         
2875         We constrain the size of huge composited layers. When doing so, we
2876         need to use the constained size to set the position as well
2877         as the dimensions, to ensure the layer appears in the correct place.
2878
2879         Test: compositing/tiling/constrained-layer-size.html
2880
2881         * platform/graphics/mac/GraphicsLayerCA.mm:
2882         (WebCore::GraphicsLayerCA::updateLayerPosition):
2883
2884 2010-07-13  Kent Tamura  <tkent@chromium.org>
2885
2886         Reviewed by Darin Fisher.
2887
2888         [Chromium] Linux implementation of <input type=number> UI
2889         https://bugs.webkit.org/show_bug.cgi?id=41925
2890
2891         - Move the code for scrollbar steppers from ScrollbarThemeChromiumLinux
2892           to PlatformThemeChromiumGtk.
2893         - Move the code for scrollbar colors from RenderThemeChromiumLinux
2894           to PlatformThemeChromiumGtk.
2895
2896         * WebCore.gypi:
2897         * platform/chromium/PlatformThemeChromiumGtk.cpp: Added.
2898         (WebCore::PlatformThemeChromiumGtk::setScrollbarColors): Moved from RenderThemeChromiumLinux.
2899         (WebCore::clamp): Moved from ScrollbarThemeChromiumLinux.
2900         (WebCore::PlatformThemeChromiumGtk::saturateAndBrighten): ditto.
2901         (WebCore::PlatformThemeChromiumGtk::outlineColor): ditto.
2902         (WebCore::PlatformThemeChromiumGtk::paintArrowButton): ditto.
2903         * platform/chromium/PlatformThemeChromiumGtk.h: Added.
2904         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
2905         (WebCore::ScrollbarThemeChromiumLinux::paintTrackPiece):
2906         (WebCore::ScrollbarThemeChromiumLinux::paintButton):
2907          Move the main part of the code to PlatformThemeChromiumGtk.
2908         (WebCore::ScrollbarThemeChromiumLinux::paintThumb):
2909         * rendering/RenderThemeChromiumLinux.cpp:
2910         (WebCore::RenderThemeChromiumLinux::adjustInnerSpinButtonStyle): Added.
2911         (WebCore::RenderThemeChromiumLinux::paintInnerSpinButton): Added.
2912         * rendering/RenderThemeChromiumLinux.h:
2913
2914 2010-07-13  Dumitru Daniliuc  <dumi@chromium.org>
2915
2916         Reviewed by Darin Fisher
2917
2918         Implementing DatabaseSync::transaction() and DatabaseSync::changeVersion().
2919         https://bugs.webkit.org/show_bug.cgi?id=40607
2920
2921         Tests: fast/workers/storage/change-version-handle-reuse-sync.html
2922                fast/workers/storage/change-version-sync.html
2923                fast/workers/storage/empty-statement-sync.html
2924                fast/workers/storage/execute-sql-args-sync.html
2925                fast/workers/storage/executesql-accepts-only-one-statement-sync.html
2926                fast/workers/storage/multiple-transactions-on-different-handles-sync.html
2927                fast/workers/storage/open-database-creation-callback-sync.html
2928                fast/workers/storage/open-database-empty-version-sync.html
2929                fast/workers/storage/open-database-inputs-sync.html
2930                fast/workers/storage/open-database-set-empty-version-sync.html
2931                fast/workers/storage/open-database-while-transaction-in-progress-sync.html
2932                fast/workers/storage/sql-data-types-sync.html
2933                fast/workers/storage/sql-exception-codes-sync.html
2934                fast/workers/storage/test-authorizer-sync.html
2935                fast/workers/storage/transaction-in-transaction-sync.html
2936
2937         * CMakeLists.txt:
2938         * GNUmakefile.am:
2939         * WebCore.gypi:
2940         * WebCore.pro:
2941         * WebCore.vcproj/WebCore.vcproj:
2942         * WebCore.xcodeproj/project.pbxproj:
2943         * storage/AbstractDatabase.cpp:
2944         (WebCore::AbstractDatabase::maximumSize):
2945         (WebCore::AbstractDatabase::incrementalVacuumIfNeeded):
2946         * storage/AbstractDatabase.h:
2947         (WebCore::AbstractDatabase::sqliteDatabase):
2948         * storage/ChangeVersionWrapper.cpp:
2949         (WebCore::ChangeVersionWrapper::performPreflight):
2950         (WebCore::ChangeVersionWrapper::performPostflight):
2951         * storage/Database.cpp:
2952         (WebCore::Database::performGetTableNames):
2953         * storage/Database.h:
2954         * storage/DatabaseAuthorizer.cpp:
2955         (WebCore::DatabaseAuthorizer::createVTable):
2956         (WebCore::DatabaseAuthorizer::dropVTable):
2957         * storage/DatabaseCallback.h:
2958         * storage/DatabaseSync.cpp:
2959         (WebCore::ChangeVersionPreflightStep::create):
2960         (WebCore::ChangeVersionPreflightStep::performStep):
2961         (WebCore::ChangeVersionPreflightStep::ChangeVersionPreflightStep):
2962         (WebCore::ChangeVersionPostflightStep::create):
2963         (WebCore::ChangeVersionPostflightStep::performStep):
2964         (WebCore::ChangeVersionPostflightStep::ChangeVersionPostflightStep):
2965         (WebCore::DatabaseSync::changeVersion):
2966         (WebCore::DatabaseSync::transaction):
2967         (WebCore::DatabaseSync::runTransaction):
2968         * storage/DatabaseSync.h:
2969         * storage/DatabaseTracker.cpp:
2970         (WebCore::DatabaseTracker::getMaxSizeForDatabase):
2971         * storage/SQLError.h:
2972         * storage/SQLResultSet.cpp:
2973         * storage/SQLResultSet.h:
2974         * storage/SQLStatementCallback.h:
2975         * storage/SQLStatementErrorCallback.h:
2976         * storage/SQLStatementSync.cpp: Copied from WebCore/storage/SQLStatement.cpp.
2977         (WebCore::SQLStatementSync::SQLStatementSync):
2978         (WebCore::SQLStatementSync::execute):
2979         * storage/SQLStatementSync.h: Added.
2980         * storage/SQLTransaction.cpp:
2981         (WebCore::SQLTransaction::runCurrentStatement):
2982         (WebCore::SQLTransaction::deliverQuotaIncreaseCallback):
2983         (WebCore::SQLTransaction::postflightAndCommit):
2984         * storage/SQLTransaction.h:
2985         * storage/SQLTransactionCallback.h:
2986         * storage/SQLTransactionClient.cpp:
2987         (WebCore::SQLTransactionClient::didCommitWriteTransaction):
2988         (WebCore::SQLTransactionClient::didExecuteStatement):
2989         (WebCore::SQLTransactionClient::didExceedQuota):
2990         * storage/SQLTransactionClient.h:
2991         * storage/SQLTransactionErrorCallback.h:
2992         * storage/SQLTransactionSync.cpp:
2993         (WebCore::transactionClient):
2994         (WebCore::SQLTransactionSync::create):
2995         (WebCore::SQLTransactionSync::SQLTransactionSync):
2996         (WebCore::SQLTransactionSync::~SQLTransactionSync):
2997         (WebCore::SQLTransactionSync::executeSQL):
2998         (WebCore::SQLTransactionSync::begin):
2999         (WebCore::SQLTransactionSync::execute):
3000         (WebCore::SQLTransactionSync::commit):
3001         (WebCore::SQLTransactionSync::rollback):
3002         * storage/SQLTransactionSync.h:
3003         (WebCore::SQLTransactionSync::SQLTransactionSyncOptionalStep::~SQLTransactionSyncOptionalStep):
3004         * storage/SQLTransactionSyncCallback.h:
3005         * storage/chromium/SQLTransactionClientChromium.cpp:
3006         (WebCore::SQLTransactionClient::didCommitWriteTransaction):
3007         (WebCore::SQLTransactionClient::didExecuteStatement):
3008         (WebCore::SQLTransactionClient::didExceedQuota):
3009
3010 2010-07-13  Sheriff Bot  <webkit.review.bot@gmail.com>
3011
3012         Unreviewed, rolling out r63162.
3013         http://trac.webkit.org/changeset/63162
3014         https://bugs.webkit.org/show_bug.cgi?id=42224
3015
3016         This is no longer needed (Requested by olliej_ on #webkit).
3017
3018         * bindings/v8/ScriptSourceCode.h:
3019         (WebCore::ScriptSourceCode::ScriptSourceCode):
3020
3021 2010-07-13  Eric Seidel  <eric@webkit.org>
3022
3023         Reviewed by Adam Barth.
3024
3025         Fix my misreading of "clear to the last marker" in the HTML5 spec
3026         https://bugs.webkit.org/show_bug.cgi?id=42199
3027
3028         * html/HTMLFormattingElementList.cpp:
3029         (WebCore::HTMLFormattingElementList::clearToLastMarker):
3030         * html/HTMLFormattingElementList.h:
3031         * html/HTMLTreeBuilder.cpp:
3032         (WebCore::HTMLTreeBuilder::processBodyEndTagForInBody):
3033         (WebCore::HTMLTreeBuilder::processEndOfFile):
3034
3035 2010-07-13  Oliver Hunt  <oliver@apple.com>
3036
3037         Reviewed by Gavin Barraclough.
3038
3039         ES5 requires BOMs to be treated as whitespace
3040         https://bugs.webkit.org/show_bug.cgi?id=42218
3041
3042         Remove BOM handling logic from WebCore Script objects.
3043
3044         * bindings/js/StringSourceProvider.h:
3045         (WebCore::StringSourceProvider::StringSourceProvider):
3046         * loader/CachedScript.cpp:
3047         (WebCore::CachedScript::CachedScript):
3048         (WebCore::CachedScript::script):
3049         * loader/CachedScript.h:
3050
3051 2010-07-13  Andreas Kling  <andreas.kling@nokia.com>
3052
3053         Reviewed by Darin Adler.
3054
3055         Canvas: rect(x,y,w,h) should move to (x,y) even if w=0 and h=0
3056         https://bugs.webkit.org/show_bug.cgi?id=42211
3057
3058         * html/canvas/CanvasRenderingContext2D.cpp:
3059         (WebCore::CanvasRenderingContext2D::rect):
3060
3061 2010-07-13  Simon Fraser  <simon.fraser@apple.com>
3062
3063         Reviewed by Dan Bernstein.
3064
3065         Show IDs and classnames in layer tree dumps
3066         https://bugs.webkit.org/show_bug.cgi?id=42213
3067
3068         When dumping the layer tree via showLayerTree(), include id and class attributes for
3069         ease of debugging.
3070         
3071         No tests, since this is debug-only code.
3072
3073         * rendering/RenderLayer.cpp:
3074         (showLayerTree):
3075         * rendering/RenderTreeAsText.cpp:
3076         (WebCore::RenderTreeAsText::writeRenderObject):
3077         * rendering/RenderTreeAsText.h:
3078         (WebCore::):
3079
3080 2010-07-13  Simon Fraser  <simon.fraser@apple.com>
3081
3082         Build fix: fix WebCore exports by editing the .in file, rather than the generated file.
3083
3084         * WebCore.exp.in:
3085
3086 2010-07-13  Alexey Proskuryakov  <ap@apple.com>
3087
3088         Reviewed by Darin Adler.
3089
3090         https://bugs.webkit.org/show_bug.cgi?id=42216
3091         ResourceRequest::doUpdateResourceRequest() crashes if client denied request
3092
3093         This is covered by many regression tests with patch for bug 42201 applied (because it makes
3094         us also use this code path for sync requests, and those currently have more strict limitations).
3095
3096         * platform/network/cf/ResourceRequestCFNet.cpp:
3097         (WebCore::ResourceRequest::doUpdateResourceRequest): Added a null check.
3098
3099 2010-07-13  Eric Seidel  <eric@webkit.org>
3100
3101         Reviewed by Adam Barth.
3102
3103         Make our end tag in-foreign-content mode spec bug workarounds more closely match minefield
3104         https://bugs.webkit.org/show_bug.cgi?id=42187
3105
3106         I do not expect these work-arounds to be permanent.  Hixie has promised to
3107         addresses the feedback to the parser sections of HTML5 soon.
3108         I added these hacks to make our hacks more-closely match Minefield's hacks
3109         and thus have us "pass" a few more html5lib runner tests.
3110
3111         We now pass all of the html5lib foreign content tests
3112         (thus we'll likely need to write more).
3113
3114         Tested by html5lib/runner.html
3115
3116         * html/HTMLElementStack.cpp:
3117         (WebCore::HTMLElementStack::contains):
3118         * html/HTMLElementStack.h:
3119         * html/HTMLTreeBuilder.cpp:
3120         (WebCore::HTMLTreeBuilder::processEndTag):
3121
3122 2010-07-12  Tony Gentilcore  <tonyg@chromium.org>
3123
3124         Reviewed by Darin Fisher.
3125
3126         Wire network times from ResourceLoadTiming to performance.timing
3127         https://bugs.webkit.org/show_bug.cgi?id=41824
3128
3129         * page/Timing.cpp:
3130         (WebCore::Timing::domainLookupStart): http://dev.w3.org/2006/webapi/WebTiming/#nt-domain-lookupstart
3131         (WebCore::Timing::domainLookupEnd): http://dev.w3.org/2006/webapi/WebTiming/#nt-domain-lookupend
3132         (WebCore::Timing::connectStart): http://dev.w3.org/2006/webapi/WebTiming/#nt-connect-start
3133         (WebCore::Timing::connectEnd): http://dev.w3.org/2006/webapi/WebTiming/#nt-connect-end
3134         (WebCore::Timing::requestStart): http://dev.w3.org/2006/webapi/WebTiming/#nt-request-start
3135         (WebCore::Timing::requestEnd): http://dev.w3.org/2006/webapi/WebTiming/#nt-request-end
3136         (WebCore::Timing::responseStart): http://dev.w3.org/2006/webapi/WebTiming/#nt-response-start
3137         (WebCore::Timing::resourceLoadTiming):
3138         * page/Timing.h:
3139         * page/Timing.idl:
3140
3141 2010-07-13  Anders Carlsson  <andersca@apple.com>
3142
3143         Reviewed by Sam Weinig.
3144
3145         Add support for loading javascript: URLs
3146         https://bugs.webkit.org/show_bug.cgi?id=42221
3147
3148         * WebCore.exp.in:
3149         Export protocolIsJavaScript and ScriptValue::getString.
3150
3151 2010-07-13  Anders Carlsson  <andersca@apple.com>
3152
3153         Reviewed by Sam Weinig.
3154
3155         Add support for URL frame loading using NPN_GetURLNotify
3156         https://bugs.webkit.org/show_bug.cgi?id=42192
3157
3158         * WebCore.exp.in:
3159         Export ResourceRequestBase::setHTTPMethod and ResourceRequestBase::setURL.
3160
3161 2010-07-04  Zhenyao Mo  <zmo@google.com>
3162
3163         Reviewed by Darin Fisher.
3164
3165         Need to track texture completeness
3166         https://bugs.webkit.org/show_bug.cgi?id=41381
3167
3168         Test: fast/canvas/webgl/texture-complete.html
3169
3170         * html/canvas/WebGLRenderingContext.cpp:
3171         (WebCore::WebGLRenderingContext::WebGLRenderingContext): Init max texture level.
3172         (WebCore::WebGLRenderingContext::bindTexture): Pass max texture level to setTarget().
3173         (WebCore::WebGLRenderingContext::copyTexImage2D): Cache full texture info rather than partial.
3174         (WebCore::WebGLRenderingContext::generateMipmap): Ditto.
3175         (WebCore::WebGLRenderingContext::texImage2DBase): Ditto.
3176         (WebCore::WebGLRenderingContext::validateTexFuncParameters): Also validate level.
3177         * html/canvas/WebGLRenderingContext.h: Add max texture level.
3178         * html/canvas/WebGLTexture.cpp: Update the class to fully cache texture information and track NPOT and COMPLETE states.
3179         (WebCore::WebGLTexture::WebGLTexture):
3180         (WebCore::WebGLTexture::setTarget): Check whether the texture is initialized or has been deleted.
3181         (WebCore::WebGLTexture::setParameteri): Ditto.
3182         (WebCore::WebGLTexture::setParameterf): Ditto.
3183         (WebCore::WebGLTexture::setLevelInfo): Set texture info.
3184         (WebCore::WebGLTexture::generateMipmapLevelInfo): Generate texture info for all levels after generateMipmaps() is called.
3185         (WebCore::WebGLTexture::getInternalFormat): Return internal format on texture face 0 level 0.
3186         (WebCore::WebGLTexture::isNPOT): Check whether the texture is initialized or has been deleted.
3187         (WebCore::WebGLTexture::needToUseBlackTexture): Ditto.
3188         (WebCore::WebGLTexture::_deleteObject):
3189         (WebCore::WebGLTexture::mapTargetToIndex): Map target to index.
3190         (WebCore::WebGLTexture::canGenerateMipmaps): Check whether Mipmaps can be generated.
3191         (WebCore::WebGLTexture::computeLevelCount): Compute texture level count from width/height.
3192         (WebCore::WebGLTexture::update): Update NPOT/COMPLETE states.
3193         * html/canvas/WebGLTexture.h: Ditto.
3194         (WebCore::WebGLTexture::LevelInfo::LevelInfo): Add data structure to fully cache texture info.
3195         (WebCore::WebGLTexture::LevelInfo::setInfo): Set information.
3196
3197 2010-07-13  Andreas Kling  <andreas.kling@nokia.com>
3198
3199         Reviewed by Darin Adler.
3200
3201         Canvas: drawImage() with wrong 'image' argument type should always throw TypeError
3202         https://bugs.webkit.org/show_bug.cgi?id=42160
3203
3204         Test: canvas/philip/tests/2d.drawImage.wrongtype.html
3205
3206         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
3207         (WebCore::JSCanvasRenderingContext2D::drawImage): Throw TypeError instead of
3208         TYPE_MISMATCH_ERR if 'image' argument is not an image, canvas or video element.
3209
3210 2010-07-13  Aaron Boodman  <aa@chromium.org>
3211
3212         Reviewed by Timothy Hatcher.
3213
3214         Don't reset per-document user style caches when user styles are updated in
3215         Chromium.
3216
3217         https://bugs.webkit.org/show_bug.cgi?id=42003
3218
3219         * page/PageGroup.cpp:
3220         (WebCore::PageGroup::addUserStyleSheetToWorld):
3221         (WebCore::PageGroup::removeUserStyleSheetFromWorld):
3222         (WebCore::PageGroup::removeUserStyleSheetsFromWorld):
3223         (WebCore::PageGroup::removeAllUserContent):
3224         (WebCore::PageGroup::resetUserStyleCacheInAllFrames):
3225         * page/PageGroup.h:
3226
3227 2010-07-13  Eric Carlson  <eric.carlson@apple.com>
3228
3229         Reviewed by Dan Bernstein.
3230
3231         On Leopard, media element can't handle audio/mp4 MIME type in source tag
3232         https://bugs.webkit.org/show_bug.cgi?id=29326
3233
3234         Test: media/media-can-play-mpeg-audio.html
3235
3236         * platform/MIMETypeRegistry.cpp:
3237         (WebCore::TypeExtensionPair::): Add "audio/mp4", "m4a" to mappings table.
3238
3239 2010-07-13  Tony Gentilcore  <tonyg@chromium.org>
3240
3241         Reviewed by Darin Fisher.
3242
3243         Implement performance.timing.fetchStart
3244         https://bugs.webkit.org/show_bug.cgi?id=41816
3245
3246         See: http://dev.w3.org/2006/webapi/WebTiming/#nt-fetch-start
3247
3248         * loader/MainResourceLoader.cpp:
3249         (WebCore::MainResourceLoader::willSendRequest): Record the fetchStart time for each request for the main resource. This means it is called for each server redirect, overwritting the previous value. In https://bugs.webkit.org/show_bug.cgi?id=42018, this will be modified such that if a previous value exists, it is stored as the redirect time.
3250         * loader/FrameLoaderTypes.h:
3251         (WebCore::FrameLoadTimeline::FrameLoadTimeline):
3252         * page/Timing.cpp:
3253         (WebCore::Timing::fetchStart):
3254         * page/Timing.h:
3255         * page/Timing.idl:
3256
3257 2010-07-13  Satish Sampath  <satish@chromium.org>
3258
3259         Reviewed by Steve Block.
3260
3261         Speech input plumbing in webcore
3262         https://bugs.webkit.org/show_bug.cgi?id=41518
3263
3264         Adds the following:
3265         - a SpeechInput class to be used by the speech enabled HTML elements
3266         - a SpeechInputListener interface to be implemented by the speech enabled HTML elements
3267         - a SpeechInputClient interface (defined in WebCore, implemented by WebKit) for WebCore to call into WebKit.
3268           This is available as a member of WebCore::Page, set by the platforms which support speech input.
3269         - a SpeechInputClientListener interface for WebCore to receive events from WebKit
3270
3271         No new tests, the relevant LayoutTestController bindings will be added in a subsequent patch.
3272
3273         * Android.mk:
3274         * GNUmakefile.am:
3275         * WebCore.gypi:
3276         * WebCore.pro:
3277         * WebCore.vcproj/WebCore.vcproj:
3278         * WebCore.xcodeproj/project.pbxproj:
3279         * page/Page.cpp:
3280         (WebCore::Page::Page):
3281         * page/Page.h: Added SpeechInputClient member variable and associated methods.
3282         (WebCore::Page::setSpeechInputClient):
3283         (WebCore::Page::speechInputClient):
3284         * page/SpeechInput.cpp: Added new class to provide speech API services to HTML elements.
3285         (WebCore::SpeechInput::SpeechInput):
3286         (WebCore::SpeechInput::recordingComplete):
3287         (WebCore::SpeechInput::setRecognitionResult):
3288         (WebCore::SpeechInput::startRecognition):
3289         * page/SpeechInput.h: Added.
3290         (WebCore::SpeechInput::~SpeechInput):
3291         (WebCore::SpeechInput::client):
3292         * page/SpeechInputListener.h: Added.
3293         (WebCore::SpeechInputListener::~SpeechInputListener):
3294         * page/SpeechInputClient.h: Added new interface implemented by WebKit to bubble up speech API requests to the embedder.
3295         (WebCore::SpeechInputClient::~SpeechInputClient):
3296         * page/SpeechInputClientListener.h: Added.
3297         (WebCore::SpeechInputClientListener::~SpeechInputClientListener):
3298
3299 2010-07-13  Richard Moore <rich@kde.org>, Robert Hogan  <robert@webkit.org>
3300
3301         Reviewed by Simon Hausmann.
3302
3303         [Qt] MIME handling in qtwebkit network layer case-sensitivity
3304
3305         https://bugs.webkit.org/show_bug.cgi?id=28654
3306
3307         Like other platforms, Qt needs to convert MIME types to lower case
3308         so they will be handled by WebCore.
3309
3310         * platform/network/qt/QNetworkReplyHandler.cpp:
3311         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
3312
3313 2010-07-13  James Robinson  <jamesr@chromium.org>
3314
3315         Reviewed by Simon Fraser.
3316
3317         REGRESSION(55056) debug builds ASSERT falsely on pages with animations
3318         https://bugs.webkit.org/show_bug.cgi?id=42175
3319
3320         Revision 55065 added some repaint box precomputation and some debug ASSERT()ions
3321         to ensure the precomputed values were valid.  However, if animations are enabled and
3322         not hardware accelerated, the repaint box dimensions become time-dependent and the
3323         ASSERT()s can trigger.  This can make it impossible to interactively debug pages
3324         like google maps.
3325
3326         https://bugs.webkit.org/show_bug.cgi?id=37048 is another example of an assertion
3327         failing due to time dependent animation values.
3328
3329         * rendering/RenderObject.cpp:
3330         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
3331
3332 2010-07-13  Zhenyao Mo  <zmo@google.com>
3333
3334         Reviewed by Darin Fisher.
3335
3336         Implement bufferData and bufferSubData with ArrayBuffer as input
3337         https://bugs.webkit.org/show_bug.cgi?id=41884
3338
3339         Test: fast/canvas/webgl/buffer-data-array-buffer.html
3340
3341         * html/canvas/WebGLBuffer.cpp: Implement associateBufferData & associateBufferSubData with ArrayBuffer as input.
3342         (WebCore::WebGLBuffer::associateBufferData):
3343         (WebCore::WebGLBuffer::associateBufferSubData):
3344         * html/canvas/WebGLBuffer.h: Ditto.
3345         * html/canvas/WebGLRenderingContext.cpp: Implement bufferData and bufferSubData with ArrayBuffer as input.
3346         (WebCore::WebGLRenderingContext::bufferData):
3347         (WebCore::WebGLRenderingContext::bufferSubData):
3348         * html/canvas/WebGLRenderingContext.h: Ditto.
3349         * html/canvas/WebGLRenderingContext.idl: Ditto.
3350         * platform/graphics/GraphicsContext3D.h: Ditto.
3351         * platform/graphics/mac/GraphicsContext3DMac.mm: Ditto.
3352         (WebCore::GraphicsContext3D::bufferData):
3353         (WebCore::GraphicsContext3D::bufferSubData):
3354
3355 2010-07-13  Tony Gentilcore  <tonyg@chromium.org>
3356
3357         Reviewed by Darin Fisher.
3358
3359         Implement performance.timing.responseEnd
3360         https://bugs.webkit.org/show_bug.cgi?id=42006
3361
3362         See: http://dev.w3.org/2006/webapi/WebTiming/#nt-response-end
3363
3364         * loader/FrameLoader.cpp:
3365         (WebCore::FrameLoader::finishedLoading):
3366         * loader/FrameLoaderTypes.h:
3367         (WebCore::FrameLoadTimeline::FrameLoadTimeline):
3368         * page/Timing.cpp:
3369         (WebCore::Timing::responseEnd):
3370         * page/Timing.h:
3371         * page/Timing.idl:
3372
3373 2010-07-13  W. James MacLean <wjmaclean@chromium.org>
3374
3375         Reviewed by Darin Fisher
3376
3377         Bug 41962 Limit html canvas element dimensions to 32767 for Skia platform
3378         https://bugs.webkit.org/show_bug.cgi?id=41962
3379
3380         Test: fast/canvas/canvas-skia-excessive-size.html
3381
3382         * WebCore/html/HTMLCanvasElement.cpp
3383         (WebCore::HTMLCanvasElement::convertLogicalToDevice):
3384
3385 2010-07-10  Zhenyao Mo  <zmo@google.com>
3386
3387         Reviewed by Darin Fisher.
3388
3389         Need to emulate MAX_VARYING_VECTORS/MAX_FRAGMENT_UNIFORM_VECTORs/MAX_VERTEX_UNIFORM_VECTORS for glGet
3390         https://bugs.webkit.org/show_bug.cgi?id=42032
3391
3392         * platform/graphics/mac/GraphicsContext3DMac.mm:
3393         (WebCore::GraphicsContext3D::getIntegerv): Emulate the enums.
3394
3395 2010-07-13  Philippe Normand  <pnormand@igalia.com>
3396
3397         Reviewed by Eric Carlson.
3398
3399         [GTK] video playback position query flood when mouse over the video element
3400         https://bugs.webkit.org/show_bug.cgi?id=35333
3401
3402         Don't trigger a position query only to know which play/pause
3403         button to display. Instead use the media-control button display
3404         type to select the image to paint.
3405
3406         * platform/gtk/RenderThemeGtk.cpp:
3407         (WebCore::RenderThemeGtk::paintMediaPlayButton):
3408
3409 2010-07-13  Sheriff Bot  <webkit.review.bot@gmail.com>
3410
3411         Unreviewed, rolling out r63192.
3412         http://trac.webkit.org/changeset/63192
3413         https://bugs.webkit.org/show_bug.cgi?id=42173
3414
3415         Broke fast/backgrounds/size/contain-and-cover.html (Requested
3416         by kling on #webkit).
3417
3418         * manual-tests/css3-background-layer-count.html: Removed.
3419         * rendering/style/FillLayer.cpp:
3420         (WebCore::FillLayer::cullEmptyLayers):
3421
3422 2010-07-13  Marcus Bulach  <bulach@chromium.org>
3423
3424         Reviewed by Jeremy Orlow.
3425
3426         Removes cycles caused by "m_this" members in a few IndexedDB classes.
3427         https://bugs.webkit.org/show_bug.cgi?id=42161
3428
3429         Adds IDBAny::create for the various types.
3430         No functionality change, just cleaning up.
3431
3432         * storage/IDBAny.cpp:
3433         (WebCore::createIDBAny):
3434         (WebCore::IDBAny::create):
3435         * storage/IDBAny.h:
3436         * storage/IDBDatabaseRequest.cpp:
3437         (WebCore::IDBDatabaseRequest::IDBDatabaseRequest):
3438         (WebCore::IDBDatabaseRequest::createObjectStore):
3439         (WebCore::IDBDatabaseRequest::removeObjectStore):
3440         * storage/IDBDatabaseRequest.h:
3441         * storage/IDBKeyRange.cpp:
3442         (WebCore::IDBKeyRange::IDBKeyRange):
3443         * storage/IDBKeyRange.h:
3444         (WebCore::IDBKeyRange::left):
3445         (WebCore::IDBKeyRange::right):
3446         * storage/IDBObjectStoreRequest.cpp:
3447         (WebCore::IDBObjectStoreRequest::IDBObjectStoreRequest):
3448         (WebCore::IDBObjectStoreRequest::get):
3449         (WebCore::IDBObjectStoreRequest::add):
3450         (WebCore::IDBObjectStoreRequest::put):
3451         (WebCore::IDBObjectStoreRequest::remove):
3452         (WebCore::IDBObjectStoreRequest::createIndex):
3453         (WebCore::IDBObjectStoreRequest::removeIndex):
3454         * storage/IDBObjectStoreRequest.h:
3455         * storage/IndexedDatabaseRequest.cpp:
3456         (WebCore::IndexedDatabaseRequest::IndexedDatabaseRequest):
3457         (WebCore::IndexedDatabaseRequest::open):
3458         * storage/IndexedDatabaseRequest.h:
3459
3460 2010-07-13  Antti Koivisto  <koivisto@iki.fi>
3461
3462         Reviewed by Kenneth Rohde Christiansen.
3463
3464         [Qt] Land the initial build system for WebKit2
3465         https://bugs.webkit.org/show_bug.cgi?id=41604
3466
3467         The build is enabled by passing --qmakearg="CONFIG+=webkit2" to build-webkit
3468
3469         * WebCore.pri:
3470         * WebCore.pro:
3471
3472 2010-07-13  Leon Clarke  <leonclarke@google.com>
3473
3474         Reviewed by Pavel Feldman.
3475
3476         Don't access objects after deleting them, following
3477         the addition of link prefetching. Also remove a forward declaration
3478         of the now-nonexistent CachedLinkPrefetch class.
3479         https://bugs.webkit.org/show_bug.cgi?id=3652
3480
3481         No new tests. Correcting aspects of the prefetch change that shouldn't
3482         have affected functionality.
3483
3484         * html/HTMLLinkElement.h:
3485         * loader/loader.cpp:
3486         (WebCore::Loader::Host::cancelPendingRequests):
3487
3488 2010-07-13  Andras Becsi  <abecsi@webkit.org>
3489
3490         Reviewed by Simon Hausmann.
3491
3492         [Qt] Fix the case of a linker option to lowercase to be able to
3493         cross compile QtWebKit for Windows on Linux.
3494
3495         No new tests needed.
3496
3497         * WebCore.pro:
3498
3499 2010-07-12  Ilya Tikhonovsky  <loislo@chromium.org>
3500
3501         Reviewed by Yury Semikhatsky.
3502
3503         WebInspector: Next iteration of Inspector code generator.
3504         The InspectorFrontend2 was replaced by slightly modified version of
3505         InspectorBackend file (Inspector.idl). At the end all the interface
3506         between WebInspector and inspected page will be specified by this file
3507         and generated by CodeGeneratorInspector (InspectorFrontend.cpp,
3508         InspectorBackend.cpp and InspectorBackend.js).
3509         https://bugs.webkit.org/show_bug.cgi?id=42104
3510
3511         * DerivedSources.make:
3512         * GNUmakefile.am:
3513         * WebCore.gyp/WebCore.gyp:
3514         * WebCore.gyp/scripts/rule_binding.py:
3515         * WebCore.gypi:
3516         * WebCore.pri:
3517         * WebCore.xcodeproj/project.pbxproj:
3518         * bindings/scripts/IDLParser.pm:
3519         * bindings/scripts/IDLStructure.pm:
3520         * bindings/scripts/generate-bindings.pl:
3521         * inspector/CodeGeneratorInspector.pm:
3522         * inspector/Inspector.idl: Added.
3523         * inspector/InspectorCSSStore.cpp:
3524         (WebCore::InspectorCSSStore::inspectorStyleSheet):
3525         * inspector/InspectorController.cpp:
3526         (WebCore::InspectorController::connectFrontend):
3527         (WebCore::InspectorController::startTimelineProfiler):
3528         * inspector/InspectorController.h:
3529         (WebCore::InspectorController::remoteInspectorFrontend):
3530         * inspector/InspectorDOMAgent.cpp:
3531         (WebCore::InspectorDOMAgent::InspectorDOMAgent):
3532         * inspector/InspectorDOMAgent.h:
3533         (WebCore::InspectorDOMAgent::create):
3534         * inspector/InspectorFrontend2.idl: Removed.
3535         * inspector/InspectorTimelineAgent.cpp:
3536         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
3537         (WebCore::InspectorTimelineAgent::resetFrontendProxyObject):
3538         * inspector/InspectorTimelineAgent.h:
3539
3540 2010-07-12  Steve Block  <steveblock@google.com>
3541
3542         Reviewed by Jeremy Orlow.
3543
3544         DeviceOrientationEvent should use optional properties
3545         https://bugs.webkit.org/show_bug.cgi?id=41607
3546
3547         This change adds a new DeviceOrientation class which takes care of which of the
3548         optional properties are present. DeviceOrientationEvent owns an instance of
3549         DeviceOrientation, rather than owning the properties directly.
3550         DeviceOrientationEvent now requires custom bindings.
3551
3552         Test: fast/dom/DeviceOrientation/optional-event-properties.html
3553
3554         * Android.mk:
3555         * Android.jscbindings.mk:
3556         * Android.v8bindings.mk:
3557         * CMakeLists.txt:
3558         * GNUmakefile.am:
3559         * WebCore.gypi:
3560         * WebCore.pro:
3561         * WebCore.vcproj/WebCore.vcproj:
3562         * WebCore.xcodeproj/project.pbxproj:
3563         * bindings/js/JSBindingsAllInOne.cpp:
3564         * bindings/js/JSDeviceOrientationEventCustom.cpp: Added.
3565         (WebCore::JSDeviceOrientationEvent::alpha):
3566         (WebCore::JSDeviceOrientationEvent::beta):
3567         (WebCore::JSDeviceOrientationEvent::gamma):
3568         (WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent):
3569         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp: Added.
3570         (WebCore::V8DeviceOrientationEvent::alphaAccessorGetter):
3571         (WebCore::V8DeviceOrientationEvent::betaAccessorGetter):
3572         (WebCore::V8DeviceOrientationEvent::gammaAccessorGetter):
3573         (WebCore::V8DeviceOrientationEvent::initDeviceOrientationEventCallback):
3574         * dom/DeviceOrientation.cpp: Added.
3575         * dom/DeviceOrientation.h: Added.
3576         (WebCore::DeviceOrientation::create):
3577         (WebCore::DeviceOrientation::canProvideAlpha):
3578         (WebCore::DeviceOrientation::alpha):
3579         (WebCore::DeviceOrientation::canProvideBeta):
3580         (WebCore::DeviceOrientation::beta):
3581         (WebCore::DeviceOrientation::canProvideGamma):
3582         (WebCore::DeviceOrientation::gamma):
3583         (WebCore::DeviceOrientation::DeviceOrientation):
3584         * dom/DeviceOrientationEvent.cpp:
3585         (WebCore::DeviceOrientationEvent::DeviceOrientationEvent):
3586         (WebCore::DeviceOrientationEvent::initDeviceOrientationEvent):
3587         * dom/DeviceOrientationEvent.h:
3588         (WebCore::DeviceOrientationEvent::create):
3589         (WebCore::DeviceOrientationEvent::orientation):
3590         * dom/DeviceOrientationEvent.idl:
3591
3592 2010-07-13  Andreas Kling  <andreas.kling@nokia.com>
3593
3594         Reviewed by Antti Koivisto.
3595
3596         CSS3 background: Number of layers should be determined by background-image element count
3597         https://bugs.webkit.org/show_bug.cgi?id=41201
3598
3599         Change FillLayer culling logic to discard all layers
3600         after the first one without an image set.
3601
3602         Manual test: css3-background-layer-count.html
3603
3604         * manual-tests/css3-background-layer-count.html: Added.
3605         * rendering/style/FillLayer.cpp:
3606         (WebCore::FillLayer::cullEmptyLayers):
3607
3608 2010-07-07  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
3609
3610         Reviewed by Darin Adler.
3611
3612         Prevent assertion/duplicate loads for non-deferred subtitute-data loads
3613
3614         https://bugs.webkit.org/show_bug.cgi?id=30879
3615
3616         MainResourceLoader uses the member m_initialRequest to store requests for future
3617         deferred loads. When doing the actual load in handleDataLoadNow(), we therefore
3618         have to clear this request so that subsequent entries into the loader will not
3619         start yet another load.
3620
3621         This can happen as a result of a PageGroupLoadDeferrer going out of scope when
3622         returning from Chrome::runJavaScriptAlert(), which calls setDeferredLoading(false),
3623         but only in the case of using both substitute-data and non-deferred main resource
3624         load together. That's why two new DRT functions were added:
3625
3626          * queueLoadHTMLString()
3627          * setDeferMainResourceLoad()
3628
3629         The change adds DRT hooks for Mac, Win and Qt for these two functions. For Mac
3630         and Win the hook uses new SPI in WebDataSource. For Qt a new static member was
3631         added to the FrameLoaderClientQt and accessed though DumpRenderTreeSupportQt.
3632
3633         Test: fast/loader/non-deferred-substitute-load.html
3634
3635         * loader/MainResourceLoader.cpp:
3636         (WebCore::MainResourceLoader::handleDataLoadNow):
3637
3638 2010-07-13  Yoshiki Hayashi  <yhayashi@google.com>
3639
3640         Reviewed by Kent Tamura.
3641
3642         Make sure correct Nodes are passed to childrenChanged so that
3643         :last-child gets properly applied when fragment is inserted.
3644         https://bugs.webkit.org/show_bug.cgi?id=37944
3645
3646         Test: fast/css/last-child-innerhtml.html
3647
3648         * dom/ContainerNode.cpp:
3649         (WebCore::ContainerNode::replaceChild):
3650         (WebCore::ContainerNode::appendChild):
3651
3652 2010-07-13  Ryosuke Niwa  <rniwa@webkit.org>
3653
3654         Reviewed by Kent Tamura.
3655
3656         InsertListCommand's modifyRange and doApply should be merged
3657         https://bugs.webkit.org/show_bug.cgi?id=41403
3658
3659         Isolated the code in doApply to insert and remove lists for single paragraph into doApplyForSingleParagraph.
3660         Merged the code in modifyRange into doApply and cleaned up.
3661
3662         No test is added since this is a clean up.
3663
3664         * editing/InsertListCommand.cpp:
3665         (WebCore::InsertListCommand::InsertListCommand): m_forceCreateList is no longer initialized
3666         (WebCore::InsertListCommand::doApply): Isolated the code to insert/remove lists in doApplyForSingleParagraph
3667         (WebCore::InsertListCommand::doApplyForSingleParagraph): Insert/remove lists for single paragraph
3668         * editing/InsertListCommand.h: Added doApplyForSingleParagraph and removed m_forceCreateList
3669
3670 2010-07-12  Eric Seidel  <eric@webkit.org>
3671
3672         Reviewed by Adam Barth.
3673
3674         Fix typo in "close the cell" which caused assertion
3675         https://bugs.webkit.org/show_bug.cgi?id=42138
3676
3677         * html/HTMLTreeBuilder.cpp:
3678         (WebCore::HTMLTreeBuilder::closeTheCell):
3679
3680 2010-07-12  Eric Seidel  <eric@webkit.org>
3681
3682         Reviewed by Adam Barth.
3683
3684         Fix line number handling in HTMLTreeBuilder to fix a zillion layout tests
3685         https://bugs.webkit.org/show_bug.cgi?id=42143
3686
3687         Covered by a zillion layout tests.
3688
3689         * html/HTMLTreeBuilder.cpp:
3690         (WebCore::HTMLTreeBuilder::processEndTag):
3691         (WebCore::HTMLTreeBuilder::processScriptStartTag):
3692
3693 2010-07-12  Jay Civelli  <jcivelli@chromium.org>
3694
3695         Reviewed by Kent Tamura.
3696
3697         Adding right aligned text called labels to PopupMenus.
3698         https://bugs.webkit.org/show_bug.cgi?id=41964
3699
3700         * platform/PopupMenuClient.h:
3701         * platform/chromium/PopupMenuChromium.cpp:
3702         (WebCore::PopupListBox::paintRow):
3703         * rendering/RenderMenuList.cpp:
3704         (WebCore::RenderMenuList::itemLabel):
3705         * rendering/RenderMenuList.h:
3706         * rendering/RenderTextControlSingleLine.cpp:
3707         (WebCore::RenderTextControlSingleLine::itemLabel):
3708         * rendering/RenderTextControlSingleLine.h:
3709
3710 2010-07-12  Mihnea Ovidenea  <mihnea@adobe.com>
3711
3712         Reviewed by Dirk Schulze.
3713
3714         [Cairo] Incorrect Test for Text Fill
3715         https://bugs.webkit.org/show_bug.cgi?id=42123
3716
3717         Correct test used for text shadow.  It currently checks for
3718         equality with cTextFill.  However, this test fails if the
3719         text drawing mode is set to 'cTextFill | cTextStroke'.  Fix
3720         is to modify the test to be like other Cairo uses of the
3721         text drawing mode, and check for the cTextFill bit being
3722         set, not for equality with the bit.
3723
3724         * platform/graphics/cairo/FontCairo.cpp:
3725         (WebCore::Font::drawGlyphs):
3726
3727 2010-07-12  Eric Seidel  <eric@webkit.org>
3728
3729         Reviewed by Sam Weinig.
3730
3731         Fix a typo in the adoption agency causing test failures
3732         https://bugs.webkit.org/show_bug.cgi?id=42133
3733
3734         The new behavior actually differs from old webkit.
3735         <p><b><p>TEST
3736         was not bold in the old parser, but is bold now.
3737         This matches Minefield and the HTML5 spec.
3738
3739         Covered by two tests in html5lib/runner.html.
3740
3741         * html/HTMLTreeBuilder.cpp:
3742         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
3743
3744 2010-07-12  Pavel Feldman  <pfeldman@chromium.org>
3745
3746         Reviewed by Joseph Pecoraro.
3747
3748         Web Inspector: provide starts and ends for network phases instead of duration.
3749
3750         https://bugs.webkit.org/show_bug.cgi?id=42091
3751
3752         * inspector/InspectorResource.cpp:
3753         (WebCore::InspectorResource::updateResponse):
3754         (WebCore::InspectorResource::updateScriptObject):
3755         (WebCore::InspectorResource::buildObjectForTiming):
3756         * platform/network/ResourceLoadTiming.h:
3757         (WebCore::ResourceLoadTiming::deepCopy):
3758         (WebCore::ResourceLoadTiming::operator==):
3759         (WebCore::ResourceLoadTiming::ResourceLoadTiming):
3760         * platform/network/ResourceResponseBase.cpp:
3761         (WebCore::ResourceResponseBase::ResourceResponseBase):
3762         (WebCore::ResourceResponseBase::wasCached):
3763         (WebCore::ResourceResponseBase::setWasCached):
3764         * platform/network/ResourceResponseBase.h:
3765
3766 2010-07-12  Adam Barth  <abarth@webkit.org>
3767
3768         Reviewed by Eric Seidel.
3769
3770         HTML5 Parser: document.write after onload blows away document
3771         https://bugs.webkit.org/show_bug.cgi?id=40745
3772
3773         Rather than blowing away the document when we get a document.write call
3774         after the document is closed, we new ignore the write.  This
3775         technically violates the spec (which requires us to blow away the
3776         document), but blowing away the document breaks too many web sites.
3777
3778         Rather than this patch, we could go back to our old behavior (which was
3779         to append the bytes just before EOF), but implementing this approach
3780         (suggested by Henri) will let us gather data about whether his approach
3781         is workable.
3782
3783         See also: http://www.w3.org/Bugs/Public/show_bug.cgi?id=9767
3784
3785         * dom/Document.cpp:
3786         (WebCore::Document::write):
3787         * html/HTMLDocumentParser.cpp:
3788         (WebCore::HTMLDocumentParser::insert):
3789
3790 2010-07-12  Tony Gentilcore  <tonyg@chromium.org>
3791
3792         Reviewed by Oliver Hunt.
3793
3794         Strip BOMs from source before passing to V8
3795         https://bugs.webkit.org/show_bug.cgi?id=42102
3796
3797         This extra copy may carry a performance penalty. We should investigate
3798         whether this allows any simplification in v8/scanner.cc:SkipJavaScriptWhiteSpace().
3799
3800         No new tests because no new functionality.
3801
3802         * bindings/v8/ScriptSourceCode.h:
3803         (WebCore::ScriptSourceCode::ScriptSourceCode):
3804
3805 2010-07-12  Gustavo Noronha Silva  <gns@gnome.org>
3806
3807         Unreviewed. make distcheck fix.
3808
3809         * GNUmakefile.am:
3810
3811 2010-07-12  Yuta Kitamura  <yutak@chromium.org>
3812
3813         Reviewed by Alexey Proskuryakov.
3814
3815         Fix crash caused by unintentional deletion of worker bridge and channel.
3816
3817         WebSocket: Crash caused by calling close() within onmessage handler
3818         https://bugs.webkit.org/show_bug.cgi?id=41507
3819
3820         Test: websocket/tests/workers/close-in-onmessage-crash.html
3821
3822         * websockets/WebSocket.cpp:
3823         (WebCore::WebSocket::close): bufferedAmount() may call WebSocket::didClose(),
3824         which causes m_channel to get freed.
3825         * websockets/WorkerThreadableWebSocketChannel.cpp:
3826         (WebCore::WorkerThreadableWebSocketChannel::Bridge::send): Add reference to
3827         the bridge because waitForMethodCompletion() may dereference the bridge.
3828         (WebCore::WorkerThreadableWebSocketChannel::Bridge::bufferedAmount): Ditto.
3829         (WebCore::WorkerThreadableWebSocketChannel::Bridge::waitForMethodCompletion):
3830         The root cause is a call to WorkerRunLoop::runInMode in this function.
3831         It may call WebSocket::didClose() even inside WebSocket::close(), which frees
3832         everything including the worker bridge and the channel.
3833
3834 2010-07-12  Adam Barth  <abarth@webkit.org>
3835
3836         Reviewed by Eric Seidel.
3837
3838         REGRESSION (HTML5 parser?): Impossible to get past the CAPTCHA on postcode.royalmail.com
3839         https://bugs.webkit.org/show_bug.cgi?id=41797
3840
3841         Once we resume parsing after script execution, we want to clear the
3842         preload scanner so we don't scan any bytes it might have accumulated.
3843
3844         Test: http/tests/loading/preload-slow-loading.php
3845
3846         * html/HTMLDocumentParser.cpp:
3847         (WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution):
3848
3849 2010-07-12  Albert J. Wong  <ajwong@chromium.org>
3850
3851         Reviewed by Jian Li.
3852
3853         Adding directional property enums back into
3854         CSSComputedStyleDeclaration::getPropertyCSSValue().
3855
3856         https://bugs.webkit.org/show_bug.cgi?id=42122
3857
3858         The four directional -webkit- properties --  CSSPropertyWebkitMarginEnd,
3859         CSSPropertyWebkitMarginStart, CSSPropertyWebkitPaddingEnd, and
3860         CSSPropertyWebkitPaddingStart -- are resolved into other css
3861         properties before the swtich statement via a call to
3862         CSSProperty::resolveDirectionAwareProperty().  Thus, they are never
3863         seen by the switch statement.  However, if you leave out a potential
3864         enum value from the switch, gcc will generate a warning if -Wall is
3865         specified.  This warning breaks the Chromium build.  To avoid this,
3866         we add in the enum values and ASSERT_NOT_REACHED() if they are hit.
3867
3868
3869         * css/CSSComputedStyleDeclaration.cpp:
3870         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3871
3872 2010-07-12  Chris Fleizach  <cfleizach@apple.com>
3873
3874         Reviewed by Darin Adler.
3875
3876         AX converts AtomicStrings to .string() more than needed
3877         https://bugs.webkit.org/show_bug.cgi?id=42056
3878
3879         No behavior change. No new tests.
3880
3881         * accessibility/AccessibilityRenderObject.cpp:
3882         (WebCore::AccessibilityRenderObject::isPressed):
3883         (WebCore::siblingWithAriaRole):
3884         (WebCore::AccessibilityRenderObject::intValue):
3885         (WebCore::AccessibilityRenderObject::accessibilityDescription):
3886         (WebCore::AccessibilityRenderObject::hasTextAlternative):
3887         (WebCore::AccessibilityRenderObject::supportsARIAFlowTo):
3888         (WebCore::AccessibilityRenderObject::supportsARIADropping):
3889         (WebCore::AccessibilityRenderObject::supportsARIADragging):
3890         (WebCore::AccessibilityRenderObject::determineARIADropEffects):
3891         (WebCore::AccessibilityRenderObject::isExpanded):
3892         (WebCore::AccessibilityRenderObject::isRequired):
3893         (WebCore::AccessibilityRenderObject::isSelected):
3894         (WebCore::AccessibilityRenderObject::supportsARIAOwns):
3895         (WebCore::AccessibilityRenderObject::isEnabled):
3896         (WebCore::AccessibilityRenderObject::activeDescendant):
3897         (WebCore::AccessibilityRenderObject::determineAriaRoleAttribute):
3898         (WebCore::AccessibilityRenderObject::orientation):
3899         (WebCore::AccessibilityRenderObject::canSetExpandedAttribute):
3900         (WebCore::AccessibilityRenderObject::canSetValueAttribute):
3901
3902 2010-07-12  Tony Chang  <tony@chromium.org>
3903
3904         Reviewed by David Hyatt.
3905
3906         crash in FrameView::detachCustomScrollbars
3907         https://bugs.webkit.org/show_bug.cgi?id=41196
3908
3909         Test: scrollbars/hidden-iframe-scrollbar-crash.html
3910
3911         * page/FrameView.cpp:
3912         (WebCore::FrameView::detachCustomScrollbars):
3913
3914 2010-07-12  Eric Seidel  <eric@webkit.org>
3915
3916         Reviewed by Adam Barth.
3917
3918         HTML tags should break out of foreign content
3919         https://bugs.webkit.org/show_bug.cgi?id=42106
3920
3921         Implement another paragraph of the spec to pass another
3922         bunch of foreign content tests.
3923
3924         This fixes a bunch of tests in html5lib/runner.html.
3925         After this change we only have 4 remaining foreign content failures.
3926
3927         * html/HTMLTreeBuilder.cpp:
3928         (WebCore::HTMLTreeBuilder::processStartTag):
3929
3930 2010-07-12  Zhenyao Mo  <zmo@google.com>
3931
3932         Reviewed by Darin Fisher.
3933
3934         Bring bufferData and clear to GLES2 compliant
3935         https://bugs.webkit.org/show_bug.cgi?id=41574
3936
3937         * html/canvas/WebGLRenderingContext.cpp:
3938         (WebCore::WebGLRenderingContext::bufferData): Call validateBufferDataUsage().
3939         (WebCore::WebGLRenderingContext::clear): Check mask.
3940         (WebCore::WebGLRenderingContext::validateBufferDataUsage): Check usage.
3941         * html/canvas/WebGLRenderingContext.h: Declare validateBufferDataUsage.
3942
3943 2010-07-12  Eric Seidel  <eric@webkit.org>
3944
3945         Unreviewed.  Attempt to fix Chromium Windows build.
3946
3947         Always generate SVGNames and MathMLNames for all ports (to support HTML5)
3948         https://bugs.webkit.org/show_bug.cgi?id=42050
3949
3950         Another way to fix this might be to mark all the .in files with
3951         svn:eol=native.  But fixing the perl to be more robust against
3952         stray whitespace seems to be a better long-term fix.
3953
3954         No functional change, thus no tests.
3955
3956         * bindings/scripts/InFilesParser.pm:
3957
3958 2010-07-12  Andreas Kling  <andreas.kling@nokia.com>
3959
3960         Reviewed by Kenneth Rohde Christiansen.
3961
3962         Remove dependency on PlatformString.h in Color.h
3963         https://bugs.webkit.org/show_bug.cgi?id=42109
3964
3965         * platform/graphics/Color.cpp:
3966         * platform/graphics/Color.h:
3967
3968 2010-07-12  Eric Seidel  <eric@webkit.org>
3969
3970         Unreviewed, build fix.
3971
3972         Update HTMLTreeBuilder now that MathMLNames is always generated
3973         https://bugs.webkit.org/show_bug.cgi?id=42059
3974
3975         Fix the Windows project file to build MathMLNames.*.
3976         Also added MathMLElementFactory.* which is a NOOP now, but will
3977         prevent folks from breaking the build when they turn MathML on.
3978
3979         * WebCore.vcproj/WebCore.vcproj:
3980
3981 2010-07-12  Eric Carlson  <eric.carlson@apple.com>
3982
3983         Reviewed by Darin Adler.
3984
3985         Update media element's handling of empty 'src' attribute
3986         https://bugs.webkit.org/show_bug.cgi?id=42001
3987
3988         * html/HTMLMediaElement.cpp:
3989         (WebCore::HTMLMediaElement::src): Return getNonEmptyURLAttribute().
3990         (WebCore::HTMLMediaElement::selectMediaResource): Call noneSupported() for empty 'src'.
3991         (WebCore::HTMLMediaElement::selectNextSourceChild): Use getNonEmptyURLAttribute() to convert 
3992         'src' to URL instead of document()->completeURL(). Don't consider a <source> with an empty 'src'. 
3993
3994         * html/HTMLMediaElement.idl: Add 'NonEmpty' option to 'src' attribute.
3995
3996         * html/HTMLSourceElement.cpp:
3997         (WebCore::HTMLSourceElement::src): Return getNonEmptyURLAttribute().
3998         (WebCore::HTMLSourceElement::isURLAttribute): New, 'src' is a URL attribute.
3999         * html/HTMLSourceElement.h:
4000
4001         * html/HTMLSourceElement.idl: Add 'NonEmpty' option to 'src' attribute.
4002
4003         * html/HTMLVideoElement.cpp:
4004         (WebCore::HTMLVideoElement::parseMappedAttribute): Use getNonEmptyURLAttribute() to convert 
4005         'poster' to URL instead of document()->completeURL().
4006
4007         * html/HTMLVideoElement.idl:  Add 'NonEmpty' option to 'poster' attribute.
4008
4009 2010-07-12  Martin Robinson  <mrobinson@igalia.com>
4010
4011         Reviewed by Xan Lopez.
4012
4013         [GTK] make dist is broken because of missing headers and other miscellaneous reasons
4014         https://bugs.webkit.org/show_bug.cgi?id=42107
4015
4016         * GNUmakefile.am: Remove InspectorFrontend2.idl from the list of IDL files, so
4017         that it is not built into libWebCoreJS. Add missing header to the source list.
4018         Make sure to distribute the new file: WebCore/inspector/CodeGeneratorInspector.pm.
4019
4020 2010-07-12  Eric Seidel  <eric@webkit.org>
4021
4022         Reviewed by Adam Barth.
4023
4024         HTMLTreeBuilder needs to support mixing SVG and MathML content
4025         https://bugs.webkit.org/show_bug.cgi?id=42096
4026
4027         This is just a direct transcription of another paragraph of the
4028         HTML5 spec.
4029
4030         This improved a couple results in html5lib/runner.html, but more
4031         work to do yet to pass all the foreign content tests.
4032
4033         * html/HTMLTreeBuilder.cpp:
4034         (WebCore::HTMLTreeBuilder::processStartTag):
4035         (WebCore::HTMLTreeBuilder::processEndTag):
4036         (WebCore::HTMLTreeBuilder::processUsingSecondaryInsertionModeAndAdjustInsertionMode):
4037         * html/HTMLTreeBuilder.h:
4038         * mathml/mathtags.in:
4039
4040 2010-07-12  Eric Seidel  <eric@webkit.org>
4041
4042         Reviewed by Adam Barth.
4043
4044         Update HTMLTreeBuilder now that MathMLNames is always generated
4045         https://bugs.webkit.org/show_bug.cgi?id=42059
4046
4047         Fix the HTMLTreeBuilder MathML code path to compile and remove
4048         the MathML and SVG guards now that SVGNames and MathMLNames are
4049         always compiled into ever port after:
4050         https://bugs.webkit.org/show_bug.cgi?id=42050
4051
4052         This fixed a whole bunch of libhtml5 tests now that we have the
4053         mathml code paths enabled.
4054
4055         * html/HTMLTreeBuilder.cpp:
4056         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
4057         (WebCore::HTMLTreeBuilder::processStartTag):
4058         (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
4059         (WebCore::HTMLTreeBuilder::processEndTag):
4060         * page/Frame.cpp:
4061         (WebCore::Frame::Frame):
4062          - Always init SVGNames and MathML names.
4063
4064 2010-07-12  Simon Fraser  <simon.fraser@apple.com>
4065
4066         Reviewed by Dan Bernstein.
4067
4068         Don't go into compositing mode for 0x0 plugins
4069         https://bugs.webkit.org/show_bug.cgi?id=34009
4070         
4071         Don't use compositing for small (0-height or width, or 1x1) plugins, or iframes whose
4072         height or width is zero.
4073         
4074         Previously we made all compositing decisions inside styleChanged(). However,
4075         now that plugin and iframe compositing behavior depends on renderer size, we have
4076         to wait until layout before deciding whether to composite these. This behavior
4077         change is controlled by the m_compositingDependsOnGeometry flag. When set,
4078         updateCompositingLayers() always does a hierarchy update.
4079
4080         Tests: compositing/iframes/iframe-size-from-zero.html
4081                compositing/iframes/iframe-size-to-zero.html
4082                compositing/plugins/1x1-composited-plugin.html
4083                compositing/plugins/large-to-small-composited-plugin.html
4084                compositing/plugins/small-to-large-composited-plugin.html
4085
4086         * page/FrameView.cpp:
4087         (WebCore::FrameView::updateCompositingLayers): No longer bail if usesCompositing() is false; we
4088         have to always enter updateCompositingLayers().
4089         (WebCore::FrameView::repaintFixedElementsAfterScrolling): Ditto
4090         (WebCore::FrameView::enterCompositingMode): Remove bogus return of a void.
4091
4092         * rendering/RenderLayerCompositor.h: Add m_compositingDependsOnGeometry.
4093         * rendering/RenderLayerCompositor.cpp:
4094         (WebCore::RenderLayerCompositor::RenderLayerCompositor): Initialize m_compositingDependsOnGeometry to false.
4095         (WebCore::RenderLayerCompositor::updateCompositingLayers): If m_compositingDependsOnGeometry is true,
4096         we always need to run through the layer hierarchy looking for things which need to be composited, even if
4097         we're not (yet) in compositing mode.
4098         
4099         (WebCore::RenderLayerCompositor::computeCompositingRequirements): Because we can enter compositing mode
4100         on the fly inside updateCompositingLayers() now, the state of willBeComposited needs to be updated
4101         when processing the root layer, for the case where the compositing mode changes.
4102         
4103         (WebCore::RenderLayerCompositor::requiresCompositingForPlugin): Set the m_compositingDependsOnGeometry
4104         flag if we see a potentially-composited plugin. Once we have layout information, only composite the plugin
4105         if height * width > 1.
4106         
4107         (WebCore::RenderLayerCompositor::requiresCompositingForIFrame): Set the m_compositingDependsOnGeometry
4108         flag if we see a potentially-composited iframe. Once we have layout information, only composite the plugin
4109         if height or width is greater than zero.
4110
4111 2010-07-12  Simon Fraser  <simon.fraser@apple.com>
4112
4113         Reviewed by Dan Bernstein.
4114
4115         Need to do a layout when RenderLayers come and go because of compositing
4116         https://bugs.webkit.org/show_bug.cgi?id=42108
4117         
4118         If we create or destroy RenderLayers for reasons other than style changes
4119         (e.g. because of composited iframes or plugins), then we need to ensure
4120         that we do a layout.
4121
4122         Test: compositing/iframes/layout-on-compositing-change.html
4123
4124         * rendering/RenderObject.cpp:
4125         (WebCore::RenderObject::adjustStyleDifference):
4126
4127 2010-07-11  Eric Seidel  <eric@webkit.org>
4128
4129         Reviewed by Darin Adler.
4130
4131         Always generate SVGNames and MathMLNames for all ports (to support HTML5)
4132         https://bugs.webkit.org/show_bug.cgi?id=42050
4133
4134         Historically, FOONames has only been generate when ENABLE(FOO) is defined.
4135         However, for HTML5 parser support, we need to have access to the SVG
4136         and MathML tag names regardless of whether we the engine is configured
4137         to render SVG or MathML content.
4138
4139         This change enables generation of SVGNames and MathMLNames on all ports and
4140         makes it so that ports can include FOOElementFactory.* regardless of whether
4141         ENABLE(FOO) is defined (and have it do the right thing).
4142
4143         No functional change (yet) so no tests.
4144
4145         * DerivedSources.make:
4146         * GNUmakefile.am:
4147         * WebCore.gyp/WebCore.gyp:
4148         * WebCore.pri:
4149         * dom/make_names.pl:
4150
4151 2010-07-10  Eric Seidel  <eric@webkit.org>
4152
4153         Reviewed by Adam Barth.
4154
4155         make_names.pl should always generate all names in Names.* files
4156         https://bugs.webkit.org/show_bug.cgi?id=42023
4157
4158         Only the *ElementFactory files need to have conditional contents
4159         based on enabled features.  WebCore should always have all known
4160         names for SVG, MathML, XML, XLink, HTML, etc. generated in the
4161         various *Names files, even if features are disabled.
4162
4163         make_names.pl is kinda a big hack at this point.  I tried to clean
4164         up a little as I went.  The way I made *Names include all names was to
4165         read the .in files twice, once using the preprocessor and once without.
4166
4167         * dom/make_names.pl:
4168
4169 2010-07-12  Andreas Kling  <andreas.kling@nokia.com>
4170
4171         Reviewed by Oliver Hunt.
4172
4173         Canvas: Move fillRect() save/restore into GraphicsContext implementations
4174         https://bugs.webkit.org/show_bug.cgi?id=42088
4175
4176         Saving the platform painter state is an expensive operation,
4177         so don't do it in fillRect() for platforms that don't need it. (CG, Qt)
4178
4179         * html/canvas/CanvasRenderingContext2D.cpp:
4180         (WebCore::CanvasRenderingContext2D::fillRect):
4181         * platform/graphics/cairo/GraphicsContextCairo.cpp:
4182         (WebCore::GraphicsContext::fillRect):
4183         * platform/graphics/skia/GraphicsContextSkia.cpp:
4184         (WebCore::GraphicsContext::fillRect):
4185         * platform/graphics/wince/GraphicsContextWince.cpp:
4186         (WebCore::GraphicsContext::fillRect):
4187         * platform/graphics/wx/GraphicsContextWx.cpp:
4188         (WebCore::GraphicsContext::fillRect):
4189
4190 2010-07-12  Nate Chapin  <japhet@chromium.org>
4191
4192         Reviewed by Darin Fisher.
4193
4194         Ensure that a cache policy that forces validation is cleared once
4195         the load event is fired, rather than only doing so at the next
4196         navigation. This leads to a lot of unnecessary load on AJAX-y
4197         websites.
4198
4199         https://bugs.webkit.org/show_bug.cgi?id=41813
4200
4201         Test: http/tests/xmlhttprequest/cache-headers-after-reload.html
4202
4203         * loader/FrameLoader.cpp:
4204         (WebCore::FrameLoader::handledOnloadEvents): Reset m_loadType to FrameLoadTypeStandard.
4205         (WebCore::FrameLoader::addExtraFieldsToRequest): Only respect the original request's cache policy if the
4206             DocumentLoader is still loading, and handle the other cache policy settings that were scattered around the loader.
4207         (WebCore::FrameLoader::loadResourceSynchronously): Merge cachePolicy setting into FrameLoader::addExtraFieldsToRequest.
4208         * loader/SubresourceLoader.cpp:
4209         (WebCore::SubresourceLoader::create): Merge cachePolicy setting into FrameLoader::addExtraFieldsToRequest.
4210
4211 2010-07-12  Andreas Kling  <andreas.kling@nokia.com>
4212
4213         Reviewed by Oliver Hunt.
4214
4215         CSS color parsing optimizations
4216         https://bugs.webkit.org/show_bug.cgi?id=42073
4217
4218         - Avoid instantiating a CSSParser in parseColor() unless necessary.
4219         - Fixed hex color fast-path to support strings starting with '#'.
4220         - Avoid allocating a new string for the value part of a '#' color.
4221
4222         * css/CSSParser.cpp:
4223         (WebCore::CSSParser::parseColor):
4224         * platform/graphics/Color.cpp:
4225         (WebCore::Color::parseHexColor):
4226         (WebCore::Color::Color):
4227         * platform/graphics/Color.h:
4228
4229 2010-07-09  Alexey Proskuryakov  <ap@apple.com>
4230
4231         Reviewed by Darin Adler.
4232
4233         https://bugs.webkit.org/show_bug.cgi?id=13075
4234         XMLHttpRequest with failed authentication should set status to 401
4235
4236         https://bugs.webkit.org/show_bug.cgi?id=6871
4237         <rdar://problem/3363403> 401 error page is never shown
4238
4239         * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::receivedCredential):
4240         Added a comment explaining why we handle empty credentials differently here.
4241
4242         * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::receivedCredential):
4243         Bring this code in sync with Mac.
4244
4245 2010-07-12  Anders Carlsson  <andersca@apple.com>
4246
4247         Reviewed by Adam Roben.
4248
4249         Add a PluginController class, use it for invalidation and getting the user agent
4250         https://bugs.webkit.org/show_bug.cgi?id=42084
4251
4252         * WebCore.exp.in:
4253         Export Widget::convertToContainingWindow.
4254
4255 2010-07-12  Andreas Kling  <andreas.kling@nokia.com>
4256
4257         Reviewed by Simon Hausmann.
4258
4259         [Qt] Dragging within webkit with a drag created via Javascript ends up misinterpreting the data
4260         https://bugs.webkit.org/show_bug.cgi?id=41457
4261
4262         Treat non-special-cased mime-types as Unicode strings in ClipboardQt's getData()
4263         Fixes corruption when retrieving data that was set with anything other than text/plain
4264
4265         Also use QMimeData::setHtml() when applicable to be consistent with PasteboardQt.
4266
4267         * platform/qt/ClipboardQt.cpp:
4268         (WebCore::isHtmlMimeType):
4269         (WebCore::ClipboardQt::getData):
4270         (WebCore::ClipboardQt::setData):
4271
4272 2010-07-12  Steve Block  <steveblock@google.com>
4273
4274         Reviewed by Jeremy Orlow.
4275
4276         add ANDROID to STORE_FONT_CUSTOM_PLATFORM_DATA
4277         https://bugs.webkit.org/show_bug.cgi?id=32273
4278
4279         Tested by existing tests, just adding ANDROID to the list of platforms that use this feature.
4280
4281         * loader/CachedFont.cpp:
4282
4283 2010-07-12  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
4284
4285         Unreviewed.
4286
4287         [EFL] Move ScriptConcotrollerEfl.cpp from CMakeLists.txt to
4288         CMakeListsEfl.txt.
4289
4290         * CMakeLists.txt:
4291         * CMakeListsEfl.txt:
4292
4293 2010-07-12  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
4294
4295         Unreviewed build fix after r60050.
4296
4297         * CMakeLists.txt: Add WebCore/bindings to the include path.
4298
4299 2010-07-09  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
4300
4301         Reviewed by Xan Lopez.
4302
4303         [GTK] Crashes when going back with page cache in unknown circunstances
4304         https://bugs.webkit.org/show_bug.cgi?id=41710
4305
4306         Could not yet find a way to reproduce this in a layout test. The
4307         issue is document being NULL, so this NULL-check should be enough
4308         to get rid of the crash. We are working on trying to find a better
4309         solution for these null cases, like attaching the document earlier
4310         when openning a cached page.
4311
4312         * page/EventHandler.cpp:
4313         (WebCore::EventHandler::sendScrollEvent):
4314
4315 2010-07-12  Alexander Pavlov  <apavlov@chromium.org>
4316
4317         Reviewed by Yury Semikhatsky.
4318