https://bugs.webkit.org/show_bug.cgi?id=66590
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-08-19  Beth Dakin  <bdakin@apple.com>
2
3         https://bugs.webkit.org/show_bug.cgi?id=66590
4         Re-name scrollbar painter types
5
6         Reviewed by Sam Weinig.
7
8         Names changed to remove references to WebKitSystemInterface since the 
9         implementation is now in WebCore. And the type names changed to be more Objective-
10         Cish instead of C++ish
11         WTF_USE_WK_SCROLLBAR_PAINTER -> WTF_USE_SCROLLBAR_PAINTER
12         WKScrollbarPainterRef -> ScrollbarPainter
13         WKScrollbarPainterControllerRef -> ScrollbarPainterController
14
15         * platform/mac/NSScrollerImpDetails.h:
16         * platform/mac/ScrollAnimatorMac.h:
17         * platform/mac/ScrollAnimatorMac.mm:
18         (-[ScrollbarPartAnimation initWithScrollbarPainter:part:WebCore::scrollAnimator:WebCore::animateAlphaTo:duration:]):
19         (-[ScrollbarPainterDelegate setUpAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
20         (-[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
21         (-[ScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
22         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
23         (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
24         (WebCore::ScrollAnimatorMac::notifyPositionChanged):
25         (WebCore::ScrollAnimatorMac::contentAreaWillPaint):
26         (WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
27         (WebCore::ScrollAnimatorMac::mouseExitedContentArea):
28         (WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
29         (WebCore::ScrollAnimatorMac::willStartLiveResize):
30         (WebCore::ScrollAnimatorMac::contentsResized):
31         (WebCore::ScrollAnimatorMac::willEndLiveResize):
32         (WebCore::ScrollAnimatorMac::contentAreaDidShow):
33         (WebCore::ScrollAnimatorMac::contentAreaDidHide):
34         (WebCore::ScrollAnimatorMac::didBeginScrollGesture):
35         (WebCore::ScrollAnimatorMac::didEndScrollGesture):
36         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
37         (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
38         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
39         (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
40         (WebCore::ScrollAnimatorMac::cancelAnimations):
41         (WebCore::ScrollAnimatorMac::setIsActive):
42         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
43         * platform/mac/ScrollViewMac.mm:
44         (WebCore::ScrollView::platformSetScrollbarOverlayStyle):
45         * platform/mac/ScrollbarThemeMac.h:
46         * platform/mac/ScrollbarThemeMac.mm:
47         (+[ScrollbarPrefsObserver appearancePrefsChanged:]):
48         (WebCore::updateArrowPlacement):
49         (WebCore::ScrollbarThemeMac::registerScrollbar):
50         (WebCore::ScrollbarThemeMac::setNewPainterForScrollbar):
51         (WebCore::ScrollbarThemeMac::painterForScrollbar):
52         (WebCore::ScrollbarThemeMac::scrollbarThickness):
53         (WebCore::ScrollbarThemeMac::usesOverlayScrollbars):
54         (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
55         (WebCore::ScrollbarThemeMac::hasThumb):
56         (WebCore::ScrollbarThemeMac::minimumThumbLength):
57         (WebCore::ScrollbarThemeMac::updateEnabledState):
58         (WebCore::scrollbarPainterPaint):
59         (WebCore::ScrollbarThemeMac::paint):
60
61 2011-08-19  Van Lam  <vanlam@google.com>
62
63         Rename VisiblePosition::honorEditableBoundary* to VisiblePosition::honorEditingBoundary*
64         https://bugs.webkit.org/show_bug.cgi?id=66499
65
66         Reviewed by Ryosuke Niwa.
67
68         Renamed VisiblePosition::honorEditableBoundary* to
69         honorEditingBoundary.
70
71         * editing/VisiblePosition.cpp:
72         (WebCore::VisiblePosition::next):
73         (WebCore::VisiblePosition::previous):
74         (WebCore::VisiblePosition::left):
75         (WebCore::VisiblePosition::right):
76         (WebCore::VisiblePosition::honorEditingBoundaryAtOrBefore):
77         (WebCore::VisiblePosition::honorEditingBoundaryAtOrAfter):
78         * editing/VisiblePosition.h:
79         * editing/visible_units.cpp:
80         (WebCore::previousWordPosition):
81         (WebCore::nextWordPosition):
82         (WebCore::startOfLine):
83         (WebCore::endOfLine):
84         (WebCore::previousSentencePosition):
85         (WebCore::nextSentencePosition):
86         (WebCore::logicalStartOfLine):
87         (WebCore::logicalEndOfLine):
88         (WebCore::leftWordPosition):
89         (WebCore::rightWordPosition):
90
91 2011-08-19  James Robinson  <jamesr@chromium.org>
92
93         REGRESSION(r91628): 3 canvas tests crash on Chromium Linux and one test fail on Chromium Mac
94         https://bugs.webkit.org/show_bug.cgi?id=65063
95
96         Reviewed by Darin Fisher.
97
98         Fixes crashes due to a bad cast from Image to BitmapImage on skia ports
99         that use BitmapImageSingleFrameSkia. In the skia port
100         Image::isBitmapImage() returning true does not necessarily mean that
101         Image is of type BitmapImage.
102
103         Covered by fast/canvas/canvas-as-image.html and many other canvas
104         tests.
105
106         Patch originally by Tom Hudson.
107
108         * platform/graphics/BitmapImage.h:
109         (WebCore::BitmapImage::currentFrameHasAlpha):
110         (WebCore::BitmapImage::notSolidColor):
111         * platform/graphics/Image.cpp:
112         (WebCore::Image::drawTiled):
113         * platform/graphics/Image.h:
114         (WebCore::Image::currentFrameHasAlpha):
115         (WebCore::Image::notSolidColor):
116         * platform/graphics/skia/BitmapImageSingleFrameSkia.h:
117         (WebCore::BitmapImageSingleFrameSkia::currentFrameHasAlpha):
118         (WebCore::BitmapImageSingleFrameSkia::notSolidColor):
119         * rendering/RenderImage.cpp:
120         (WebCore::RenderImage::backgroundIsObscured):
121
122 2011-08-19  Emil A Eklund  <eae@chromium.org>
123
124         Switch clipping for svg to to new layout types
125         https://bugs.webkit.org/show_bug.cgi?id=66586
126
127         Reviewed by Eric Seidel.
128
129         No new tests as no new functionality.
130
131         * rendering/svg/RenderSVGForeignObject.h:
132         * rendering/svg/RenderSVGGradientStop.h:
133         (WebCore::RenderSVGGradientStop::clippedOverflowRectForRepaint):
134         * rendering/svg/RenderSVGHiddenContainer.h:
135         (WebCore::RenderSVGHiddenContainer::clippedOverflowRectForRepaint):
136         * rendering/svg/RenderSVGInline.cpp:
137         (WebCore::RenderSVGInline::clippedOverflowRectForRepaint):
138         (WebCore::RenderSVGInline::computeRectForRepaint):
139         * rendering/svg/RenderSVGInline.h:
140         * rendering/svg/RenderSVGModelObject.cpp:
141         (WebCore::RenderSVGModelObject::clippedOverflowRectForRepaint):
142         (WebCore::RenderSVGModelObject::computeRectForRepaint):
143         * rendering/svg/RenderSVGModelObject.h:
144         * rendering/svg/RenderSVGText.cpp:
145         (WebCore::RenderSVGText::clippedOverflowRectForRepaint):
146         (WebCore::RenderSVGText::computeRectForRepaint):
147         * rendering/svg/RenderSVGText.h:
148         * svg/SVGSVGElement.cpp:
149         (WebCore::SVGSVGElement::localCoordinateSpaceTransform):
150         * svg/SVGSVGElement.h:
151         (WebCore::SVGSVGElement::setContainerSize):
152         (WebCore::SVGSVGElement::containerSize):
153         * svg/graphics/SVGImage.cpp:
154         (WebCore::SVGImageChromeClient::invalidateContentsAndWindow):
155         (WebCore::SVGImage::setContainerSize):
156         * svg/graphics/SVGImage.h:
157
158 2011-08-19  Sheriff Bot  <webkit.review.bot@gmail.com>
159
160         Unreviewed, rolling out r93425.
161         http://trac.webkit.org/changeset/93425
162         https://bugs.webkit.org/show_bug.cgi?id=66591
163
164         "The newly-added ASSERT is being triggered on several bots"
165         (Requested by jchaffraix on #webkit).
166
167         * html/HTMLLinkElement.cpp:
168         (WebCore::HTMLLinkElement::HTMLLinkElement):
169         (WebCore::HTMLLinkElement::setDisabled):
170         (WebCore::HTMLLinkElement::sheetLoaded):
171         (WebCore::HTMLLinkElement::disabled):
172         * html/HTMLLinkElement.h:
173         (WebCore::HTMLLinkElement::isEnabledViaScript):
174
175 2011-08-18  Adrienne Walker  <enne@google.com>
176
177         [chromium] Refactor updateCompositorResources to take an explicit GraphicsContext3D
178         https://bugs.webkit.org/show_bug.cgi?id=66432
179
180         Reviewed by James Robinson.
181
182         Covered by existing tests.
183
184         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
185         (WebCore::Canvas2DLayerChromium::updateCompositorResources):
186         * platform/graphics/chromium/Canvas2DLayerChromium.h:
187         * platform/graphics/chromium/LayerChromium.h:
188         (WebCore::LayerChromium::updateCompositorResources):
189         * platform/graphics/chromium/LayerRendererChromium.cpp:
190         (WebCore::LayerRendererChromium::updateCompositorResources):
191         * platform/graphics/chromium/TiledLayerChromium.cpp:
192         (WebCore::TiledLayerChromium::updateCompositorResources):
193         * platform/graphics/chromium/TiledLayerChromium.h:
194         * platform/graphics/chromium/VideoLayerChromium.cpp:
195         (WebCore::VideoLayerChromium::updateCompositorResources):
196         * platform/graphics/chromium/VideoLayerChromium.h:
197         * platform/graphics/chromium/WebGLLayerChromium.cpp:
198         (WebCore::WebGLLayerChromium::updateCompositorResources):
199         * platform/graphics/chromium/WebGLLayerChromium.h:
200
201 2011-08-19  Victoria Kirst  <vrk@chromium.org>
202
203         Tell media player to prepareToPlay() at end of HTMLMediaElement::load()
204         https://bugs.webkit.org/show_bug.cgi?id=66414
205
206         Reviewed by Eric Carlson.
207
208         Test: media/video-load-preload-none.html
209
210         * html/HTMLMediaElement.cpp:
211         (WebCore::HTMLMediaElement::load):
212
213 2011-08-19  Emil A Eklund  <eae@chromium.org>
214
215         Switch RenderBlock to to new layout types
216         https://bugs.webkit.org/show_bug.cgi?id=66502
217
218         Reviewed by Eric Seidel.
219
220         Convert RenderBlock to new layout abstraction. Leave m_lineHight as a 30
221         bit int for now to avoid unnecessarily increasing the memory usage.
222
223         No new tests as no new functionality.
224
225         * rendering/RenderBlock.cpp:
226         * rendering/RenderBlock.h:
227
228 2011-08-19  Emil A Eklund  <eae@chromium.org>
229
230         Switch RenderBoxModelObject to to new layout types
231         https://bugs.webkit.org/show_bug.cgi?id=66534
232
233         Reviewed by Eric Seidel.
234
235         Convert RenderBoxModelObject to new layout abstraction.
236
237         No new tests as no new functionality.
238
239         * rendering/RenderBoxModelObject.cpp:
240         (WebCore::ImageQualityController::set):
241         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
242         (WebCore::RenderBoxModelObject::shouldPaintAtLowQuality):
243         (WebCore::backgroundRectAdjustedForBleedAvoidance):
244         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
245         (WebCore::RenderBoxModelObject::calculateFillTileSize):
246         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::useFixedAttachment):
247         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
248         (WebCore::RenderBoxModelObject::paintNinePieceImage):
249         (WebCore::borderWillArcInnerEdge):
250         (WebCore::RenderBoxModelObject::paintOneBorderSide):
251         (WebCore::RenderBoxModelObject::paintBorderSides):
252         (WebCore::RenderBoxModelObject::paintBorder):
253         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
254         (WebCore::RenderBoxModelObject::clipBorderSidePolygon):
255         (WebCore::areaCastingShadowInHole):
256         (WebCore::RenderBoxModelObject::paintBoxShadow):
257         (WebCore::RenderBoxModelObject::containingBlockLogicalWidthForContent):
258         * rendering/RenderBoxModelObject.h:
259
260 2011-08-19  Mihnea Ovidenie  <mihnea@adobe.com>
261
262         [CSSRegions]Speed up RenderFlowThread repaint of regions
263         https://bugs.webkit.org/show_bug.cgi?id=66566
264
265         Reviewed by David Hyatt.
266
267         When in printing or the repaint rectangle is empty, there is no need to iterate
268         the render flow regions in order to repaint.
269         Covered by existing tests.
270
271         * rendering/RenderFlowThread.cpp:
272         (WebCore::RenderFlowThread::shouldRepaint):
273         (WebCore::RenderFlowThread::repaintRectangleInRegions):
274         * rendering/RenderFlowThread.h:
275
276 2011-08-19  Mihnea Ovidenie  <mihnea@adobe.com>
277
278         [CSSRegions]Parse -webkit-region-break(after, before, inside)
279         https://bugs.webkit.org/show_bug.cgi?id=66559
280
281         Reviewed by David Hyatt.
282
283         * css/CSSComputedStyleDeclaration.cpp:
284         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
285         * css/CSSMutableStyleDeclaration.cpp:
286         * css/CSSParser.cpp:
287         (WebCore::CSSParser::parseValue):
288         * css/CSSPropertyNames.in:
289         * css/CSSStyleSelector.cpp:
290         (WebCore::CSSStyleSelector::applyProperty):
291         * rendering/style/RenderStyle.h:
292         (WebCore::InheritedFlags::regionBreakBefore):
293         (WebCore::InheritedFlags::regionBreakInside):
294         (WebCore::InheritedFlags::regionBreakAfter):
295         (WebCore::InheritedFlags::setRegionBreakBefore):
296         (WebCore::InheritedFlags::setRegionBreakInside):
297         (WebCore::InheritedFlags::setRegionBreakAfter):
298         * rendering/style/StyleRareNonInheritedData.cpp:
299         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
300         (WebCore::StyleRareNonInheritedData::operator==):
301         * rendering/style/StyleRareNonInheritedData.h:
302
303 2011-08-19  Emil A Eklund  <eae@chromium.org>
304
305         Switch RenderLayer to to new layout types
306         https://bugs.webkit.org/show_bug.cgi?id=66507
307
308         Reviewed by Eric Seidel.
309
310         Convert RenderLayer to new layout abstraction.
311
312         No new tests as no new functionality.
313
314         * rendering/LayoutTypes.h:
315         (WebCore::flooredLayoutSize):
316         * rendering/RenderLayer.cpp:
317         * rendering/RenderLayer.h:
318         * rendering/RenderLayerBacking.cpp:
319         * rendering/RenderLayerBacking.h:
320         * rendering/RenderLayerCompositor.cpp:
321         * rendering/RenderLayerCompositor.h:
322
323 2011-08-19  Mihnea Ovidenie  <mihnea@adobe.com>
324
325         [CSSRegions]Content displayed in regions should not be scrollable
326         https://bugs.webkit.org/show_bug.cgi?id=66459
327
328         Reviewed by Darin Adler.
329
330         Initially, when creating the style for the RenderFlowThread, overflowX and overflowY were both set to hidden,
331         so that RenderView did not display scrollbars when a RenderFlowThread exists. However, this allowed the possibility
332         of scrolling the content displayed in region.
333
334         Now, the RenderFlowThread objects are ignored in RenderBlock::insertPositionedObject and the style of the RenderFlowThread
335         can be set to visible, thus preventing scrolling of the content displayed in regions.
336
337         Test: fast/regions/content-flowed-into-regions-no-scroll.html
338
339         * rendering/RenderFlowThread.cpp:
340         (WebCore::RenderFlowThread::createFlowThreadStyle):
341
342 2011-08-19  Julien Chaffraix  <jchaffraix@webkit.org>
343
344         REGRESSION (r84327-r84329): CSS stylesheets fail to load on www.flagstar.com login page
345         https://bugs.webkit.org/show_bug.cgi?id=65140
346         <rdar://problem/9835905>
347
348         Reviewed by Antti Koivisto.
349
350         Tests: fast/css/stylesheet-enable-first-alternate-on-load.html
351                fast/css/stylesheet-enable-first-alternate.html
352                fast/css/stylesheet-enable-second-alternate-on-load.html
353                fast/css/stylesheet-enable-second-alternate.html
354                http/tests/css/link-css-disabled-value-with-slow-loading-sheet-in-error.html
355                http/tests/css/link-css-disabled-value-with-slow-loading-sheet.html
356
357         The gist of the issue is that we were ignoring calls to HTMLLinkElement::setDisabled that would enable a
358         style sheet when we were loading a stylesheet (m_sheet was 0 and thus ignored the call per the spec).
359
360         FF goes against the CSS OM spec in this case and always keep an associated sheet as long as 'rel' hints
361         at a stylesheet link and href is present. Instead of siding with FF, I continued to follow the
362         specification and store the enabled via javascript state into m_scriptState (renamed from
363         m_isEnabledViaScript). This information gets merged back into the style sheet disabled state when it is
364         available.
365
366         While debugging the case at hand, I found some cases that were not properly handled and were fixed as
367         part of this change.
368
369         * html/HTMLLinkElement.cpp:
370         (WebCore::HTMLLinkElement::HTMLLinkElement): Updated after m_isEnabledViaScript rename.
371         (WebCore::HTMLLinkElement::setDisabled): Always call setIsEnabledViaScript so that
372         the information is properly stored (either for recalcStyleSelector or just to store
373         the state during loading).
374
375         (WebCore::HTMLLinkElement::sheetLoaded): Merge back the state from m_scriptState to
376         the sheet's disabled state.
377
378         (WebCore::HTMLLinkElement::disabled): Account for the temporary state and return the
379         right value. It matches FF and what people would expect.
380
381         (WebCore::HTMLLinkElement::areDisabledAndScriptStatesConsistent): Debug only method
382         that checks that disabled() and isEnabledViaScript() are consistent with each other
383         (under some circumstances).
384
385         * html/HTMLLinkElement.h:
386         (WebCore::HTMLLinkElement::isEnabledViaScript): Updated after m_isEnabledViaScript rename.
387         (WebCore::HTMLLinkElement::setIsEnabledViaScript): Added setter.
388
389 2011-08-17  Adrienne Walker  <enne@google.com>
390
391         [chromium] Split tiler into main thread / compositor thread versions
392         https://bugs.webkit.org/show_bug.cgi?id=66065
393
394         Reviewed by James Robinson.
395
396         Covered by existing tests.
397
398         LayerTilerChromium is renamed to be CCLayerTilingData. Invalidation
399         and paint functionality is pushed into TiledLayerChromium and drawing
400         with GL is pushed into CCTiledLayerImpl. During tree synchronization,
401         the tiler properties and texture IDs are synchronized into
402         CCTiledLayerImpl.
403
404         * WebCore.gypi:
405         * platform/graphics/chromium/ContentLayerChromium.cpp:
406         (WebCore::ContentLayerChromium::paintContentsIfDirty):
407         (WebCore::ContentLayerChromium::createTextureUpdaterIfNeeded):
408         * platform/graphics/chromium/ContentLayerChromium.h:
409         * platform/graphics/chromium/ImageLayerChromium.cpp:
410         (WebCore::ImageLayerChromium::paintContentsIfDirty):
411         * platform/graphics/chromium/LayerRendererChromium.cpp:
412         (WebCore::LayerRendererChromium::bestTextureFormat):
413         (WebCore::LayerRendererChromium::initializeSharedObjects):
414         (WebCore::LayerRendererChromium::tilerProgram):
415         (WebCore::LayerRendererChromium::tilerProgramSwizzle):
416         (WebCore::LayerRendererChromium::tilerProgramAA):
417         (WebCore::LayerRendererChromium::tilerProgramSwizzleAA):
418         * platform/graphics/chromium/LayerRendererChromium.h:
419         * platform/graphics/chromium/LayerTextureUpdater.h:
420         * platform/graphics/chromium/LayerTilerChromium.cpp: Removed.
421         * platform/graphics/chromium/ManagedTexture.h:
422         (WebCore::ManagedTexture::textureId):
423         * platform/graphics/chromium/TiledLayerChromium.cpp:
424         (WebCore::UpdatableTile::UpdatableTile):
425         (WebCore::UpdatableTile::texture):
426         (WebCore::UpdatableTile::dirty):
427         (WebCore::UpdatableTile::clearDirty):
428         (WebCore::TiledLayerChromium::TiledLayerChromium):
429         (WebCore::TiledLayerChromium::cleanupResources):
430         (WebCore::TiledLayerChromium::drawsContent):
431         (WebCore::TiledLayerChromium::createTilerIfNeeded):
432         (WebCore::TiledLayerChromium::updateCompositorResources):
433         (WebCore::TiledLayerChromium::pushPropertiesTo):
434         (WebCore::TiledLayerChromium::dumpLayerProperties):
435         (WebCore::TiledLayerChromium::textureManager):
436         (WebCore::TiledLayerChromium::tileAt):
437         (WebCore::TiledLayerChromium::createTile):
438         (WebCore::TiledLayerChromium::invalidateTiles):
439         (WebCore::TiledLayerChromium::invalidateRect):
440         (WebCore::TiledLayerChromium::protectVisibleTileTextures):
441         (WebCore::TiledLayerChromium::protectTileTextures):
442         (WebCore::TiledLayerChromium::prepareToUpdate):
443         * platform/graphics/chromium/TiledLayerChromium.h:
444         * platform/graphics/chromium/cc/CCLayerTilingData.cpp: Added.
445         (WebCore::CCLayerTilingData::create):
446         (WebCore::CCLayerTilingData::CCLayerTilingData):
447         (WebCore::CCLayerTilingData::setTileSize):
448         (WebCore::CCLayerTilingData::operator=):
449         (WebCore::CCLayerTilingData::addTile):
450         (WebCore::CCLayerTilingData::takeTile):
451         (WebCore::CCLayerTilingData::tileAt):
452         (WebCore::CCLayerTilingData::reset):
453         (WebCore::CCLayerTilingData::contentRectToTileIndices):
454         (WebCore::CCLayerTilingData::contentRectToLayerRect):
455         (WebCore::CCLayerTilingData::layerRectToContentRect):
456         (WebCore::CCLayerTilingData::tileContentRect):
457         (WebCore::CCLayerTilingData::tileLayerRect):
458         (WebCore::CCLayerTilingData::setLayerPosition):
459         (WebCore::CCLayerTilingData::growLayerToContain):
460         * platform/graphics/chromium/cc/CCLayerTilingData.h: Renamed from Source/WebCore/platform/graphics/chromium/LayerTilerChromium.h.
461         (WebCore::CCLayerTilingData::numTiles):
462         (WebCore::CCLayerTilingData::numTilesX):
463         (WebCore::CCLayerTilingData::numTilesY):
464         (WebCore::CCLayerTilingData::tileBounds):
465         (WebCore::CCLayerTilingData::textureOffset):
466         (WebCore::CCLayerTilingData::tileSize):
467         (WebCore::CCLayerTilingData::hasBorderTexels):
468         (WebCore::CCLayerTilingData::isEmpty):
469         (WebCore::CCLayerTilingData::Tile::Tile):
470         (WebCore::CCLayerTilingData::Tile::i):
471         (WebCore::CCLayerTilingData::Tile::j):
472         (WebCore::CCLayerTilingData::Tile::moveTo):
473         (WebCore::CCLayerTilingData::TileMapKeyTraits::emptyValue):
474         (WebCore::CCLayerTilingData::TileMapKeyTraits::constructDeletedValue):
475         (WebCore::CCLayerTilingData::TileMapKeyTraits::isDeletedValue):
476         (WebCore::CCLayerTilingData::tiles):
477         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
478         (WebCore::DrawableTile::DrawableTile):
479         (WebCore::DrawableTile::textureId):
480         (WebCore::DrawableTile::setTextureId):
481         (WebCore::CCTiledLayerImpl::CCTiledLayerImpl):
482         (WebCore::CCTiledLayerImpl::bindContentsTexture):
483         (WebCore::CCTiledLayerImpl::tileAt):
484         (WebCore::CCTiledLayerImpl::createTile):
485         (WebCore::CCTiledLayerImpl::draw):
486         (WebCore::CCTiledLayerImpl::setTilingData):
487         (WebCore::CCTiledLayerImpl::syncTextureId):
488         (WebCore::isCCW):
489         (WebCore::computeEdge):
490         (WebCore::intersect):
491         (WebCore::CCTiledLayerImpl::drawTiles):
492         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
493         (WebCore::CCTiledLayerImpl::setSkipsDraw):
494         (WebCore::CCTiledLayerImpl::setTextureOrientation):
495         (WebCore::CCTiledLayerImpl::setSampledTexelFormat):
496         * platform/graphics/gpu/TilingData.h:
497
498 2011-08-19  Dan Bernstein  <mitz@apple.com>
499
500         Better build fix after r93384.
501
502         * rendering/RenderBlockLineLayout.cpp:
503         (WebCore::RenderBlock::LineBreaker::nextLineBreak): Use WTF::Unicode wrapper instead of ICU.
504
505 2011-08-19  Pavel Podivilov  <podivilov@chromium.org>
506
507         Web Inspector: update scope variables upon value changes via console.
508         https://bugs.webkit.org/show_bug.cgi?id=54720
509
510         Reviewed by Pavel Feldman.
511
512         * inspector/front-end/ScriptsPanel.js:
513         (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame):
514
515 2011-08-18  Pavel Podivilov  <podivilov@chromium.org>
516
517         Web Inspector: extract breakpoint management code to a separate class and add tests.
518         https://bugs.webkit.org/show_bug.cgi?id=66224
519
520         Reviewed by Pavel Feldman.
521
522         Test: inspector/debugger/breakpoint-manager.html
523
524         * WebCore.gypi:
525         * WebCore.vcproj/WebCore.vcproj:
526         * inspector/front-end/BreakpointManager.js: Added.
527         (WebInspector.BreakpointManager):
528         (WebInspector.BreakpointManager.prototype.uiSourceCodeAdded):
529         (WebInspector.BreakpointManager.prototype.breakpointsForUISourceCode):
530         (WebInspector.BreakpointManager.prototype.setBreakpoint):
531         (WebInspector.BreakpointManager.prototype.removeBreakpoint):
532         (WebInspector.BreakpointManager.prototype._materializeBreakpoint):
533         (WebInspector.BreakpointManager.prototype._breakpointDebuggerLocationChanged):
534         (WebInspector.BreakpointManager.prototype._addBreakpointToUI):
535         (WebInspector.BreakpointManager.prototype._deleteBreakpointFromUI):
536         (WebInspector.BreakpointManager.prototype._moveBreakpointInUI):
537         (WebInspector.BreakpointManager.prototype._breakpoints):
538         (WebInspector.BreakpointManager.prototype._breakpoint):
539         (WebInspector.BreakpointManager.prototype._forEachBreakpoint):
540         (WebInspector.BreakpointManager.prototype._setBreakpointInDebugger):
541         (WebInspector.BreakpointManager.prototype._removeBreakpointFromDebugger):
542         (WebInspector.BreakpointManager.prototype._breakpointResolved):
543         (WebInspector.BreakpointManager.prototype.serializeBreakpoints):
544         (WebInspector.BreakpointManager.prototype.reset):
545         (WebInspector.BreakpointManager.prototype.debuggerReset):
546         (WebInspector.Breakpoint):
547         (WebInspector.Breakpoint.prototype.serialize):
548         (WebInspector.Breakpoint.deserialize):
549         * inspector/front-end/DebuggerModel.js:
550         (WebInspector.DebuggerModel.prototype.setBreakpointByScriptLocation):
551         * inspector/front-end/SourceFile.js:
552         (WebInspector.RawSourceCode.prototype.get rawSourceCode):
553         * inspector/front-end/WebKit.qrc:
554         * inspector/front-end/inspector.html:
555
556 2011-08-19  Adam Roben  <aroben@apple.com>
557
558         Fix typo
559
560         * dom/DOMAllInOne.cpp:
561
562 2011-08-19  Adam Roben  <aroben@apple.com>
563
564         Windows build fix after r93385
565
566         * dom/DOMAllInOne.cpp: Added EventDispatcMediator.cpp.
567
568 2011-08-19  Pavel Feldman  <pfeldman@google.com>
569
570         Web Inspector: getAttributes should work on a single node, not array.
571         https://bugs.webkit.org/show_bug.cgi?id=66544
572
573         Reviewed by Adam Roben.
574
575         * inspector/Inspector.json:
576         * inspector/InspectorDOMAgent.cpp:
577         (WebCore::InspectorDOMAgent::getAttributes):
578         * inspector/InspectorDOMAgent.h:
579         * inspector/front-end/DOMAgent.js:
580         (WebInspector.DOMAgent.prototype._loadNodeAttributes):
581
582 2011-08-19  Anton Muhin  <antonm@chromium.org>
583
584         [v8] CSS wrapper objects retention
585         https://bugs.webkit.org/show_bug.cgi?id=66377
586
587         Reviewed by Pavel Feldman.
588
589         Disable object grouping for CSS object wrappers.
590         This logic leads to hard to debug use-after-free problems.
591
592         * bindings/v8/V8GCController.cpp:
593         (WebCore::GrouperVisitor::visitDOMWrapper):
594
595 2011-08-19  Pavel Feldman  <pfeldman@google.com>
596
597         Web Inspector: introduce NodeId inherited from integer in the DOM domain description.
598         https://bugs.webkit.org/show_bug.cgi?id=66491
599
600         Drive-by rename of couple of DOM domain protocol methods.
601
602         Reviewed by Adam Roben.
603
604         * inspector/Inspector.json:
605         * inspector/InspectorDOMAgent.cpp:
606         (WebCore::InspectorDOMAgent::requestChildNodes):
607         (WebCore::InspectorDOMAgent::getAttributes):
608         (WebCore::InspectorDOMAgent::requestNode):
609         (WebCore::InspectorDOMAgent::buildObjectForNode):
610         * inspector/InspectorDOMAgent.h:
611         * inspector/front-end/DOMAgent.js:
612         (WebInspector.DOMNode):
613         (WebInspector.DOMNode.prototype.getChildNodes):
614         (WebInspector.DOMAgent.prototype.pushNodeToFrontend):
615         (WebInspector.DOMAgent.prototype._loadNodeAttributes):
616         (WebInspector.DOMAgent.prototype._setDocument):
617         (WebInspector.DOMAgent.prototype._setDetachedRoot):
618         * inspector/generate-inspector-idl:
619
620 2011-08-19  Jochen Eisinger  <jochen@chromium.org>
621
622         IDBSQLiteBackingStore::deleteObjectStore should maintain referential integrity.
623         https://bugs.webkit.org/show_bug.cgi?id=66470
624
625         Reviewed by Tony Gentilcore.
626
627         * storage/IDBSQLiteBackingStore.cpp:
628         (WebCore::IDBSQLiteBackingStore::deleteObjectStore):
629
630 2011-08-19  Takashi Toyoshima  <toyoshim@chromium.org>
631
632         [WebSocket] CloseEvent's code and reason properties support.
633         https://bugs.webkit.org/show_bug.cgi?id=66362
634
635         Reviewed by Kent Tamura.
636
637         Current WebSocket implementation miss code and reason properties
638         in CloseEvent. This change expose incoming closing frame's code
639         and reason to JavaScript API.
640
641         Tests: http/tests/websocket/tests/hybi/close-code-and-reason.html
642                http/tests/websocket/tests/hybi/workers/close-code-and-reason.html
643
644         * websockets/CloseEvent.h:
645         (WebCore::CloseEvent::initCloseEvent):
646         (WebCore::CloseEvent::code):
647         (WebCore::CloseEvent::reason):
648         (WebCore::CloseEvent::CloseEvent):
649         * websockets/CloseEvent.idl:
650         Add code and reason properies.
651         * websockets/ThreadableWebSocketChannelClientWrapper.cpp:
652         (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
653         (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback):
654         * websockets/ThreadableWebSocketChannelClientWrapper.h:
655         * websockets/WebSocket.cpp:
656         (WebCore::WebSocket::didConnect):
657         (WebCore::WebSocket::didClose):
658         * websockets/WebSocket.h:
659         Add implement to handle code and reason.
660         * websockets/WebSocketChannel.cpp:
661         (WebCore::WebSocketChannel::WebSocketChannel):
662         (WebCore::WebSocketChannel::didCloseSocketStream):
663         (WebCore::WebSocketChannel::processFrame):
664         * websockets/WebSocketChannel.h:
665         Add closing frame payload parser.
666         * websockets/WebSocketChannelClient.h:
667         (WebCore::WebSocketChannelClient::didClose):
668         * websockets/WorkerThreadableWebSocketChannel.cpp:
669         (WebCore::workerContextDidClose):
670         (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
671         * websockets/WorkerThreadableWebSocketChannel.h:
672         Add implement to handle code and reason.
673
674 2011-08-19  MORITA Hajime  <morrita@google.com>
675
676         Spell-checking doesn't recognize word boundaries on contests inserted by execCommand('insertHTML')
677         https://bugs.webkit.org/show_bug.cgi?id=65902
678
679         Reviewed by Ryosuke Niwa.
680         
681         markMisspellingsAndBadGrammar() was using markSpelling() and markBadGrammar().
682         But these are low-level API and caller should take care of word boundary.
683         This change replaced these call with overloaded version of markMisspellingsAndBadGrammar(),
684         which handles word boundary correctly.
685         
686         Test: editing/spelling/spelling-insert-html.html
687
688         * WebCore.exp.in:
689         * editing/Editor.cpp:
690         (WebCore::Editor::markMisspellingsAndBadGrammar):
691         * testing/Internals.cpp:
692         (WebCore::Internals::markerCountOf): Added.
693         (WebCore::Internals::markedRangeAt): Added.
694         * testing/Internals.h:
695         * testing/Internals.idl:
696
697 2011-08-19  Nayan Kumar K  <nayankk@motorola.com>
698
699         Run-time error fix in WebKit-GTK with video support disabled.
700         https://bugs.webkit.org/show_bug.cgi?id=66541
701
702         Definition of the function extraFullScreenStyleSheet() in webkit-gtk
703         lies outside ENABLE(VIDEO) guard, resulting in runtime error while
704         trying to launch GtkLauncher with video support disabled.
705
706         Reviewed by Philippe Normand.
707
708         Run-time error fix. No test cases were added.
709
710         * platform/gtk/RenderThemeGtk.h:
711
712 2011-08-19  Shinya Kawanaka  <shinyak@google.com>
713
714         input[maxlength=0] should ignore text input.
715         https://bugs.webkit.org/show_bug.cgi?id=65497
716
717         Reviewed by Kent Tamura.
718
719         Changed the valid range of maxlength.
720
721         * html/HTMLInputElement.cpp:
722         (WebCore::HTMLInputElement::parseMaxLengthAttribute):
723           Changed maxlength check condition.
724
725 2011-08-19  Ilya Tikhonovsky  <loislo@chromium.org>
726
727         Web Inspector: backend js api: an ability to skip optional arguments in the middle of the argument list is required.
728         https://bugs.webkit.org/show_bug.cgi?id=66482
729
730         There are functions in the API with multiple optional arguments.
731         When we call it we have to specify an optional argument as 'undefined' if we want to pass non default value for the next one.
732         This can be solved with passing the arguments as an object.
733
734         Reviewed by Pavel Feldman.
735
736         * inspector/CodeGeneratorInspector.pm:
737         * inspector/front-end/RemoteObject.js:
738
739 2011-08-19  Zoltan Horvath  <zoltan@webkit.org>
740
741         [Qt] Build fix after r93384.
742
743         * rendering/RenderBlockLineLayout.cpp:
744         (WebCore::RenderBlock::LineBreaker::nextLineBreak):
745
746 2011-08-18  Shawn Singh  <shawnsingh@chromium.org>
747
748         Computing screen-space transform for LayerChromium and CCLayerImpl
749         https://bugs.webkit.org/show_bug.cgi?id=66114
750
751         Added a data member to LayerChromium and CCLayerImpl that holds
752         the screen-space transform.   The transform is computed in
753         calculateDrawTransformsAndVisibility(), which is used during
754         updating (LayerChromium) and drawing (CCLayerImpl).
755
756         Also fixed a FIXME in LayerRendererChromium::drawLayer, which
757         was not computing the entire hierarchy of transforms to determine
758         back-face visibility.  Now it simply uses the world space transform.
759
760         Reviewed by James Robinson.
761
762         Test: compositing/backface-visibility-hierarchical-transform.html
763
764         * platform/graphics/chromium/LayerChromium.h:
765         (WebCore::LayerChromium::screenSpaceTransform):
766         (WebCore::LayerChromium::setScreenSpaceTransform):
767         * platform/graphics/chromium/LayerRendererChromium.cpp:
768         (WebCore::LayerRendererChromium::updateLayers):
769         (WebCore::LayerRendererChromium::drawLayersInternal):
770         (WebCore::LayerRendererChromium::drawLayer):
771         * platform/graphics/chromium/cc/CCLayerImpl.h:
772         (WebCore::CCLayerImpl::screenSpaceTransform):
773         (WebCore::CCLayerImpl::setScreenSpaceTransform):
774
775 2011-08-18  Ben Wells  <benwells@chromium.org>
776
777         [skia] -webkit-transform breaks -webkit-mask
778         https://bugs.webkit.org/show_bug.cgi?id=66442
779
780         The problem here is that in RenderBox::paintMaskImages, if we are in
781         a transform with a rotation, scale or skew we set the composite mode to
782         be DestinationIn and then create a transparency layer, then paint the
783         mask with SourceOver and end the transparency layer. (The normal case
784         is just to use DestinationIn to paint the mask.)
785
786         In skia when we create transparency layers we don't pass on the composite
787         mode, so when we end the transparency layer it is composited back using
788         SourceOver. The fix is to pass on the composite mode when creating
789         transparency layers in skia.
790
791         Reviewed by Stephen White.
792
793         * platform/graphics/skia/GraphicsContextSkia.cpp:
794         (WebCore::GraphicsContext::beginTransparencyLayer):
795         * platform/graphics/skia/PlatformContextSkia.cpp:
796         (WebCore::PlatformContextSkia::getXfermodeMode):
797         * platform/graphics/skia/PlatformContextSkia.h:
798
799 2011-08-18  Hayato Ito  <hayato@chromium.org>
800
801         Isolate EventDispatchMediator into a separate file.
802         https://bugs.webkit.org/show_bug.cgi?id=66458
803
804         Reviewed by Ryosuke Niwa.
805
806         Extracted EventDispatchMediator.h and EventDispatchMediator.cpp
807         out of Event.h and Event.cpp Also moved FocusEventDispatchMediator
808         and BlurEventDispatchMediator from Event.{h|cpp} to
809         EventDispatchMediator.{h|cpp}.
810
811         No new tests since this is just refactoring.
812
813         * CMakeLists.txt:
814         * GNUmakefile.list.am:
815         * WebCore.gypi:
816         * WebCore.pro:
817         * WebCore.vcproj/WebCore.vcproj:
818         * WebCore.xcodeproj/project.pbxproj:
819         * dom/Event.cpp:
820         * dom/Event.h:
821         * dom/EventDispatchMediator.cpp: Added.
822         (WebCore::EventDispatchMediator::create):
823         (WebCore::EventDispatchMediator::EventDispatchMediator):
824         (WebCore::EventDispatchMediator::dispatchEvent):
825         (WebCore::FocusEventDispatchMediator::create):
826         (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator):
827         (WebCore::FocusEventDispatchMediator::dispatchEvent):
828         (WebCore::BlurEventDispatchMediator::create):
829         (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator):
830         (WebCore::BlurEventDispatchMediator::dispatchEvent):
831         * dom/EventDispatchMediator.h: Added.
832         (WebCore::EventDispatchMediator::~EventDispatchMediator):
833         (WebCore::EventDispatchMediator::event):
834         (WebCore::EventDispatchMediator::EventDispatchMediator):
835         (WebCore::EventDispatchMediator::setEvent):
836         * dom/EventDispatcher.cpp:
837         * dom/KeyboardEvent.h:
838         * dom/MouseEvent.h:
839         * dom/Node.cpp:
840         * dom/ScopedEventQueue.cpp:
841         * dom/UIEvent.h:
842         * dom/WheelEvent.h:
843
844 2011-08-18  Dan Bernstein  <mitz@apple.com>
845
846         Mid-word break can occur between a character and a combining mark
847         https://bugs.webkit.org/show_bug.cgi?id=66529
848
849         Reviewed by Simon Fraser.
850
851         No test added because I could not find a combining mark with a non-zero advance in
852         any of the system fonts and tests fonts. 
853
854         * rendering/RenderBlockLineLayout.cpp:
855         (WebCore::RenderBlock::LineBreaker::nextLineBreak): Disallow a mid-word break before a
856         combining mark.
857
858 2011-08-18  Kent Tamura  <tkent@chromium.org>
859
860         REGRESSION(r90971): Null pointer dereference with placeholder and webkit-scrollbar-corner
861         https://bugs.webkit.org/show_bug.cgi?id=66453
862
863         Reviewed by Simon Fraser.
864
865         Test: fast/forms/placeholder-crash-with-scrollbar-corner.html
866
867         * rendering/RenderObjectChildList.cpp:
868         (WebCore::RenderObjectChildList::removeChildNode): Add a NULL check for owner's layer.
869
870 2011-08-18  Jeffrey Pfau  <jpfau@apple.com>
871
872         New XML parser: scripting support
873         https://bugs.webkit.org/show_bug.cgi?id=66406
874
875         Reviewed by Adam Barth.
876
877         * xml/parser/NewXMLDocumentParser.cpp:
878         (WebCore::NewXMLDocumentParser::NewXMLDocumentParser):
879         (WebCore::NewXMLDocumentParser::resumeParsing):
880         (WebCore::NewXMLDocumentParser::processScript):
881         (WebCore::NewXMLDocumentParser::append): Add support for pausing the parsing
882         (WebCore::NewXMLDocumentParser::finish): Add support for pausing the parsing
883         (WebCore::NewXMLDocumentParser::notifyFinished):
884         * xml/parser/NewXMLDocumentParser.h:
885         (WebCore::NewXMLDocumentParser::pauseParsing):
886         * xml/parser/XMLTreeBuilder.cpp: Add a shared function between self-closing and end tags
887         (WebCore::XMLTreeBuilder::closeElement): Registers scripts and pops the stack
888         (WebCore::XMLTreeBuilder::processStartTag):
889         (WebCore::XMLTreeBuilder::processEndTag):
890         * xml/parser/XMLTreeBuilder.h:
891
892 2011-08-18  Mark Hahnenberg  <mhahnenberg@apple.com>
893
894         Move allocation in constructors into separate constructorBody() methods
895         https://bugs.webkit.org/show_bug.cgi?id=66265
896
897         Reviewed by Oliver Hunt.
898
899         No new tests.
900
901         Refactoring to put all allocations that need to be done after the object's 
902         initialization list has executed but before the object is ready for use 
903         into a separate constructorBody() method.  This method is still called by the constructor, 
904         so the patch doesn't resolve any potential issues, it's just to set up the code for further refactoring.
905
906         * bridge/objc/ObjCRuntimeObject.h:
907         (JSC::Bindings::ObjCRuntimeObject::create):
908         * bridge/objc/ObjCRuntimeObject.mm:
909         * bridge/objc/objc_instance.mm:
910         (ObjCRuntimeMethod::create):
911         (ObjCRuntimeMethod::ObjCRuntimeMethod):
912         * bridge/runtime_array.cpp:
913         * bridge/runtime_array.h:
914         (JSC::RuntimeArray::create):
915
916 2011-08-18  Beth Dakin  <bdakin@apple.com>
917
918         https://bugs.webkit.org/show_bug.cgi?id=66495
919         Lion-specific scroller SPIs can use forward declaration instead of 
920         WebKitSystemInterface
921
922         Reviewed by Sam Weinig.
923
924         * WebCore.exp.in:
925         * WebCore.xcodeproj/project.pbxproj:
926         * platform/mac/NSScrollerImpDetails.h: Added.
927         * platform/mac/ScrollAnimatorMac.h:
928         * platform/mac/ScrollAnimatorMac.mm:
929         (-[ScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]):
930         (-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
931         (-[ScrollbarPartAnimation initWithScrollbarPainter:part:WebCore::scrollAnimator:WebCore::animateAlphaTo:duration:]):
932         (-[ScrollbarPartAnimation setCurrentProgress:]):
933         (-[ScrollbarPainterDelegate setUpAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
934         (-[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
935         (-[ScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
936         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
937         (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
938         (WebCore::ScrollAnimatorMac::notifyPositionChanged):
939         (WebCore::ScrollAnimatorMac::contentAreaWillPaint):
940         (WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
941         (WebCore::ScrollAnimatorMac::mouseExitedContentArea):
942         (WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
943         (WebCore::ScrollAnimatorMac::willStartLiveResize):
944         (WebCore::ScrollAnimatorMac::contentsResized):
945         (WebCore::ScrollAnimatorMac::willEndLiveResize):
946         (WebCore::ScrollAnimatorMac::contentAreaDidShow):
947         (WebCore::ScrollAnimatorMac::contentAreaDidHide):
948         (WebCore::ScrollAnimatorMac::didBeginScrollGesture):
949         (WebCore::ScrollAnimatorMac::didEndScrollGesture):
950         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
951         (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
952         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
953         (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
954         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
955         (WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired):
956         * platform/mac/ScrollbarThemeMac.h:
957         * platform/mac/ScrollbarThemeMac.mm:
958         (WebCore::ScrollbarThemeMac::registerScrollbar):
959         (WebCore::ScrollbarThemeMac::scrollbarThickness):
960         (WebCore::ScrollbarThemeMac::usesOverlayScrollbars):
961         (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
962         (WebCore::ScrollbarThemeMac::hasThumb):
963         (WebCore::ScrollbarThemeMac::minimumThumbLength):
964         (WebCore::ScrollbarThemeMac::updateEnabledState):
965         (WebCore::scrollbarPainterPaint):
966         (WebCore::ScrollbarThemeMac::paint):
967         * platform/mac/WebCoreSystemInterface.h:
968         * platform/mac/WebCoreSystemInterface.mm:
969
970 2011-08-18  Dan Bernstein  <mitz@apple.com>
971
972         <rdar://problem/9973194> Fonts that specify a positive descender value are treated as having descenders ending above the baseline
973         https://bugs.webkit.org/show_bug.cgi?id=66515
974
975         Reviewed by Darin Adler.
976
977         No test because none of the system fonts and test fonts have an incorrectly-specified descender value.
978
979         * platform/graphics/mac/SimpleFontDataMac.mm:
980         (WebCore::SimpleFontData::platformInit): If the font specifies a positive descender, assume that it meant
981         the same amount, but negative. This is consistent with what Core Text does.
982
983 2011-08-18  Ryosuke Niwa  <rniwa@webkit.org>
984
985         positionForPoint returns wrong VisiblePosition at bidi boundaries
986         https://bugs.webkit.org/show_bug.cgi?id=65356
987
988         Reviewed by David Hyatt.
989
990         The bug was caused by RenderText::positionForPoint's assuming that the position will always reside
991         inside the inline box that contains the point, which is not true at the boundaries of bidi-runs.
992
993         For example, in aDC12BAb where AB12CD is a RTL text, the offset on the right of A is 7 even though
994         the inline box for "BA" only contains offsets 1, 2, and 3. We must traverse the bidi-run "DC12BA"
995         until the end to obtain the offset 7 from the inline box for "DC".
996
997         Fixed the bug by introducing createVisiblePositionAfterAdjustingOffsetForBiDi which traverses runs
998         on the left or the right of the position to compute the appropriate offset following the NSTextView convention.
999
1000         This patch also fixes a regression from r74971 that caret is placed incorrectly between inline boxes of
1001         LTR or RTL text in a RTL or LTR block respectively.
1002
1003         Test: editing/selection/caret-at-bidi-boundary.html
1004
1005         * rendering/InlineTextBox.cpp:
1006         (WebCore::InlineTextBox::offsetForPosition):
1007         * rendering/RenderText.cpp:
1008         (WebCore::lineDirectionPointFitsInBox): Takes ShouldAffinityBeDownstream instead of EAfinity.
1009         (WebCore::createVisiblePositionForBox):
1010         (WebCore::createVisiblePositionAfterAdjustingOffsetForBiDi):
1011         (WebCore::RenderText::positionForPoint):
1012
1013 2011-08-18  Xiaomei Ji  <xji@chromium.org>
1014
1015         --webkit-visual-word renaming right/leftWordPositionAcrossBoundary
1016         https://bugs.webkit.org/show_bug.cgi?id=66436
1017
1018         Reviewed by Ryosuke Niwa.
1019
1020         Rename them to right/leftWordPositionIgnoringEditingBoundary.
1021
1022         * editing/visible_units.cpp:
1023         (WebCore::leftWordPositionIgnoringEditingBoundary):
1024         (WebCore::rightWordPositionIgnoringEditingBoundary):
1025         (WebCore::leftWordPosition):
1026         (WebCore::rightWordPosition):
1027
1028 2011-08-18  Jeff Miller  <jeffm@apple.com>
1029
1030         Soft link against AVFoundationCF and CoreMedia
1031         https://bugs.webkit.org/show_bug.cgi?id=65725
1032         
1033         Add new macros to SoftLinking.h to support soft-linking to functions and variables decorated with __declspec(dllimport),
1034         and use them to soft-link to AVFoundationCF and CoreMedia. I verified that the WebProcess doesn't load these DLLs
1035         until a media element is used.
1036
1037         Reviewed by Eric Carlson.
1038
1039         No new tests as no change in functionality.
1040
1041         * WebCore.vcproj/WebCore.vcproj: Added AVFoundationCFSoftLinking.h and CoreMediaSoftLinking.h.
1042         * WebCore.vcproj/WebCoreMediaQT.vsprops: Removed DelayLoadDLLs linker option which is no longer needed.
1043         * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Added.
1044         * platform/graphics/avfoundation/cf/CoreMediaSoftLinking.h: Added.
1045         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Stop linking against AVFoundationCF.lib and CoreMedia.lib and include AVFoundationCFSoftLinking.h and CoreMediaSoftLinking.h.
1046         * platform/win/SoftLinking.h: Added SOFT_LINK_DLL_IMPORT() and SOFT_LINK_VARIABLE_DLL_IMPORT() macros.
1047
1048 2011-08-18  Sailesh Agrawal  <sail@chromium.org>
1049
1050         Chromium Mac: Show scrollbar when doing search
1051         https://bugs.webkit.org/show_bug.cgi?id=66209
1052
1053         Reviewed by James Robinson.
1054
1055         Updated the Lion scrollbar drawing code to force the scrollbar to be visible when we have tickmarks for search results.
1056
1057         No tests because there are no Mac 10.7 chromium bots yet.
1058
1059         * platform/chromium/ScrollbarThemeChromiumMac.h:
1060         * platform/chromium/ScrollbarThemeChromiumMac.mm:
1061         (WebCore::ScrollbarThemeChromiumMac::paint):
1062         (WebCore::ScrollbarThemeChromiumMac::paintTickmarks):
1063
1064 2011-08-18  James Robinson  <jamesr@chromium.org>
1065
1066         [chromium] Draw the root/"non-composited content" in compositor side
1067         https://bugs.webkit.org/show_bug.cgi?id=58834
1068
1069         Reviewed by Kenneth Russell.
1070
1071         Handle the root or non-composited content with a GraphicsLayer rather than special case logic in
1072         LayerRendererChromium. This layer's client is the NonCompositedContentHost, which routes the paint callbacks
1073         through the LayerPainterChromium interface out to the WebView.  The root layer is special in two ways:
1074         *) The root layer has a scroll offset, which changes how the visibleLayerRect maps to content space and applies a
1075             draw-time transform.
1076         *) The root layer masks the alpha channel and disable blending when drawing because of concerns about subpixel
1077             AA trashing the alpha channel.  The root layer is always opaque so this is fine.
1078         *) The root layer does not have border texels and does have subpixel AA for text.
1079
1080         Covered by compositing/
1081
1082         * WebCore.gypi:
1083         * platform/graphics/chromium/ContentLayerChromium.cpp:
1084         (WebCore::ContentLayerChromium::paintContentsIfDirty):
1085         * platform/graphics/chromium/ImageLayerChromium.cpp:
1086         (WebCore::ImageLayerChromium::paintContentsIfDirty):
1087         * platform/graphics/chromium/LayerChromium.cpp:
1088         (WebCore::LayerChromium::pushPropertiesTo):
1089         * platform/graphics/chromium/LayerChromium.h:
1090         (WebCore::LayerChromium::scrollPosition):
1091         (WebCore::LayerChromium::setScrollPosition):
1092         * platform/graphics/chromium/LayerRendererChromium.cpp:
1093         (WebCore::LayerRendererChromium::initialize):
1094         (WebCore::LayerRendererChromium::releaseTextures):
1095         (WebCore::LayerRendererChromium::viewportChanged):
1096         (WebCore::LayerRendererChromium::updateLayers):
1097         (WebCore::LayerRendererChromium::drawLayers):
1098         (WebCore::LayerRendererChromium::drawLayersInternal):
1099         (WebCore::LayerRendererChromium::getFramebufferPixels):
1100         (WebCore::LayerRendererChromium::cleanupSharedObjects):
1101         (WebCore::LayerRendererChromium::layerTreeAsText):
1102         * platform/graphics/chromium/LayerRendererChromium.h:
1103         (WebCore::LayerRendererChromium::rootLayer):
1104         (WebCore::LayerRendererChromium::viewportSize):
1105         (WebCore::LayerRendererChromium::viewportWidth):
1106         (WebCore::LayerRendererChromium::viewportHeight):
1107         * platform/graphics/chromium/NonCompositedContentHost.cpp: Added.
1108         (WebCore::NonCompositedContentHost::NonCompositedContentHost):
1109         (WebCore::NonCompositedContentHost::~NonCompositedContentHost):
1110         (WebCore::NonCompositedContentHost::invalidateRect):
1111         (WebCore::NonCompositedContentHost::invalidateEntireLayer):
1112         (WebCore::NonCompositedContentHost::setScrollPosition):
1113         (WebCore::NonCompositedContentHost::notifyAnimationStarted):
1114         (WebCore::NonCompositedContentHost::notifySyncRequired):
1115         (WebCore::NonCompositedContentHost::paintContents):
1116         (WebCore::NonCompositedContentHost::showDebugBorders):
1117         (WebCore::NonCompositedContentHost::showRepaintCounter):
1118         * platform/graphics/chromium/NonCompositedContentHost.h: Added.
1119         (WebCore::NonCompositedContentHost::create):
1120         (WebCore::NonCompositedContentHost::graphicsLayer):
1121         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
1122         (WebCore::CCHeadsUpDisplay::draw):
1123         * platform/graphics/chromium/cc/CCLayerImpl.h:
1124         (WebCore::CCLayerImpl::scrollPosition):
1125         (WebCore::CCLayerImpl::setScrollPosition):
1126         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1127         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
1128         (WebCore::CCLayerTreeHost::initialize):
1129         (WebCore::CCLayerTreeHost::invalidateRootLayerRect):
1130         (WebCore::CCLayerTreeHost::setRootLayer):
1131         (WebCore::CCLayerTreeHost::setViewport):
1132         (WebCore::CCLayerTreeHost::reallocateRenderer):
1133         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1134         (WebCore::CCLayerTreeHost::rootLayer):
1135         (WebCore::CCLayerTreeHost::viewportSize):
1136
1137 2011-08-18  Sheriff Bot  <webkit.review.bot@gmail.com>
1138
1139         Unreviewed, rolling out r93354.
1140         http://trac.webkit.org/changeset/93354
1141         https://bugs.webkit.org/show_bug.cgi?id=66503
1142
1143         "consensus was not reached" (Requested by senorblanco on
1144         #webkit).
1145
1146         * html/canvas/CanvasRenderingContext2D.cpp:
1147         (WebCore::CanvasRenderingContext2D::drawImage):
1148         * platform/graphics/cg/GraphicsContextCG.cpp:
1149         (WebCore::GraphicsContext::drawNativeImage):
1150
1151 2011-08-18  Sadrul Habib Chowdhury  <sadrul@chromium.org>
1152
1153         GestureRecognizer: Update how gesture-scroll works.
1154
1155         Instead of just sending a series of 'GestureUpdate' events, send a
1156         single 'GestureBegin' event, followed by a series of 'GestureUpdate' events,
1157         and end with a 'GestureEnd' event.
1158         https://bugs.webkit.org/show_bug.cgi?id=66267
1159
1160         Reviewed by Adam Barth.
1161
1162         * page/EventHandler.cpp:
1163         (WebCore::EventHandler::handleGestureEvent):
1164         * platform/chromium/GestureRecognizerChromium.cpp:
1165         (WebCore::InnerGestureRecognizer::InnerGestureRecognizer):
1166         (WebCore::InnerGestureRecognizer::appendScrollGestureBegin):
1167         (WebCore::InnerGestureRecognizer::appendScrollGestureEnd):
1168         (WebCore::InnerGestureRecognizer::appendScrollGestureUpdate):
1169         (WebCore::scrollEnd):
1170         (WebCore::isClickOrScroll):
1171         (WebCore::inScroll):
1172         * platform/chromium/GestureRecognizerChromium.h:
1173         (WebCore::InnerGestureRecognizer::firstTouchPosition):
1174
1175 2011-08-18  Sailesh Agrawal  <sail@chromium.org>
1176
1177         Chromium: Update forked ScrollbarThemeChromiumMac.mm
1178         https://bugs.webkit.org/show_bug.cgi?id=65555
1179
1180         Reviewed by James Robinson.
1181
1182         Merge recent changes to ScrollbarThemeMac.mm to ScrollbarThemeChromiumMac.mm.
1183
1184         * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h:
1185         * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm:
1186         (wkScrollbarPainterSetEnabled):
1187         * platform/chromium/ScrollbarThemeChromiumMac.h:
1188         (WebCore::ScrollbarThemeChromiumMac::maxOverlapBetweenPages):
1189         * platform/chromium/ScrollbarThemeChromiumMac.mm:
1190         (WebCore::ScrollbarThemeChromiumMac::registerScrollbar):
1191         (WebCore::ScrollbarThemeChromiumMac::setNewPainterForScrollbar):
1192         (WebCore::toScrollbarPainterKnobStyle):
1193         (WebCore::ScrollbarThemeChromiumMac::updateScrollbarOverlayStyle):
1194         (WebCore::ScrollbarThemeChromiumMac::updateEnabledState):
1195         (WebCore::ScrollbarThemeChromiumMac::paint):
1196
1197 2011-08-18  Justin Novosad  <junov@chromium.org>
1198
1199         Unwarranted DOM Exception when when canvas2D drawImage is called with src
1200         rect out of bounds
1201         https://bugs.webkit.org/show_bug.cgi?id=65709
1202
1203         Reviewed by Stephen White.
1204
1205         Test: fast/canvas/drawImage-clipped-source.html
1206
1207         * html/canvas/CanvasRenderingContext2D.cpp:
1208         (WebCore::CanvasRenderingContext2D::drawImage):
1209         Removed the unnecessary dom exceptions for out of bounds source rectangles
1210         The overloads that receive video and image elements as source images
1211         now use the normalized versions of the source rectangle, which
1212         GraphicsContext (and its various platform flavors) can handle correctly.
1213         The normalized rectangle is the equivalent rectangle with width and height
1214         greater than 0.  The canvas version of this method, which had better layout 
1215         test coverage, was already correctly using the normalized rectangle. The
1216         newly added layout test verifies correct behavior with negative
1217         source rectangle dimensions.
1218         * platform/graphics/cg/GraphicsContextCG.cpp:
1219         (WebCore::GraphicsContext::drawNativeImage):
1220         Fixed algorithm that adjusts the destination rectangle to match the clipping
1221         applied to the source rect. The case of scaled filtered images with source
1222         rectangles that overlap the edge of the image was not being handled
1223         correctly. This use case was previously unsupported and used to trigger
1224         a DOM exception.
1225
1226 2011-08-18  Sheriff Bot  <webkit.review.bot@gmail.com>
1227
1228         Unreviewed, rolling out r93329.
1229         http://trac.webkit.org/changeset/93329
1230         https://bugs.webkit.org/show_bug.cgi?id=66497
1231
1232         Turned text on chromium win blue (Requested by jamesr_ on
1233         #webkit).
1234
1235         * WebCore.gypi:
1236         * platform/graphics/chromium/ContentLayerChromium.cpp:
1237         * platform/graphics/chromium/ContentLayerChromium.h:
1238         * platform/graphics/chromium/ImageLayerChromium.cpp:
1239         (WebCore::ImageLayerTextureUpdater::prepareToUpdate):
1240         * platform/graphics/chromium/LayerChromium.cpp:
1241         (WebCore::LayerChromium::LayerChromium):
1242         (WebCore::LayerChromium::pushPropertiesTo):
1243         (WebCore::LayerChromium::dumpLayerProperties):
1244         * platform/graphics/chromium/LayerChromium.h:
1245         * platform/graphics/chromium/LayerRendererChromium.cpp:
1246         (WebCore::LayerRendererChromium::initialize):
1247         (WebCore::LayerRendererChromium::releaseTextures):
1248         (WebCore::LayerRendererChromium::updateRootLayerContents):
1249         (WebCore::LayerRendererChromium::drawRootLayer):
1250         (WebCore::LayerRendererChromium::invalidateRootLayerRect):
1251         (WebCore::LayerRendererChromium::rootLayerChanged):
1252         (WebCore::LayerRendererChromium::viewportChanged):
1253         (WebCore::LayerRendererChromium::updateLayers):
1254         (WebCore::LayerRendererChromium::drawLayers):
1255         (WebCore::LayerRendererChromium::paintLayerContents):
1256         (WebCore::LayerRendererChromium::drawLayersInternal):
1257         (WebCore::LayerRendererChromium::getFramebufferPixels):
1258         (WebCore::LayerRendererChromium::cleanupSharedObjects):
1259         (WebCore::LayerRendererChromium::layerTreeAsText):
1260         (WebCore::LayerRendererChromium::dumpRenderSurfaces):
1261         * platform/graphics/chromium/LayerRendererChromium.h:
1262         (WebCore::LayerRendererChromium::rootLayer):
1263         * platform/graphics/chromium/NonCompositedContentHost.cpp: Removed.
1264         * platform/graphics/chromium/NonCompositedContentHost.h: Removed.
1265         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
1266         (WebCore::RenderSurfaceChromium::dumpSurface):
1267         * platform/graphics/chromium/TiledLayerChromium.cpp:
1268         (WebCore::TiledLayerChromium::createTilerIfNeeded):
1269         (WebCore::TiledLayerChromium::tilingTransform):
1270         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
1271         (WebCore::CCHeadsUpDisplay::draw):
1272         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
1273         (WebCore::CCLayerImpl::CCLayerImpl):
1274         * platform/graphics/chromium/cc/CCLayerImpl.h:
1275         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1276         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
1277         (WebCore::CCLayerTreeHost::initialize):
1278         (WebCore::CCLayerTreeHost::createRootLayerPainter):
1279         (WebCore::CCLayerTreeHost::invalidateRootLayerRect):
1280         (WebCore::CCLayerTreeHost::setRootLayer):
1281         (WebCore::CCLayerTreeHost::setViewport):
1282         (WebCore::CCLayerTreeHost::reallocateRenderer):
1283         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1284         (WebCore::CCLayerTreeHost::rootLayer):
1285         (WebCore::CCLayerTreeHost::viewportContentRect):
1286         (WebCore::CCLayerTreeHost::viewportScrollPosition):
1287         (WebCore::CCLayerTreeHost::viewportVisibleRect):
1288         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
1289         (WebCore::CCTiledLayerImpl::draw):
1290
1291 2011-08-18  Ryosuke Niwa  <rniwa@webkit.org>
1292
1293         SimplifiedBackwardsTextIterator returns incorrect offset with first-letter rule
1294         https://bugs.webkit.org/show_bug.cgi?id=66086
1295
1296         Reviewed by Darin Adler.
1297
1298         The bug was caused by SimplifiedBackwardsTextIterator's not taking care of first-letter at all.
1299         Fixing the bug by detecting RenderTextFragment in handleTextNode.
1300
1301         Also added m_shouldHandleFirstLetter to SimplifiedBackwardsTextIterator to keep track of whether or not
1302         the next call to handleTextNode needs to process the first-letter part of the text fragment.
1303
1304         Test: editing/text-iterator/backward-textiterator-first-letter-crash.html
1305
1306         * editing/TextIterator.cpp:
1307         (WebCore::firstRenderTextInFirstLetter): Extracted from handleTextNodeFirstLetter.
1308         (WebCore::TextIterator::handleTextNodeFirstLetter): Calls firstRenderTextInFirstLetter.
1309         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
1310         (WebCore::SimplifiedBackwardsTextIterator::handleTextNode):
1311         (WebCore::SimplifiedBackwardsTextIterator::handleFirstLetter): Added.
1312         * editing/TextIterator.h:
1313
1314 2011-08-18  Iain Merrick  <husky@google.com>
1315
1316         [chromium] Assert that main thread and compositor thread are used safely
1317         https://bugs.webkit.org/show_bug.cgi?id=66145
1318
1319         CCLayerTreeHostImplProxy now has public static methods isMainThread()
1320         and isImplThread(), and we ASSERT these in various places. If threaded
1321         compositing is disabled, we fake isImplThread() by setting a flag for
1322         the duration of compositing, so the assert is still valid.
1323
1324         Reviewed by James Robinson.
1325
1326         Covered by existing tests.
1327
1328         * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp:
1329         (WebCore::CCCanvasLayerImpl::draw):
1330         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1331         (WebCore::CCLayerTreeHost::doComposite):
1332         * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp:
1333         (WebCore::CCLayerTreeHostImplProxy::postDrawLayersTaskOnCCThread):
1334         (WebCore::CCLayerTreeHostImplProxy::requestFrameAndCommitOnCCThread):
1335         (WebCore::CCLayerTreeHostImplProxy::isMainThread):
1336         (WebCore::CCLayerTreeHostImplProxy::isImplThread):
1337         (WebCore::CCLayerTreeHostImplProxy::setImplThread):
1338         (WebCore::CCLayerTreeHostImplProxy::commitOnCCThread):
1339         (WebCore::CCLayerTreeHostImplProxy::drawLayersOnCCThread):
1340         (WebCore::CCLayerTreeHostImplProxy::setNeedsCommitAndRedrawOnCCThread):
1341         (WebCore::CCLayerTreeHostImplProxy::setNeedsRedrawOnCCThread):
1342         (WebCore::CCLayerTreeHostImplProxy::initImplOnCCThread):
1343         (WebCore::CCLayerTreeHostImplProxy::layerTreeHostClosedOnCCThread):
1344         * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.h:
1345         * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp:
1346         (WebCore::CCPluginLayerImpl::draw):
1347         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
1348         (WebCore::CCTiledLayerImpl::draw):
1349         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
1350         (WebCore::CCVideoLayerImpl::draw):
1351
1352 2011-08-18  Alexey Proskuryakov  <ap@apple.com>
1353
1354         Regional indicator symbols that are combined should behave as a single character when editing
1355         https://bugs.webkit.org/show_bug.cgi?id=65395
1356
1357         Reviewed by Dan Bernstein.
1358
1359         Part two: make cursor movement iterator work. This fixes the problem for strings that don't
1360         contain more than two flags in a row, as fixing it completely doesn't seem possible with ICU.
1361
1362         Test: editing/selection/regional-indicators.html
1363
1364         * platform/text/TextBreakIteratorICU.cpp: (WebCore::cursorMovementIterator): Added custom
1365         rules for regional indicator symbols.
1366
1367 2011-08-18  Cary Clark  <caryclark@google.com>
1368
1369         Fix rubber band gutter drawing for Skia on Chromium Mac
1370         https://bugs.webkit.org/show_bug.cgi?id=66478
1371
1372         Reviewed by James Robinson.
1373
1374         No new tests. The Skia on Chromium Mac platform has
1375         not been enabled.
1376
1377         This break was detected at compile time; there is no
1378         behavior change.
1379
1380         * platform/chromium/ScrollbarThemeChromiumMac.mm:
1381         (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac):
1382         Convert the CGImage into an SkBitmap if Skia is present.
1383
1384 2011-08-18  Julien Chaffraix  <jchaffraix@webkit.org>
1385
1386         Implement a faster path for painting tables with overflowing cells
1387         https://bugs.webkit.org/show_bug.cgi?id=65491
1388
1389         This change introduces a smarter way of painting if the table is big enough and we have a small amount
1390         of overflowing cells in the table. The new path does a binary search of the cells to repaint but adds
1391         the overflowing cells to the repainting cells.
1392
1393         This saves ~50% when doing programmatic scrolling throught JS on a 500x100 table with some overflowing
1394         cells. Also we cap the memory usage to a ratio of the total size of the table to avoid blowing up the
1395         memory.
1396
1397         Reviewed by David Hyatt.
1398
1399         No new tests as the behavior should be the same.
1400
1401         * rendering/RenderTableSection.cpp:
1402         (WebCore::RenderTableSection::RenderTableSection):
1403         (WebCore::RenderTableSection::layoutRows): Added some code to accumulate the overflowing cells
1404         in an internal HashSet (we don't need to keep them sorted and it makes it easier to use them during
1405         painting). If we hit the cap, flip the boolean value and clear the HashSet as the slow path does not
1406         care about the cell's information. Make sure that the "has overflowing cells" information is still
1407         properly encoded on our 2 values.
1408
1409         (WebCore::compareCellPositionsWithOverflowingCells): Added this method as we are doing a more
1410         complicated sort:
1411             * the old path would sort one (mostly sorted) array by rows only as the stable sort would
1412               take care of keeping the column ordering inside a row.
1413             * the new path basically has to sort an unsorted array (taken partly from the HashSet).
1414
1415         (WebCore::RenderTableSection::paintObject): Tweaked the logic to account for difference between
1416         m_forceSlowPaintPathWithOverflowingCell and has some overflowing cells. Also we make sure we don't
1417         repaint the same cell twice.
1418
1419         (WebCore::RenderTableSection::nodeAtPoint): Changed to hasOverflowingCell(). We don't apply our
1420         fast path optimization here.
1421
1422         * rendering/RenderTableSection.h: Transformed our original boolean into
1423         a HashSet and a boolean. The HashSet holds up the CellStruct that are overflowing
1424         until we reach the memory threshold. After this is hit, we just set the boolean
1425         to avoid using too much memory.
1426
1427         (WebCore::RenderTableSection::hasOverflowingCell): This is the new way to determine
1428         if we have any overflowing cell, used only for hit testing.
1429
1430 2011-08-18  Kentaro Hara  <haraken@google.com>
1431
1432         An EventSource constructor should throw TypeError, when the number of arguments is not enough.
1433         https://bugs.webkit.org/show_bug.cgi?id=66454
1434
1435         Reviewed by Adam Barth.
1436
1437         The spec is here: http://www.w3.org/TR/WebIDL/#es-operations.
1438
1439         Test: fast/eventsource/eventsource-constructor.html
1440
1441         * bindings/js/JSEventSourceCustom.cpp:
1442         (WebCore::JSEventSourceConstructor::constructJSEventSource): Changed SyntaxError to TypeError.
1443         * bindings/v8/custom/V8EventSourceConstructor.cpp:
1444         (WebCore::V8EventSource::constructorCallback): Changed SyntaxError to TypeError.
1445
1446 2011-08-18  Kentaro Hara  <haraken@google.com>
1447
1448         A SharedWorker constructor should throw TypeError, when the number of arguments is not enough.
1449         https://bugs.webkit.org/show_bug.cgi?id=66455
1450
1451         Reviewed by Adam Barth.
1452
1453         The spec is here: http://www.w3.org/TR/WebIDL/#es-operations.
1454
1455         Test: fast/workers/shared-worker-constructor.html
1456
1457         * bindings/js/JSSharedWorkerCustom.cpp:
1458         (WebCore::JSSharedWorkerConstructor::constructJSSharedWorker): Changed SyntaxError to TypeError.
1459         * bindings/v8/custom/V8SharedWorkerCustom.cpp:
1460         (WebCore::V8SharedWorker::constructorCallback): Changed SyntaxError to TypeError.
1461
1462 2011-08-17  Alejandro G. Castro  <alex@igalia.com>
1463
1464         [GTK] Fix compilation problems with deprecations in gtk+
1465         https://bugs.webkit.org/show_bug.cgi?id=66073
1466
1467         Reviewed by Martin Robinson.
1468
1469         * platform/gtk/GtkAuthenticationDialog.cpp:
1470         (WebCore::GtkAuthenticationDialog::GtkAuthenticationDialog): Added
1471         gtk_box_new conditional compilation for gtk+-3.
1472         * platform/gtk/RenderThemeGtk3.cpp:
1473         (WebCore::RenderThemeGtk::adjustRepaintRect):
1474         (WebCore::RenderThemeGtk::paintSliderTrack):
1475         (WebCore::RenderThemeGtk::paintSliderThumb):
1476         (WebCore::RenderThemeGtk::adjustSliderThumbSize): Now we have have
1477         GTK_TYPE_SCALE in gtk+3.
1478
1479 2011-08-18  Kentaro Hara  <haraken@google.com>
1480
1481         A Worker constructor should throw TypeError, when the number of arguments is not enough
1482         https://bugs.webkit.org/show_bug.cgi?id=66456
1483
1484         Reviewed by Adam Barth.
1485
1486         Spec is here: http://www.w3.org/TR/WebIDL/#es-operations.
1487
1488         Test: fast/workers/worker-constructor.html
1489
1490         * bindings/js/JSWorkerCustom.cpp:
1491         (WebCore::JSWorkerConstructor::constructJSWorker): Changed SyntaxError to TypeError.
1492         * bindings/v8/custom/V8WorkerCustom.cpp:
1493         (WebCore::V8Worker::constructorCallback): Changed SyntaxError to TypeError.
1494
1495 2011-08-18  John Bates  <jbates@google.com>
1496
1497         Fix logic error causing reverse of desired WebGL rate limiting behavior
1498         https://bugs.webkit.org/show_bug.cgi?id=66445
1499
1500         Reviewed by Kenneth Russell.
1501
1502         * platform/graphics/chromium/WebGLLayerChromium.cpp:
1503         (WebCore::WebGLLayerChromium::setTextureUpdated):
1504
1505 2011-08-18  Levi Weintraub  <leviw@chromium.org>
1506
1507         Switch RenderTextControl* to new layout types
1508         https://bugs.webkit.org/show_bug.cgi?id=66250
1509
1510         Reviewed by Eric Seidel.
1511
1512         Convertikng the RenderTextControl* classes to use the LayoutUnit abstraction.
1513
1514         No new tests as no change in behavior.
1515
1516         * rendering/LayoutTypes.h:
1517         (WebCore::layoutMod): Added a function to perform the modulo operation on LayoutUnits.
1518         * rendering/RenderTextControl.cpp:
1519         (WebCore::RenderTextControl::hitInnerTextElement):
1520         * rendering/RenderTextControl.h:
1521         * rendering/RenderTextControlMultiLine.cpp:
1522         (WebCore::RenderTextControlMultiLine::preferredContentWidth):
1523         (WebCore::RenderTextControlMultiLine::baselinePosition):
1524         * rendering/RenderTextControlMultiLine.h:
1525         * rendering/RenderTextControlSingleLine.cpp:
1526         (WebCore::RenderTextControlSingleLine::layout):
1527         (WebCore::RenderTextControlSingleLine::controlClipRect):
1528         (WebCore::RenderTextControlSingleLine::preferredContentWidth):
1529         (WebCore::RenderTextControlSingleLine::scrollWidth):
1530         (WebCore::RenderTextControlSingleLine::scrollHeight):
1531         (WebCore::RenderTextControlSingleLine::scrollLeft):
1532         (WebCore::RenderTextControlSingleLine::scrollTop):
1533         (WebCore::RenderTextControlSingleLine::setScrollLeft):
1534         (WebCore::RenderTextControlSingleLine::setScrollTop):
1535         * rendering/RenderTextControlSingleLine.h:
1536
1537 2011-08-18  Levi Weintraub  <leviw@chromium.org>
1538
1539         Switch Inline rendering classes to new layout types
1540         https://bugs.webkit.org/show_bug.cgi?id=66239
1541
1542         Reviewed by Eric Seidel.
1543
1544         Converting inline rendering classes to use the LayoutUnit abstraction from ints.
1545
1546         No new tests as no change in functionality.
1547
1548         * rendering/InlineBox.h:
1549         (WebCore::InlineBox::logicalFrameRect):
1550         (WebCore::InlineBox::baselinePosition):
1551         (WebCore::InlineBox::lineHeight):
1552         * rendering/InlineFlowBox.h:
1553         * rendering/InlineTextBox.cpp:
1554         (WebCore::InlineTextBox::logicalOverflowRect):
1555         (WebCore::InlineTextBox::setLogicalOverflowRect):
1556         (WebCore::InlineTextBox::baselinePosition):
1557         (WebCore::InlineTextBox::lineHeight):
1558         * rendering/InlineTextBox.h:
1559         (WebCore::InlineTextBox::logicalTopVisualOverflow):
1560         (WebCore::InlineTextBox::logicalBottomVisualOverflow):
1561         (WebCore::InlineTextBox::logicalLeftVisualOverflow):
1562         (WebCore::InlineTextBox::logicalRightVisualOverflow):
1563         * rendering/RenderInline.cpp:
1564         (WebCore::RenderInline::culledInlineAbsoluteRects):
1565         (WebCore::computeMargin):
1566         (WebCore::RenderInline::culledInlineBoundingBox):
1567         (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
1568         (WebCore::RenderInline::linesVisualOverflowBoundingBox):
1569         (WebCore::RenderInline::clippedOverflowRectForRepaint):
1570         (WebCore::RenderInline::rectWithOutlineForRepaint):
1571         (WebCore::RenderInline::computeRectForRepaint):
1572         (WebCore::RenderInline::mapLocalToContainer):
1573         (WebCore::RenderInline::lineHeight):
1574         (WebCore::RenderInline::baselinePosition):
1575         (WebCore::RenderInline::addDashboardRegions):
1576         * rendering/RenderInline.h:
1577
1578 2011-08-18  Jeffrey Pfau  <jpfau@apple.com>
1579
1580         New XML parser: add doctype to DOM tree
1581         https://bugs.webkit.org/show_bug.cgi?id=66408
1582
1583         Reviewed by Adam Barth.
1584
1585         * xml/parser/XMLTreeBuilder.cpp:
1586         (WebCore::XMLTreeBuilder::processDOCTYPE):
1587
1588 2011-08-18  James Robinson  <jamesr@chromium.org>
1589
1590         [chromium] Draw the root/"non-composited content" in compositor side
1591         https://bugs.webkit.org/show_bug.cgi?id=58834
1592
1593         Reviewed by Darin Fisher.
1594
1595         Handle the root or non-composited content with a GraphicsLayer rather than special case logic in
1596         LayerRendererChromium. This layer's client is the NonCompositedContentHost, which routes the paint callbacks
1597         through the LayerPainterChromium interface out to the WebView.  The root layer is special in two ways:
1598         *) The root layer has a scroll offset, which changes how the visibleLayerRect maps to content space and applies a
1599             draw-time transform.
1600         *) The root layer masks the alpha channel when drawing because of concerns about subpixel AA trashing the alpha
1601             channel.  The root layer is always opaque so this is fine.
1602         *) The root layer does not have border texels and does have subpixel AA for text.
1603
1604         Covered by compositing/
1605
1606         * WebCore.gypi:
1607         * platform/graphics/chromium/ContentLayerChromium.cpp:
1608         (WebCore::ContentLayerChromium::paintContentsIfDirty):
1609         * platform/graphics/chromium/ImageLayerChromium.cpp:
1610         (WebCore::ImageLayerChromium::paintContentsIfDirty):
1611         * platform/graphics/chromium/LayerChromium.cpp:
1612         (WebCore::LayerChromium::pushPropertiesTo):
1613         * platform/graphics/chromium/LayerChromium.h:
1614         (WebCore::LayerChromium::scrollPosition):
1615         (WebCore::LayerChromium::setScrollPosition):
1616         * platform/graphics/chromium/LayerRendererChromium.cpp:
1617         (WebCore::LayerRendererChromium::initialize):
1618         (WebCore::LayerRendererChromium::releaseTextures):
1619         (WebCore::LayerRendererChromium::viewportChanged):
1620         (WebCore::LayerRendererChromium::updateLayers):
1621         (WebCore::LayerRendererChromium::drawLayers):
1622         (WebCore::LayerRendererChromium::drawLayersInternal):
1623         (WebCore::LayerRendererChromium::getFramebufferPixels):
1624         (WebCore::LayerRendererChromium::cleanupSharedObjects):
1625         (WebCore::LayerRendererChromium::layerTreeAsText):
1626         * platform/graphics/chromium/LayerRendererChromium.h:
1627         (WebCore::LayerRendererChromium::rootLayer):
1628         (WebCore::LayerRendererChromium::viewportSize):
1629         (WebCore::LayerRendererChromium::viewportWidth):
1630         (WebCore::LayerRendererChromium::viewportHeight):
1631         * platform/graphics/chromium/NonCompositedContentHost.cpp: Added.
1632         (WebCore::NonCompositedContentHost::NonCompositedContentHost):
1633         (WebCore::NonCompositedContentHost::~NonCompositedContentHost):
1634         (WebCore::NonCompositedContentHost::invalidateRect):
1635         (WebCore::NonCompositedContentHost::invalidateEntireLayer):
1636         (WebCore::NonCompositedContentHost::setScrollPosition):
1637         (WebCore::NonCompositedContentHost::notifyAnimationStarted):
1638         (WebCore::NonCompositedContentHost::notifySyncRequired):
1639         (WebCore::NonCompositedContentHost::paintContents):
1640         (WebCore::NonCompositedContentHost::showDebugBorders):
1641         (WebCore::NonCompositedContentHost::showRepaintCounter):
1642         * platform/graphics/chromium/NonCompositedContentHost.h: Added.
1643         (WebCore::NonCompositedContentHost::create):
1644         (WebCore::NonCompositedContentHost::graphicsLayer):
1645         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
1646         (WebCore::CCHeadsUpDisplay::draw):
1647         * platform/graphics/chromium/cc/CCLayerImpl.h:
1648         (WebCore::CCLayerImpl::scrollPosition):
1649         (WebCore::CCLayerImpl::setScrollPosition):
1650         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1651         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
1652         (WebCore::CCLayerTreeHost::initialize):
1653         (WebCore::CCLayerTreeHost::invalidateRootLayerRect):
1654         (WebCore::CCLayerTreeHost::setRootLayer):
1655         (WebCore::CCLayerTreeHost::setViewport):
1656         (WebCore::CCLayerTreeHost::reallocateRenderer):
1657         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1658         (WebCore::CCLayerTreeHost::rootLayer):
1659         (WebCore::CCLayerTreeHost::viewportSize):
1660
1661 2011-08-18  Nico Weber  <thakis@chromium.org>
1662
1663         Fix "missing return" gcc warning in ScrollAnimatorNone
1664         https://bugs.webkit.org/show_bug.cgi?id=66480
1665
1666         Reviewed by Tony Chang.
1667
1668         * platform/ScrollAnimatorNone.cpp:
1669         (WebCore::ScrollAnimatorNone::PerAxisData::curveAt):
1670         (WebCore::ScrollAnimatorNone::PerAxisData::curveDerivativeAt):
1671
1672 2011-08-18  James Simonsen  <simonjam@chromium.org>
1673
1674         Revalidate expired resources if they're requested after the initial document load
1675         https://bugs.webkit.org/show_bug.cgi?id=52153
1676
1677         Reviewed by Antti Koivisto.
1678
1679         Test: http/tests/cache/subresource-multiple-instances.html
1680
1681         * loader/cache/CachedResourceLoader.cpp:
1682         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
1683
1684 2011-08-18  Anders Carlsson  <andersca@apple.com>
1685
1686         Fix clang libc++ C++0x build
1687         https://bugs.webkit.org/show_bug.cgi?id=66475
1688
1689         Reviewed by Adam Roben.
1690
1691         Remove calls to isnan and isfinite with integer arguments.
1692
1693         * css/CSSPrimitiveValue.cpp:
1694         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1695         * html/canvas/WebGLRenderingContext.cpp:
1696         (WebCore::WebGLRenderingContext::viewport):
1697
1698 2011-08-18  Andrey Kosyakov  <caseq@chromium.org>
1699
1700         Web Inspector: [Extensions API] rename webInspector.resources to webInspector.network
1701         https://bugs.webkit.org/show_bug.cgi?id=66460
1702
1703         Reviewed by Pavel Feldman.
1704
1705         Tests: http/tests/inspector/extensions-network-redirect.html
1706                inspector/extensions/extensions-network.html
1707
1708         * inspector/front-end/ExtensionAPI.js:
1709         (WebInspector.injectedExtensionAPI.InspectorExtensionAPI):
1710         (WebInspector.injectedExtensionAPI.Network.requestDispatch):
1711         (WebInspector.injectedExtensionAPI):
1712         (WebInspector.injectedExtensionAPI.Network.prototype.getHAR):
1713         (WebInspector.injectedExtensionAPI.defineDeprecatedProperty.getter):
1714         (WebInspector.injectedExtensionAPI.defineDeprecatedProperty):
1715         * inspector/front-end/ExtensionServer.js:
1716         (WebInspector.ExtensionServer):
1717         (WebInspector.ExtensionServer.prototype._inspectedURLChanged):
1718         (WebInspector.ExtensionServer.prototype._notifyRequestFinished):
1719         (WebInspector.ExtensionServer.prototype._onGetHAR):
1720         (WebInspector.ExtensionServer.prototype._onGetResourceContent):
1721         (WebInspector.ExtensionServer.prototype._requestId):
1722         (WebInspector.ExtensionServer.prototype._requestById):
1723         (WebInspector.ExtensionServer.prototype._onAddAuditCategory):
1724         (WebInspector.ExtensionServer.prototype._onAddAuditResult):
1725         (WebInspector.ExtensionServer.prototype._onStopAuditCategoryRun):
1726         (WebInspector.ExtensionServer.prototype.initExtensions):
1727         (WebInspector.ExtensionServer.prototype._onmessage):
1728
1729 2011-08-18  Pavel Podivilov  <podivilov@chromium.org>
1730
1731         Web Inspector: extract content loading functions from RawSourceCode to ContentProvider implementations.
1732         https://bugs.webkit.org/show_bug.cgi?id=66237
1733
1734         Reviewed by Pavel Feldman.
1735
1736         Test: inspector/debugger/content-providers.html
1737
1738         * inspector/front-end/SourceFile.js:
1739         (WebInspector.RawSourceCode.prototype._loadResourceContent):
1740         (WebInspector.RawSourceCode.prototype._loadScriptContent):
1741         (WebInspector.RawSourceCode.prototype._loadAndConcatenateScriptsContent):
1742         (WebInspector.ScriptContentProvider):
1743         (WebInspector.ScriptContentProvider.prototype.requestContent):
1744         (WebInspector.ConcatenatedScriptsContentProvider):
1745         (WebInspector.ConcatenatedScriptsContentProvider.prototype.requestContent):
1746         (WebInspector.ConcatenatedScriptsContentProvider.prototype._concatenateScriptsContent):
1747         (WebInspector.ResourceContentProvider):
1748         (WebInspector.ResourceContentProvider.prototype.requestContent):
1749
1750 2011-08-18  Alexandru Chiculita  <achicu@adobe.com>
1751
1752         [CSSRegions] RenderRegion should not reference a parent RenderFlowThread
1753         https://bugs.webkit.org/show_bug.cgi?id=66142
1754
1755         Added code that checks the parent RenderFlowThread of a RenderRegion and creates
1756         a dependency for its referenced RenderFlowThread (from CSS style).
1757
1758         There are two cases:
1759         1. A RenderRegion tries to display the flow thread that laid it out. In this case
1760         the region will be ignored and will not participate in the flow threads regions list.
1761         2. A RenderRegion tries to display a flow thread that contains another region that
1762         tries to display the first region's flow thread. This one can be generalized with any
1763         number of intermediate flow threads. In this case the recursion is detected and only the
1764         first added region will actually be selected. The other region will be ignored. However,
1765         when the recursion is removed the invalid regions will be recovered.
1766
1767         Reviewed by David Hyatt.
1768
1769         Tests: fast/regions/flows-dependency-dynamic-remove.html
1770                fast/regions/flows-dependency-same-flow.html
1771
1772         * rendering/RenderBlock.cpp:
1773         (WebCore::RenderBlock::insertPositionedObject):
1774         * rendering/RenderFlowThread.cpp:
1775         (WebCore::RenderFlowThread::dependsOn):
1776         (WebCore::RenderFlowThread::addRegionToThread):
1777         (WebCore::RenderFlowThread::removeRegionFromThread):
1778         (WebCore::RenderFlowThread::checkInvalidRegions):
1779         (WebCore::RenderFlowThread::addDependencyOnFlowThread):
1780         (WebCore::RenderFlowThread::removeDependencyOnFlowThread):
1781         (WebCore::RenderFlowThread::pushDependencies):
1782         (WebCore::RenderFlowThread::layout):
1783         (WebCore::RenderFlowThread::computeLogicalWidth):
1784         (WebCore::RenderFlowThread::computeLogicalHeight):
1785         (WebCore::RenderFlowThread::repaintRectangleInRegions):
1786         * rendering/RenderFlowThread.h:
1787         * rendering/RenderObjectChildList.cpp:
1788         (WebCore::RenderObjectChildList::removeChildNode):
1789         (WebCore::RenderObjectChildList::appendChildNode):
1790         * rendering/RenderRegion.cpp:
1791         (WebCore::RenderRegion::RenderRegion):
1792         (WebCore::RenderRegion::~RenderRegion):
1793         (WebCore::RenderRegion::paintReplaced):
1794         (WebCore::RenderRegion::nodeAtPoint):
1795         (WebCore::RenderRegion::attachRegion):
1796         (WebCore::RenderRegion::detachRegion):
1797         * rendering/RenderRegion.h:
1798         (WebCore::RenderRegion::parentFlowThread):
1799         (WebCore::RenderRegion::isValid):
1800         (WebCore::RenderRegion::setIsValid):
1801         * rendering/RenderTreeAsText.cpp:
1802         (WebCore::writeRenderFlowThreads):
1803         (WebCore::writeLayers):
1804         * rendering/RenderView.cpp:
1805         (WebCore::RenderView::RenderView):
1806         (WebCore::RenderView::layout):
1807         (WebCore::RenderView::renderFlowThreadWithName):
1808         (WebCore::RenderView::layoutRenderFlowThreads):
1809         * rendering/RenderView.h:
1810         (WebCore::RenderView::hasRenderFlowThreads):
1811         (WebCore::RenderView::isRenderFlowThreadOrderDirty):
1812         (WebCore::RenderView::setIsRenderFlowThreadOrderDirty):
1813         (WebCore::RenderView::renderFlowThreadList):
1814
1815 2011-08-18  Pavel Podivilov  <podivilov@chromium.org>
1816
1817         Web Inspector: add UISourceCode class.
1818         https://bugs.webkit.org/show_bug.cgi?id=66233
1819
1820         This is a next step towards splitting SourceFile into RawSourceCode and UISourceCode.
1821         UISourceCode is a part of SourceFile's interface that is visible to ScriptsPanel.
1822         UISourceCode represents a single entry in scripts panel's files select.
1823
1824         Reviewed by Pavel Feldman.
1825
1826         Test: inspector/debugger/ui-source-code.html
1827
1828         * WebCore.gypi:
1829         * WebCore.vcproj/WebCore.vcproj:
1830         * inspector/front-end/UISourceCode.js: Added.
1831         (WebInspector.UISourceCode):
1832         (WebInspector.UISourceCode.prototype.get id):
1833         (WebInspector.UISourceCode.prototype.get url):
1834         (WebInspector.UISourceCode.prototype.get isContentScript):
1835         (WebInspector.UISourceCode.prototype.requestContent):
1836         (WebInspector.UISourceCode.prototype._didRequestContent):
1837         (WebInspector.ContentProvider):
1838         (WebInspector.ContentProvider.prototype.requestContent):
1839         * inspector/front-end/WebKit.qrc:
1840         * inspector/front-end/inspector.html:
1841
1842 2011-08-17  Adam Roben  <aroben@apple.com>
1843
1844         Make WebCore keep track of the current device scale factor
1845
1846         Fixes <http://webkit.org/b/66413> WebCore requires every WebKit port to keep track of the
1847         device scale factor
1848
1849         Reviewed by Darin Adler.
1850
1851         * WebCore.exp.in: Removed Frame::deviceScaleFactorChanged, added Page::setDeviceScaleFactor.
1852
1853         * css/MediaQueryEvaluator.cpp:
1854         (WebCore::device_pixel_ratioMediaFeatureEval):
1855         * html/HTMLCanvasElement.cpp:
1856         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
1857         * page/DOMWindow.cpp:
1858         (WebCore::DOMWindow::devicePixelRatio):
1859         * rendering/RenderInline.cpp:
1860         (WebCore::RenderInline::addDashboardRegions):
1861         * rendering/RenderLayerCompositor.cpp:
1862         (WebCore::RenderLayerCompositor::deviceScaleFactor):
1863         * rendering/RenderObject.cpp:
1864         (WebCore::RenderObject::addDashboardRegions):
1865         Changed to get the device scale factor from Page.
1866
1867         * loader/EmptyClients.h:
1868         * page/Chrome.cpp:
1869         * page/Chrome.h:
1870         * page/ChromeClient.h:
1871         Removed Chrome[Client]::deviceScaleFactor.
1872
1873         * page/Frame.cpp:
1874         * page/Frame.h:
1875         Removed deviceScaleFactorChanged. Made deviceOrPageScaleFactorChanged public.
1876
1877         * page/Page.cpp:
1878         (WebCore::Page::Page): Initialize m_deviceScaleFactor.
1879         (WebCore::Page::setDeviceScaleFactor): Added. Code came from
1880         Frame::deviceScaleFactorChanged.
1881
1882         * page/Page.h: Added m_deviceScaleFactor.
1883         (WebCore::Page::deviceScaleFactor): Added simple getter.
1884
1885 2011-08-18  Darin Adler  <darin@apple.com>
1886
1887         SVG and HTML editing have conflicting inline isWhitespace functions
1888         https://bugs.webkit.org/show_bug.cgi?id=65145
1889
1890         Reviewed by Nikolas Zimmermann.
1891
1892         Renamed the SVG-specific whitespace functions to call it "SVG space"
1893         rather than just "whitespace". An alternative would have been to put
1894         the functions into an SVG namespace instead of the top level WebCore
1895         namespace.
1896
1897         * svg/SVGAnimateMotionElement.cpp:
1898         (WebCore::parsePoint): Call skipOptionalSVGSpaces.
1899         * svg/SVGAnimationElement.cpp:
1900         (WebCore::parseKeySplines): Ditto.
1901         * svg/SVGFitToViewBox.cpp:
1902         (WebCore::SVGFitToViewBox::parseViewBox): Ditto.
1903         * svg/SVGLengthList.cpp:
1904         (WebCore::SVGLengthList::parse): Call isSVGSpace and
1905         skipOptionalSVGSpacesOrDelimiter.
1906         * svg/SVGParserUtilities.cpp:
1907         (WebCore::genericParseNumber): Call skipOptionalSVGSpacesOrDelimiter.
1908         (WebCore::parseArcFlag): Ditto.
1909         (WebCore::parseRect): Call skipOptionalSVGSpaces.
1910         (WebCore::pointsListFromSVGData): Ditto.
1911         (WebCore::parseGlyphName): Call skipOptionalSVGSpaces, isSVGSpace,
1912         and skipOptionalSVGSpacesOrDelimiter.
1913         (WebCore::parseDelimitedString): Call skipOptionalSVGSpaces.
1914
1915         * svg/SVGParserUtilities.h:
1916         (WebCore::isSVGSpace): Renamed from isWhitespace. This better matches
1917         the comment which specifically talks about SVG.
1918         (WebCore::skipOptionalSVGSpaces): Renamed from skipOptionalSpaces.
1919         (WebCore::skipOptionalSVGSpacesOrDelimiter): Renamed from
1920         skipOptionalSVGSpacesOrDelimiter.
1921
1922         * svg/SVGPathStringSource.cpp:
1923         (WebCore::SVGPathStringSource::moveToNextToken): Call skipOptionalSVGSpaces.
1924         * svg/SVGPreserveAspectRatio.cpp:
1925         (WebCore::SVGPreserveAspectRatio::parsePreserveAspectRatio): Ditto.
1926         * svg/SVGStringList.cpp:
1927         (WebCore::SVGStringList::parse): Call isSVGSpace and
1928         skipOptionalSVGSpacesOrDelimiter.
1929         * svg/SVGTransformable.cpp:
1930         (WebCore::parseTransformParamList): Call skipOptionalSVGSpaces and
1931         skipOptionalSVGSpacesOrDelimiter.
1932         (WebCore::SVGTransformable::parseTransformAttribute): Call skipOptionalSVGSpaces.
1933
1934 2011-08-18  Gavin Peters  <gavinp@chromium.org>
1935
1936         Prepare frames for history navigation.
1937
1938         Before beginning an explicit history navigation in a newly initialized
1939         frame, it's important to give a "previous" item to avoid crashes, and
1940         give a state to the state machine to avoid extra validating loads.
1941
1942         https://bugs.webkit.org/show_bug.cgi?id=66322
1943
1944         Reviewed by Darin Fisher.
1945
1946         No new tests, as history navigation is very difficult to test in
1947         DumpRenderTree.
1948
1949         * loader/FrameLoader.cpp:
1950         (WebCore::FrameLoader::prepareForHistoryNavigation):
1951         * loader/FrameLoader.h:
1952
1953 2011-08-18  Jing Zhao  <jingzhao@chromium.org>
1954
1955         When changing the size of a menulist from x (x>1) to 1, the first item should be selected.
1956         https://bugs.webkit.org/show_bug.cgi?id=66282
1957
1958         Reviewed by Kent Tamura.
1959
1960         No new tests since it only changes the behavior in Android Browser.
1961
1962         * html/HTMLSelectElement.cpp:
1963         (WebCore::HTMLSelectElement::parseMappedAttribute):
1964
1965 2011-08-18  Adam Klein  <adamk@chromium.org>
1966
1967         Handle "form" attribute updates in parseMappedAttribute() instead of attributeChanged() to better match HTMLElement practices
1968         https://bugs.webkit.org/show_bug.cgi?id=66321
1969
1970         Reviewed by Darin Adler.
1971
1972         This is simply a cleanup change: there's no need that I can see for
1973         HTMLFormControlElement and HTMLObjectElement to override
1974         Element::attributeChanged since they can properly handle form
1975         attribute changes in parseMappedAttribute, which they also override.
1976
1977         Though no change in behavior, I've added test coverage of the moved
1978         code to an existing test (fast/forms/form-attribute.html) and added
1979         a new test.
1980
1981         Test: fast/forms/radio-remove-form-attr.html
1982
1983         * html/HTMLFormControlElement.cpp:
1984         (WebCore::HTMLFormControlElement::parseMappedAttribute):
1985         * html/HTMLFormControlElement.h:
1986         * html/HTMLObjectElement.cpp:
1987         (WebCore::HTMLObjectElement::parseMappedAttribute):
1988         * html/HTMLObjectElement.h:
1989
1990 2011-08-18  Chang Shu  <cshu@webkit.org>
1991
1992         Add support of setPasswordEchoEnabled and setPasswordEchoDuration for password echo feature
1993         https://bugs.webkit.org/show_bug.cgi?id=66052
1994
1995         Reviewed by Alexey Proskuryakov.
1996
1997         Added runtime settings in WebCore.
1998         Added support in window.internals for testing.
1999
2000         Tests: editing/input/password-echo-passnode.html
2001                editing/input/password-echo-passnode2.html
2002                editing/input/password-echo-passnode3.html
2003                editing/input/password-echo-textnode.html
2004
2005         * page/Settings.cpp:
2006         (WebCore::Settings::Settings):
2007         * page/Settings.h:
2008         (WebCore::Settings::setPasswordEchoEnabled):
2009         (WebCore::Settings::passwordEchoEnabled):
2010         (WebCore::Settings::setPasswordEchoDurationInSeconds):
2011         (WebCore::Settings::passwordEchoDurationInSeconds):
2012         * testing/Internals.cpp:
2013         (WebCore::Internals::Internals):
2014         (WebCore::Internals::setPasswordEchoEnabled):
2015         (WebCore::Internals::setPasswordEchoDurationInSeconds):
2016         (WebCore::Internals::reset):
2017         * testing/Internals.h:
2018         * testing/Internals.idl:
2019
2020 2011-08-18  Wyatt Carss  <wcarss@chromium.org>
2021
2022         Selecting all and inserting text into a page with a frameset leads to a NULL ptr
2023         https://bugs.webkit.org/show_bug.cgi?id=66288
2024
2025         Reviewed by Tony Chang.
2026
2027         VisibleSelection returns a NoSelection to InsertTextCommand::doApply as
2028         a new endingSelection, which isn't a sane state to be in. The code
2029         tries to get a position on a higher node for a better selection, but
2030         cannot go above the frameset (which exists in place of the body tag),
2031         which lacks a renderer, and therefore cannot have a non-NoSelection
2032         VisibleSelection.
2033
2034         Because this is a rare corner case, it seemed more reasonable to bail
2035         out in this circumstance than to change the way VisibleSelection
2036         canonicalization works. The new behavior is to delete the content, but
2037         insert nothing. I investigated the possibility of trying to move above
2038         or below the frameset in this particular case, but there still isn't a
2039         renderer, so it didn't prevent the crash.
2040
2041         Test: editing/inserting/insert-text-into-empty-frameset-crash.html
2042
2043         * editing/InsertTextCommand.cpp:
2044         (WebCore::InsertTextCommand::doApply):
2045
2046 2011-08-18  Takashi Toyoshima  <toyoshim@chromium.org>
2047
2048         Remove arguments from CloseEvent::create().
2049         https://bugs.webkit.org/show_bug.cgi?id=66294
2050
2051         Reviewed by Kent Tamura.
2052
2053         CloseEvent objects are initialized by initCloseEvent() in all cases.
2054         Initialization in create() is redundant.
2055
2056         No new tests for no functional difference.
2057
2058         * websockets/CloseEvent.h:
2059         (WebCore::CloseEvent::create):
2060         (WebCore::CloseEvent::CloseEvent):
2061         * websockets/WebSocket.cpp:
2062         (WebCore::WebSocket::didClose):
2063
2064 2011-08-18  Fady Samuel  <fsamuel@chromium.org>
2065
2066         iframe and frameset scaling is broken
2067         https://bugs.webkit.org/show_bug.cgi?id=57785
2068
2069         Reviewed by Simon Fraser.
2070
2071         Fixed two iframe and frameset scaling bugs:
2072           #1 iframes and frameset backgrounds and scroll areas are doubly scaled when they are styled with -webkit-transform.
2073           #2 frameset does not respect -webkit-transform-origin when scaled
2074
2075         Tests: fast/frames/frame-set-scaling-3d.html
2076                fast/frames/frame-set-scaling-centered.html
2077                fast/frames/frame-set-scaling-rotate.html
2078                fast/frames/frame-set-scaling-skew.html
2079                fast/frames/frame-set-scaling.html
2080                fast/frames/iframe-scaling-with-scroll.html
2081
2082         * rendering/RenderFrameSet.cpp:
2083         (WebCore::RenderFrameSet::layout):
2084         Update the FrameSet's layer transform after we've computed size to correctly account for the transform origin.
2085         * rendering/RenderLayer.cpp:
2086         (WebCore::RenderLayer::childrenClipRect):
2087         The dirty rect should be the document's unscaled size.
2088         * rendering/RenderWidget.cpp:
2089         (WebCore::RenderWidget::setWidget):
2090         (WebCore::RenderWidget::updateWidgetPosition):
2091         Don't scale the FrameView rect here. Scaling is done within the FrameView.
2092
2093 2011-08-18  Csaba Osztrogon√°c  <ossy@webkit.org>
2094
2095         Unreviewed buildfix after r93268.
2096
2097         * dom/Document.cpp:
2098         (WebCore::disableRangeMutation):
2099
2100 2011-08-17  Emil A Eklund  <eae@chromium.org>
2101
2102         Switch RenderBox to to new layout types
2103         https://bugs.webkit.org/show_bug.cgi?id=66156
2104
2105         Reviewed by Eric Seidel.
2106
2107         Convert RenderBox to new layout abstraction as a part of the ongoing
2108         conversion work.
2109
2110         No new tests as no new functionality.
2111
2112         * rendering/RenderBox.cpp:
2113         (WebCore::RenderBox::scrollWidth):
2114         (WebCore::RenderBox::scrollHeight):
2115         (WebCore::RenderBox::scrollLeft):
2116         (WebCore::RenderBox::scrollTop):
2117         (WebCore::RenderBox::setScrollLeft):
2118         (WebCore::RenderBox::setScrollTop):
2119         (WebCore::RenderBox::absoluteRects):
2120         (WebCore::RenderBox::absoluteContentBox):
2121         (WebCore::RenderBox::absoluteContentQuad):
2122         (WebCore::RenderBox::outlineBoundsForRepaint):
2123         (WebCore::RenderBox::reflectionBox):
2124         (WebCore::RenderBox::reflectedRect):
2125         (WebCore::RenderBox::verticalScrollbarWidth):
2126         (WebCore::RenderBox::horizontalScrollbarHeight):
2127         (WebCore::RenderBox::computeContentBoxLogicalWidth):
2128         (WebCore::RenderBox::computeContentBoxLogicalHeight):
2129         (WebCore::RenderBox::maskClipRect):
2130         (WebCore::RenderBox::repaintLayerRectsForImage):
2131         (WebCore::RenderBox::pushContentsClip):
2132         (WebCore::RenderBox::overflowClipRect):
2133         (WebCore::RenderBox::clipRect):
2134         (WebCore::RenderBox::containingBlockLogicalWidthForContent):
2135         (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
2136         (WebCore::RenderBox::positionLineBox):
2137         (WebCore::RenderBox::clippedOverflowRectForRepaint):
2138         (WebCore::RenderBox::computeRectForRepaint):
2139         (WebCore::RenderBox::computeLogicalWidth):
2140         (WebCore::RenderBox::computeInlineDirectionMargins):
2141         (WebCore::RenderBox::computeLogicalHeight):
2142         (WebCore::RenderBox::computeLogicalHeightUsing):
2143         (WebCore::RenderBox::computePercentageLogicalHeight):
2144         (WebCore::RenderBox::computeBlockDirectionMargins):
2145         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
2146         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
2147         (WebCore::computeInlineStaticDistance):
2148         (WebCore::RenderBox::computePositionedLogicalWidth):
2149         (WebCore::computeLogicalLeftPositionedOffset):
2150         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
2151         (WebCore::computeBlockStaticDistance):
2152         (WebCore::RenderBox::computePositionedLogicalHeight):
2153         (WebCore::computeLogicalTopPositionedOffset):
2154         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
2155         (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
2156         (WebCore::RenderBox::computePositionedLogicalHeightReplaced):
2157         (WebCore::RenderBox::localCaretRect):
2158         (WebCore::RenderBox::lineHeight):
2159         (WebCore::RenderBox::baselinePosition):
2160         (WebCore::RenderBox::logicalVisualOverflowRectForPropagation):
2161         (WebCore::RenderBox::visualOverflowRectForPropagation):
2162         (WebCore::RenderBox::logicalLayoutOverflowRectForPropagation):
2163         (WebCore::RenderBox::layoutOverflowRectForPropagation):
2164         (WebCore::RenderBox::locationOffsetIncludingFlipping):
2165         * rendering/RenderBox.h:
2166         (WebCore::RenderBox::borderFitAdjust):
2167         (WebCore::RenderBox::intrinsicSize):
2168         (WebCore::RenderBox::intrinsicLogicalWidth):
2169         (WebCore::RenderBox::intrinsicLogicalHeight):
2170         (WebCore::RenderBox::scrollbarLogicalHeight):
2171         (WebCore::RenderBox::controlClipRect):
2172         (WebCore::RenderBox::firstLineBoxBaseline):
2173         (WebCore::RenderBox::lastLineBoxBaseline):
2174
2175 2011-08-17  Annie Sullivan  <sullivan@chromium.org>
2176
2177         Reduce usages of String::createUninitialized
2178         https://bugs.webkit.org/show_bug.cgi?id=66399
2179
2180         Constructs Strings with StringBuilder instead of calling createUninitialized.
2181
2182         Reviewed by Adam Barth.
2183
2184         No new tests; no functional change.
2185
2186         * dom/StyleElement.cpp:
2187         (WebCore::StyleElement::process):
2188         * dom/Text.cpp:
2189         (WebCore::Text::wholeText):
2190         * html/parser/HTMLSourceTracker.cpp:
2191         (WebCore::HTMLSourceTracker::sourceForToken):
2192         * platform/graphics/Font.cpp:
2193         (WebCore::Font::normalizeSpaces):
2194         * platform/text/TextCodecUserDefined.cpp:
2195         (WebCore::TextCodecUserDefined::decode):
2196
2197 2011-08-17  Emil A Eklund  <eae@chromium.org>
2198
2199         Switch FrameView to to new layout types
2200         https://bugs.webkit.org/show_bug.cgi?id=66147
2201
2202         Reviewed by Eric Seidel.
2203
2204         Convert Frame & FrameView to new layout abstraction as a part of the
2205         ongoing conversion work.
2206
2207         No new tests, no new functionality.
2208
2209         * page/Frame.cpp:
2210         (WebCore::Frame::visiblePositionForPoint):
2211         (WebCore::Frame::documentAtPoint):
2212         (WebCore::Frame::rangeForPoint):
2213         (WebCore::Frame::setPageAndTextZoomFactors):
2214         (WebCore::Frame::scalePage):
2215         * page/Frame.h:
2216         * page/FrameView.cpp:
2217         (WebCore::FrameView::create):
2218         (WebCore::FrameView::reset):
2219         (WebCore::FrameView::init):
2220         (WebCore::FrameView::invalidateRect):
2221         (WebCore::FrameView::setFrameRect):
2222         (WebCore::FrameView::setMarginWidth):
2223         (WebCore::FrameView::setMarginHeight):
2224         (WebCore::FrameView::setContentsSize):
2225         (WebCore::FrameView::adjustViewSize):
2226         (WebCore::FrameView::scrollXForFixedPosition):
2227         (WebCore::FrameView::scrollYForFixedPosition):
2228         (WebCore::FrameView::scrollOffsetForFixedPosition):
2229         (WebCore::FrameView::currentMousePosition):
2230         (WebCore::FrameView::scrollContentsFastPath):
2231         (WebCore::FrameView::scrollContentsSlowPath):
2232         (WebCore::FrameView::setScrollPosition):
2233         (WebCore::FrameView::repaintContentRectangle):
2234         (WebCore::FrameView::scrollToAnchor):
2235         (WebCore::FrameView::performPostLayoutTasks):
2236         (WebCore::FrameView::windowClipRect):
2237         (WebCore::FrameView::windowClipRectForLayer):
2238         (WebCore::FrameView::scrollTo):
2239         (WebCore::FrameView::invalidateScrollbarRect):
2240         (WebCore::FrameView::getTickmarks):
2241         (WebCore::FrameView::windowResizerRect):
2242         (WebCore::FrameView::setVisibleScrollerThumbRect):
2243         (WebCore::FrameView::paintScrollCorner):
2244         (WebCore::FrameView::paintContents):
2245         (WebCore::FrameView::paintOverhangAreas):
2246         (WebCore::FrameView::forceLayoutForPagination):
2247         (WebCore::FrameView::convertFromRenderer):
2248         (WebCore::FrameView::convertToRenderer):
2249         (WebCore::FrameView::convertToContainingView):
2250         (WebCore::FrameView::convertFromContainingView):
2251         * page/FrameView.h:
2252         (WebCore::FrameView::marginWidth):
2253         (WebCore::FrameView::marginHeight):
2254         * page/mac/FrameMac.mm:
2255         (WebCore::Frame::snapshotDragImage):
2256         (WebCore::Frame::nodeImage):
2257
2258 2011-08-17  Emil A Eklund  <eae@chromium.org>
2259
2260         Switch html/* to to new layout types
2261         https://bugs.webkit.org/show_bug.cgi?id=66347
2262
2263         Reviewed by Eric Seidel.
2264
2265         Convert HTML* and shadow element to new layout abstraction as a part of
2266         the ongoing conversion work.
2267
2268         No new tests, no new functionality.
2269
2270         * html/HTMLAreaElement.cpp:
2271         (WebCore::HTMLAreaElement::invalidateCachedRegion):
2272         (WebCore::HTMLAreaElement::mapMouseEvent):
2273         (WebCore::HTMLAreaElement::computePath):
2274         (WebCore::HTMLAreaElement::computeRect):
2275         (WebCore::HTMLAreaElement::getRegion):
2276         * html/HTMLAreaElement.h:
2277         * html/HTMLCanvasElement.cpp:
2278         (WebCore::HTMLCanvasElement::paint):
2279         * html/HTMLCanvasElement.h:
2280         * html/HTMLMapElement.cpp:
2281         (WebCore::HTMLMapElement::mapMouseEvent):
2282         * html/HTMLMapElement.h:
2283         * html/ImageDocument.cpp:
2284         (WebCore::ImageDocumentParser::finish):
2285         (WebCore::ImageDocument::scale):
2286         (WebCore::ImageDocument::resizeImageToFit):
2287         (WebCore::ImageDocument::imageFitsInWindow):
2288         * html/ValidationMessage.cpp:
2289         (WebCore::adjustBubblePosition):
2290         * html/canvas/CanvasRenderingContext2D.cpp:
2291         (WebCore::size):
2292         (WebCore::CanvasRenderingContext2D::drawImage):
2293         * html/shadow/MediaControlElements.cpp:
2294         (WebCore::MediaControlPanelElement::startDrag):
2295         (WebCore::MediaControlPanelElement::continueDrag):
2296         (WebCore::MediaControlPanelElement::setPosition):
2297         (WebCore::MediaControlPanelElement::defaultEventHandler):
2298         * html/shadow/MediaControlElements.h:
2299         * html/shadow/SliderThumbElement.cpp:
2300         (WebCore::SliderThumbElement::dragFrom):
2301         (WebCore::SliderThumbElement::setPositionFromPoint):
2302         * html/shadow/SliderThumbElement.h:
2303         * rendering/RenderImage.cpp:
2304         (WebCore::RenderImage::nodeAtPoint):
2305
2306 2011-08-17  David Grogan  <dgrogan@chromium.org>
2307
2308         Change references to leveldb.gyp to leveldatabase.gyp as part of the
2309         leveldb refactoring going on in chromium: crbug.com/89378
2310         https://bugs.webkit.org/show_bug.cgi?id=66332
2311
2312         Reviewed by Tony Gentilcore.
2313
2314         Tests: new-run-webkit-tests --debug --chromium --no-retry-failures --build-directory=llvm storage/indexeddb
2315
2316         * WebCore.gyp/WebCore.gyp:
2317
2318 2011-08-17  Hayato Ito  <hayato@chromium.org>
2319
2320         Implement proper handling of focus/blur events in regard to shadow DOM boundaries.
2321         https://bugs.webkit.org/show_bug.cgi?id=61421
2322
2323         Reviewed by Dimitri Glazkov.
2324
2325         Introduces FocusEventDispatchMediator/BlurEventDispatchMediator so
2326         that focus/blue events are stopped at the lowest common shadow boundary.
2327
2328         * dom/Document.cpp:
2329         (WebCore::Document::setFocusedNode):
2330         * dom/Event.cpp:
2331         (WebCore::FocusEventDispatchMediator::create):
2332         (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator):
2333         (WebCore::FocusEventDispatchMediator::dispatchEvent):
2334         (WebCore::BlurEventDispatchMediator::create):
2335         (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator):
2336         (WebCore::BlurEventDispatchMediator::dispatchEvent):
2337         * dom/Event.h:
2338         * dom/Node.cpp:
2339         (WebCore::Node::dispatchFocusEvent):
2340         (WebCore::Node::dispatchBlurEvent):
2341         * dom/Node.h:
2342         * html/HTMLFormControlElement.cpp:
2343         (WebCore::HTMLFormControlElement::dispatchBlurEvent):
2344         * html/HTMLFormControlElement.h:
2345         * html/HTMLSelectElement.cpp:
2346         (WebCore::HTMLSelectElement::dispatchFocusEvent):
2347         (WebCore::HTMLSelectElement::dispatchBlurEvent):
2348         * html/HTMLSelectElement.h:
2349         * html/HTMLTextFormControlElement.cpp:
2350         (WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
2351         (WebCore::HTMLTextFormControlElement::dispatchBlurEvent):
2352         * html/HTMLTextFormControlElement.h:
2353         * page/FocusController.cpp:
2354         (WebCore::dispatchEventsOnWindowAndFocusedNode):
2355
2356 2011-08-17  Ben Wells  <benwells@chromium.org>
2357
2358         Canvas fill and fillRect with SourceIn, DestinationIn, SourceOut, DestinationAtop and Copy have errors
2359         https://bugs.webkit.org/show_bug.cgi?id=66036
2360
2361         These modes cannot be passed straight through to the underlying graphics context as the graphics context
2362         and the HTML5 canvas spec have different interpretations to them. In the graphics context, the compositing
2363         modes are applied just over the area being filled. In the HTML5 spec, the compositing modes are applied over
2364         the entire canvas.
2365
2366         The SourceIn, DestinationIn, SourceOut, DestinationAtop and Copy modes all need some kind of extra action
2367         to just performing the composited fill on the canvas, as they need t he canvas to be cleared outside of the 
2368         area being filled.
2369
2370         Previous to this change the Copy mode did not do this clearing at all. The other modes did but if the
2371         transformed path being filled contained anti-aliasing at its edges artifacts were introduced.
2372
2373         With this change, Copy now does a complete erase of the canvas before performing a fill as per normal.
2374         The other modes use a temporary buffer just big enough for the transformed path (in device coordinates).
2375         The fill is first done there in SourceOver mode. Then this is drawn into the canvas context using the
2376         appropriate mode, with any areas outside the draw area being cleared.
2377
2378         Reviewed by James Robinson.
2379
2380         Test: fast/canvas/canvas-composite-transformclip.html
2381
2382         * html/HTMLCanvasElement.h:
2383         * html/canvas/CanvasRenderingContext2D.cpp:
2384         (WebCore::CanvasRenderingContext2D::fill):
2385         (WebCore::CanvasRenderingContext2D::fillRect):
2386         (WebCore::CanvasRenderingContext2D::clearCanvas):
2387         (WebCore::CanvasRenderingContext2D::transformAreaToDevice):
2388         (WebCore::CanvasRenderingContext2D::fillAndDisplayTransparencyElsewhere):
2389         * html/canvas/CanvasRenderingContext2D.h:
2390         * platform/graphics/skia/ImageBufferSkia.cpp:
2391         (WebCore::ImageBuffer::ImageBuffer):
2392
2393 2011-08-17  Emil A Eklund  <eae@chromium.org>
2394
2395         Switch inspector to to new layout types
2396         https://bugs.webkit.org/show_bug.cgi?id=66358
2397
2398         Reviewed by Eric Seidel.
2399
2400         Convert inspector code to new layout abstraction as a part of the ongoing
2401         conversion work.
2402
2403         No new tests, no new functionality.
2404
2405         * inspector/DOMNodeHighlighter.cpp:
2406         (WebCore::DOMNodeHighlighter::drawNodeHighlight):
2407         * inspector/InspectorInstrumentation.cpp:
2408         (WebCore::InspectorInstrumentation::willPaintImpl):
2409         * inspector/InspectorInstrumentation.h:
2410         (WebCore::InspectorInstrumentation::willPaint):
2411         * inspector/InspectorTimelineAgent.cpp:
2412         (WebCore::InspectorTimelineAgent::willPaint):
2413         * inspector/InspectorTimelineAgent.h:
2414         * inspector/TimelineRecordFactory.cpp:
2415         (WebCore::TimelineRecordFactory::createPaintData):
2416         * inspector/TimelineRecordFactory.h:
2417
2418 2011-08-17  Levi Weintraub  <leviw@chromium.org>
2419
2420         Switch Editing code to new layout types
2421         https://bugs.webkit.org/show_bug.cgi?id=66355
2422
2423         Reviewed by Eric Seidel.
2424
2425         Converting remaining editing code to the LayoutUnit abstraction.
2426
2427         No new tests, no change in functionality.
2428
2429         * editing/Editor.cpp:
2430         (WebCore::Editor::rangeForPoint):
2431         (WebCore::Editor::insideVisibleArea):
2432         (WebCore::Editor::countMatchesForText):
2433         * editing/Editor.h:
2434         * editing/mac/FrameSelectionMac.mm:
2435         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
2436
2437 2011-08-17  Levi Weintraub  <leviw@chromium.org>
2438
2439         Switch Accessibility code to new layout types
2440         https://bugs.webkit.org/show_bug.cgi?id=66348
2441
2442         Reviewed by Eric Seidel.
2443
2444         Converting remaining Accessibility code to the LayoutUnit abstraction.
2445
2446         No new tests, no change in functionality
2447
2448         * accessibility/AccessibilityImageMapLink.cpp:
2449         (WebCore::AccessibilityImageMapLink::elementRect):
2450         * accessibility/AccessibilityImageMapLink.h:
2451         * accessibility/AccessibilityListBox.cpp:
2452         (WebCore::AccessibilityListBox::elementAccessibilityHitTest):
2453         * accessibility/AccessibilityListBox.h:
2454         * accessibility/AccessibilityListBoxOption.cpp:
2455         (WebCore::AccessibilityListBoxOption::elementRect):
2456         * accessibility/AccessibilityListBoxOption.h:
2457         * accessibility/AccessibilityMenuListOption.cpp:
2458         (WebCore::AccessibilityMenuListOption::elementRect):
2459         * accessibility/AccessibilityMenuListOption.h:
2460         (WebCore::AccessibilityMenuListOption::size):
2461         * accessibility/AccessibilityMenuListPopup.h:
2462         (WebCore::AccessibilityMenuListPopup::elementRect):
2463         (WebCore::AccessibilityMenuListPopup::size):
2464         * accessibility/AccessibilityObject.cpp:
2465         (WebCore::AccessibilityObject::clickPoint):
2466         (WebCore::AccessibilityObject::orientation):
2467         (WebCore::AccessibilityObject::elementAccessibilityHitTest):
2468         * accessibility/AccessibilityObject.h:
2469         (WebCore::AccessibilityObject::accessibilityHitTest):
2470         (WebCore::AccessibilityObject::boundingBoxRect):
2471         (WebCore::AccessibilityObject::size):
2472         (WebCore::AccessibilityObject::boundsForVisiblePositionRange):
2473         (WebCore::AccessibilityObject::doAXBoundsForRange):
2474         * accessibility/AccessibilityRenderObject.cpp:
2475         (WebCore::AccessibilityRenderObject::isOffScreen):
2476         (WebCore::AccessibilityRenderObject::boundingBoxRect):
2477         (WebCore::AccessibilityRenderObject::checkboxOrRadioRect):
2478         (WebCore::AccessibilityRenderObject::elementRect):
2479         (WebCore::AccessibilityRenderObject::size):
2480         (WebCore::AccessibilityRenderObject::clickPoint):
2481         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
2482         (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange):
2483         (WebCore::AccessibilityRenderObject::visiblePositionForPoint):
2484         (WebCore::AccessibilityRenderObject::doAXBoundsForRange):
2485         * accessibility/AccessibilityRenderObject.h:
2486         * accessibility/AccessibilityScrollView.cpp:
2487         (WebCore::AccessibilityScrollView::accessibilityHitTest):
2488         (WebCore::AccessibilityScrollView::elementRect):
2489         * accessibility/AccessibilityScrollView.h:
2490         * accessibility/AccessibilityScrollbar.cpp:
2491         (WebCore::AccessibilityScrollbar::elementRect):
2492         * accessibility/AccessibilityScrollbar.h:
2493         * accessibility/AccessibilitySlider.cpp:
2494         (WebCore::AccessibilitySliderThumb::elementRect):
2495         (WebCore::AccessibilitySliderThumb::size):
2496         * accessibility/AccessibilitySlider.h:
2497         * accessibility/AccessibilityTableColumn.cpp:
2498         (WebCore::AccessibilityTableColumn::elementRect):
2499         (WebCore::AccessibilityTableColumn::size):
2500         * accessibility/AccessibilityTableColumn.h:
2501         * accessibility/AccessibilityTableHeaderContainer.cpp:
2502         (WebCore::AccessibilityTableHeaderContainer::elementRect):
2503         (WebCore::AccessibilityTableHeaderContainer::size):
2504         * accessibility/AccessibilityTableHeaderContainer.h:
2505         * accessibility/mac/AccessibilityObjectWrapper.mm:
2506         (-[AccessibilityObjectWrapper position]):
2507         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
2508         (-[AccessibilityObjectWrapper accessibilityShowContextMenu]):
2509
2510 2011-08-17  Emil A Eklund  <eae@chromium.org>
2511
2512         Switch focus handling to to new layout types
2513         https://bugs.webkit.org/show_bug.cgi?id=66331
2514
2515         Reviewed by Eric Seidel.
2516
2517         Convert FocusController and SpatialNavigation to new layout abstraction
2518         as a part of the ongoing conversion work.
2519
2520         No new tests, no new functionality.
2521
2522         * page/FocusController.cpp:
2523         (WebCore::updateFocusCandidateIfNeeded):
2524         (WebCore::FocusController::findFocusCandidateInContainer):
2525         (WebCore::FocusController::advanceFocusDirectionallyInContainer):
2526         (WebCore::FocusController::advanceFocusDirectionally):
2527         * page/FocusController.h:
2528         * page/SpatialNavigation.cpp:
2529         (WebCore::alignmentForRects):
2530         (WebCore::start):
2531         (WebCore::middle):
2532         (WebCore::end):
2533         (WebCore::areRectsFullyAligned):
2534         (WebCore::areRectsPartiallyAligned):
2535         (WebCore::areRectsMoreThanFullScreenApart):
2536         (WebCore::below):
2537         (WebCore::rightOf):
2538         (WebCore::isRectInDirection):
2539         (WebCore::hasOffscreenRect):
2540         (WebCore::scrollInDirection):
2541         (WebCore::deflateIfOverlapped):
2542         (WebCore::canScrollInDirection):
2543         (WebCore::rectToAbsoluteCoordinates):
2544         (WebCore::nodeRectInAbsoluteCoordinates):
2545         (WebCore::frameRectInAbsoluteCoordinates):
2546         (WebCore::entryAndExitPointsForDirection):
2547         (WebCore::distanceDataForNode):
2548         (WebCore::canBeScrolledIntoView):
2549         (WebCore::virtualRectForDirection):
2550         (WebCore::virtualRectForAreaElementAndDirection):
2551         * page/SpatialNavigation.h:
2552
2553 2011-08-17  Levi Weintraub  <leviw@chromium.org>
2554
2555         Switch Document, DocumentMarker, Clipboard, and Range to new layout types
2556         https://bugs.webkit.org/show_bug.cgi?id=66330
2557
2558         Reviewed by Eric Seidel.
2559
2560         Converting the remaining DOM classes to use the LayoutUnit abstraction.
2561
2562         No new tests, no new behavior.
2563
2564         * dom/Clipboard.h:
2565         (WebCore::Clipboard::dragLocation):
2566         * dom/Document.cpp:
2567         (WebCore::Document::nodesFromRect):
2568         (WebCore::nodeFromPoint):
2569         (WebCore::Document::caretRangeFromPoint):
2570         (WebCore::Document::prepareMouseEvent):
2571         * dom/Document.h:
2572         * dom/DocumentMarkerController.cpp:
2573         (WebCore::DocumentMarkerController::markerContainingPoint):
2574         (WebCore::DocumentMarkerController::renderedRectsForMarkers):
2575         (WebCore::DocumentMarkerController::invalidateRenderedRectsForMarkersInRect):
2576         * dom/DocumentMarkerController.h:
2577         * dom/Range.cpp:
2578         (WebCore::adjustFloatQuadsForScrollAndAbsoluteZoomAndPageScale):
2579         * dom/RenderedDocumentMarker.h:
2580         (WebCore::RenderedDocumentMarker::contains):
2581         (WebCore::RenderedDocumentMarker::setRenderedRect):
2582         (WebCore::RenderedDocumentMarker::renderedRect):
2583         (WebCore::RenderedDocumentMarker::invalidMarkerRect):
2584         (WebCore::RenderedDocumentMarker::invalidate):
2585
2586 2011-08-17  Dan Bernstein  <mitz@apple.com>
2587
2588         Removed an unused setting.
2589
2590         Reviewed by Anders Carlsson.
2591
2592         * WebCore.exp.in:
2593         * page/Settings.cpp:
2594         (WebCore::Settings::Settings): Removed initializer for m_needsTigerMailQuirks.
2595         * page/Settings.h: Removed accessors.
2596
2597 2011-08-17  Oliver Hunt  <oliver@apple.com>
2598
2599         Move towards supporting user controlled prototypes on CanvasPixelArray
2600         https://bugs.webkit.org/show_bug.cgi?id=66429
2601
2602         Reviewed by Gavin Barraclough.
2603
2604         Start using a per-global object structure for canvas pixel array.
2605
2606         * bindings/js/JSImageDataCustom.cpp:
2607         (WebCore::toJS):
2608
2609 2011-08-17  Luke Macpherson   <macpherson@chromium.org>
2610
2611         Support cast from CSSPrimitiveValue to unsigned, and use in appropriate places in CSSStyleSelector::applyProperty
2612         https://bugs.webkit.org/show_bug.cgi?id=66281
2613
2614         Reviewed by Eric Seidel.
2615
2616         No new tests - refactoring only.
2617
2618         The return if type!=CSS_NUMBER case becomes an ASSERT because it is unreachable unless there is an error in the parser.
2619
2620         * css/CSSPrimitiveValueMappings.h:
2621         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2622         Support cast from unsigned to CSSPrimitiveValue
2623         (WebCore::CSSPrimitiveValue::operator unsigned):
2624         Support cast from CSSPrimitiveValue to unsigned
2625         * css/CSSStyleSelector.cpp:
2626         (WebCore::CSSStyleSelector::applyProperty):
2627         Use HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro for CSSPropertyWebkitBoxFlex,
2628         CSSPropertyWebkitBoxFlexGroup and CSSPropertyWebkitBoxOrdinalGroup properties.
2629
2630 2011-08-17  Scott Byer  <scottbyer@chromium.org>
2631
2632         ScrollAnimatorNone: Remove unused field
2633         https://bugs.webkit.org/show_bug.cgi?id=66312
2634
2635         Reviewed by Adam Barth.
2636
2637         No functional change; no test needed.
2638
2639         * platform/ScrollAnimatorNone.cpp:
2640         (WebCore::ScrollAnimatorNone::PerAxisData::updateDataFromParameters):
2641         (WebCore::ScrollAnimatorNone::scroll):
2642         * platform/ScrollAnimatorNone.h:
2643
2644 2011-08-17  Jeff Miller  <jeffm@apple.com>
2645
2646         Work-in-progress on Soft link against AVFoundationCF and CoreMedia
2647         https://bugs.webkit.org/show_bug.cgi?id=65725
2648         
2649         Don't bother with SOFT_LINK_LIBRARY(libdispatch), we're going to continue to statically link to it since
2650         the DLL will have already been loaded by other parts of AAS and is guaranteed to be available if AVFoundation
2651         is enabled.
2652
2653         Reviewed by Anders Carlsson.
2654
2655         No new tests; no functional change.
2656
2657         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Removed SOFT_LINK_DEBUG_LIBRARY(libdispatch) and SOFT_LINK_LIBRARY(libdispatch).
2658         (WebCore::MediaPlayerPrivateAVFoundationCF::isAvailable): Don't check for libdispatch.
2659
2660 2011-08-17  Brady Eidson  <beidson@apple.com>
2661
2662         https://bugs.webkit.org/show_bug.cgi?id=66354 and <rdar://problem/9965209>
2663         Regression:  On Lion, redirects lose HTTP authentication headers
2664
2665         Reviewed by Alexey Proskuryakov and Darin Adler.
2666
2667         This changes makes WebCore try to apply basic credentials after a redirect if the redirect is to the same origin,
2668         assuming the redirected URL did not contain credentials directly.
2669
2670         Tests: http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin.html
2671                http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin.html
2672                http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html
2673
2674         * platform/network/cf/ResourceHandleCFNet.cpp:
2675         (WebCore::applyBasicAuthorizationHeader): Apply the user/password from a credential to the HTTP headers for a request.
2676         (WebCore::ResourceHandle::createCFURLConnection): Use the applyBasicAuthorizationHeader helper.
2677         (WebCore::ResourceHandle::willSendRequest): If this is a redirect within the same origin, apply any stored target credentials to the new request.
2678
2679         * platform/network/mac/ResourceHandleMac.mm:
2680         (WebCore::applyBasicAuthorizationHeader): Apply the user/password from a credential to the HTTP headers for a request.
2681         (WebCore::ResourceHandle::createNSURLConnection): Use the applyBasicAuthorizationHeader helper.
2682         (WebCore::ResourceHandle::willSendRequest): If this is a redirect within the same origin, apply any stored target credentials to the new request.
2683
2684 2011-08-17  Chris Fleizach  <cfleizach@apple.com>
2685
2686         Accessibility stack exhaustion using role attribute
2687         https://bugs.webkit.org/show_bug.cgi?id=65174
2688
2689         Reviewed by Darin Adler.
2690
2691         Forgot to commit review comments.
2692
2693         * accessibility/AccessibilityRenderObject.cpp:
2694         (WebCore::AccessibilityRenderObject::remapAriaRoleDueToParent):
2695
2696 2011-08-17  Chris Fleizach  <cfleizach@apple.com>
2697
2698         Accessibility stack exhaustion using role attribute
2699         https://bugs.webkit.org/show_bug.cgi?id=65174
2700
2701         Make sure we do not call accessibilityIsIgnored() during the AccessibilityObject
2702         creation flow. That can lead to loops.
2703    
2704         Reviewed by Darin Adler.
2705
2706         Tests: accessibility/crash-determining-aria-role-when-label-present.html
2707
2708         * accessibility/AccessibilityObject.cpp:
2709         (WebCore::createARIARoleMap):
2710         * accessibility/AccessibilityRenderObject.cpp:
2711         (WebCore::AccessibilityRenderObject::remapAriaRoleDueToParent):
2712         (WebCore::AccessibilityRenderObject::determineAriaRoleAttribute):
2713         * accessibility/AccessibilityRenderObject.h:
2714
2715 2011-08-17  James Robinson  <jamesr@chromium.org>
2716
2717         [chromium] Crash if compositing is disabled during updateLayers()
2718         https://bugs.webkit.org/show_bug.cgi?id=66353
2719
2720         Reviewed by Kenneth Russell.
2721
2722         If compositing is turned off during LayerRendererChromium::updateLayers(), the rootLayer() will become null.
2723         Sicne CCLayerTreeHost::doComposite() calls updateLayers() and then drawLayers() without checking for this case,
2724         drawLayers() has to return without doing anything if the root layer is null.
2725
2726         Crash fixed based on crash reports.  No known reliably repro case, unfortunately.
2727
2728         * platform/graphics/chromium/LayerRendererChromium.cpp:
2729         (WebCore::LayerRendererChromium::drawLayers):
2730
2731 2011-08-17  Dan Bernstein  <mitz@apple.com>
2732
2733         <rdar://problem/9971293> Mid-word breaks can occur in the middle of a surrogate pair
2734         https://bugs.webkit.org/show_bug.cgi?id=66402
2735
2736         Reviewed by Dave Hyatt.
2737
2738         Test: fast/text/midword-break-before-surrogate-pair-2.html
2739
2740         * rendering/RenderBlockLineLayout.cpp:
2741         (WebCore::RenderBlock::LineBreaker::nextLineBreak): Just never allow a mid-word
2742         break before a trailing surrogate.
2743
2744 2011-08-16  Chang Shu  <cshu@webkit.org>
2745
2746         Support reset in WebCore::Internals
2747         https://bugs.webkit.org/show_bug.cgi?id=66307
2748
2749         Reviewed by Dimitri Glazkov.
2750
2751         New tests will be added when function reset is implemented.
2752
2753         Added framework code in WebCoreTestSupport. The real implementation of
2754         Internals::reset() depends on the need from the settings that require a reset.
2755
2756         * testing/Internals.cpp:
2757         (WebCore::Internals::reset):
2758         * testing/Internals.h:
2759         * testing/js/WebCoreTestSupport.cpp:
2760         (WebCoreTestSupport::resetInternalsObject):
2761         * testing/js/WebCoreTestSupport.h:
2762         * testing/v8/WebCoreTestSupport.cpp:
2763         (WebCoreTestSupport::resetInternalsObject):
2764         * testing/v8/WebCoreTestSupport.h:
2765
2766 2011-08-17  Tony Chang  <tony@chromium.org>
2767
2768         Fix chromium mac compile.  MediaPlayerPrivateAVFoundationObjC.* moved
2769         and the WebCore.gypi file wasn't updated.
2770
2771         * WebCore.gypi:
2772
2773 2011-08-17  Abhishek Arya  <inferno@chromium.org>
2774
2775         Crash in Document::recalcStyleSelector
2776         https://bugs.webkit.org/show_bug.cgi?id=66335
2777
2778         Reviewed by Simon Fraser.
2779
2780         When node is getting destroyed and its removedFromDocument
2781         is not called due to entire document structure torn down(using
2782         removeAllChildren), make sure to clear out the stylesheet
2783         candidate node from document's structures in its destructor.
2784
2785         Test: svg/dom/stylesheet-candidate-node-crash-main.html
2786
2787         * dom/ProcessingInstruction.cpp:
2788         (WebCore::ProcessingInstruction::~ProcessingInstruction):
2789         * html/HTMLLinkElement.cpp:
2790         (WebCore::HTMLLinkElement::~HTMLLinkElement):
2791         * html/HTMLStyleElement.cpp:
2792         (WebCore::HTMLStyleElement::~HTMLStyleElement):
2793         * svg/SVGStyleElement.cpp:
2794         (WebCore::SVGStyleElement::~SVGStyleElement):
2795
2796 2011-08-17  Sam White  <samuel.white@rochester.edu>
2797
2798         AccessibilityObject levels are inconsistent
2799         https://bugs.webkit.org/show_bug.cgi?id=66180
2800         
2801         Updated accessibilityTable to return level values consistent with other accessibilityObjects that
2802         return level values. This means a value of 0 is now only returned when tableLevel() is called on a
2803         non-table element.
2804
2805         Reviewed by Chris Fleizach.
2806
2807         Test: platform/mac/accessibility/element-level.html
2808
2809         * accessibility/AccessibilityTable.cpp:
2810         (WebCore::AccessibilityTable::tableLevel):
2811         * accessibility/mac/AccessibilityObjectWrapper.mm:
2812         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
2813
2814 2011-08-17  Ryosuke Niwa  <rniwa@webkit.org>
2815
2816         An arrow key collapses directionless selection range in the wrong direction in BiDi
2817         https://bugs.webkit.org/show_bug.cgi?id=64626
2818
2819         Reviewed by Darin Adler.
2820
2821         The bug was caused by willBeModified's always using block direction to determine
2822         the direction to which the selection is collapsed. Fixed the bug by calling directionOfSelection
2823         in willBeModified, which will return the text direction of the surrounding context when
2824         the start and the end have the same direction. When the text directions at the start and at the end
2825         of selection do not match, it uses the block's text direction.
2826
2827         Test: editing/selection/collapse-selection-in-bidi.html
2828
2829         * editing/FrameSelection.cpp:
2830         (WebCore::FrameSelection::directionOfSelection): Added.
2831         (WebCore::FrameSelection::willBeModified): Calls directionOfSelection.
2832         (WebCore::FrameSelection::modifyMovingRight): Ditto.
2833         (WebCore::FrameSelection::modifyMovingLeft): Ditto.
2834         * editing/FrameSelection.h:
2835
2836 2011-08-17  Jeff Miller  <jeffm@apple.com>
2837
2838         Some AVFoundation source files should be in platform-specific directories
2839         https://bugs.webkit.org/show_bug.cgi?id=66352
2840         
2841         Moved platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.* files to platform/graphics/avfoundation/cf,
2842         and moved platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.* files to platform/graphics/avfoundation/objc/.
2843         
2844         While I was at it, added svn:eol-style property to the MediaPlayerPrivateAVFoundationObjC.* files.
2845         
2846         Also, for some reason, Visual Studio decided to re-sort a couple files in \inspector\front-end\ in WebCore.vcproj, even though
2847         I just re-sorted the project in r93215.
2848
2849         Reviewed by Eric Carlson.
2850
2851         No new tests; no functional change.
2852
2853         * WebCore.vcproj/WebCore.vcproj: Moved platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.* files to platform/graphics/avfoundation/cf.
2854
2855         * WebCore.vcproj/WebCoreMediaQT.vsprops: Added $(ProjectDir)..\platform\graphics\avfoundation\cf to include paths.
2856
2857         * WebCore.xcodeproj/project.pbxproj: Moved platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.* files to platform/graphics/avfoundation/objc/.
2858
2859         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.cpp: Removed.
2860         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.h: Removed.
2861         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h: Removed.
2862         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm: Removed.
2863
2864         * platform/graphics/avfoundation/cf: Added.
2865         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Copied from Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.cpp.
2866         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: Copied from Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.h.
2867
2868         * platform/graphics/avfoundation/objc: Added.
2869         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: Copied from Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h.
2870         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: Copied from Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm.
2871
2872 2011-08-17  Luke Macpherson   <macpherson@chromium.org>
2873
2874         Only set m_fontDirty if TextSizeAdjust is actually changed.
2875         https://bugs.webkit.org/show_bug.cgi?id=66022
2876
2877         Reviewed by Darin Adler.
2878
2879         No new tests. Refactoring only.
2880
2881         Reduces instances where the font information is dirtied to save recalculation where it is not necessary.
2882
2883         * css/CSSStyleSelector.cpp:
2884         (WebCore::CSSStyleSelector::applyProperty):
2885         Call new setTextSizeAdjust function.
2886         * css/CSSStyleSelector.h:
2887         (WebCore::CSSStyleSelector::setTextSizeAdjust):
2888         Add wrapper for RenderStyle::setTextSizeAdjust() that automatically updates m_fontDirty.
2889         * rendering/style/RenderStyle.h:
2890         (WebCore::RenderStyle::setTextSizeAdjust):
2891         Make setTextSizeAdjust return true if the unlderlying value was changed.
2892
2893 2011-08-17  Kenichi Ishibashi  <bashi@chromium.org>
2894
2895         [Chromium] Crash in HarfbuzzFace::~HarfbuzzFace
2896         https://bugs.webkit.org/show_bug.cgi?id=66211
2897
2898         Holds Skia's unique font ID instead of FontPlatformData to avoid accessing freed FontPlatformData.
2899
2900         Reviewed by Tony Chang.
2901
2902         No new tests; no functional change.
2903
2904         * platform/graphics/chromium/HarfbuzzSkia.cpp:
2905         (WebCore::releaseCachedHarfbuzzFace): Changed the argument.
2906         (WebCore::HarfbuzzFace::HarfbuzzFace): Changed to have Skia's font uniqueID instead of FontPlatformData.
2907         (WebCore::HarfbuzzFace::~HarfbuzzFace): Uses m_uniqueID to call releaseCachedHarfbuzzFace.
2908         * platform/graphics/chromium/HarfbuzzSkia.h:
2909
2910 2011-08-17  Jeff Miller  <jeffm@apple.com>
2911
2912         Re-sort the WebCore project with Visual Studio after recent changes that I assume were done by manually editing the XML.
2913
2914         * WebCore.vcproj/WebCore.vcproj:
2915
2916 2011-08-17  Sailesh Agrawal  <sail@chromium.org>
2917
2918         Chromium Mac: Fix implementation of wkScrollbarMinimumTotalLengthNeededForThumb to match WebKitSystemInterface
2919         https://bugs.webkit.org/show_bug.cgi?id=66311
2920
2921         Reviewed by Dimitri Glazkov.
2922
2923         Updated wkScrollbarMinimumTotalLengthNeededForThumb() based on the latest disassembly of libWebKitSystemInterfaceLion.a.
2924
2925         * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm:
2926         (wkScrollbarMinimumTotalLengthNeededForThumb):
2927
2928 2011-08-17  Steve Block  <steveblock@google.com>
2929
2930         Unreviewed, rolling out r93186.
2931         http://trac.webkit.org/changeset/93186
2932         https://bugs.webkit.org/show_bug.cgi?id=66114
2933
2934         Breaks LayoutTests on Chromium canary bots
2935
2936         * platform/graphics/chromium/LayerChromium.h:
2937         * platform/graphics/chromium/LayerRendererChromium.cpp:
2938         (WebCore::LayerRendererChromium::updateLayers):
2939         (WebCore::LayerRendererChromium::drawLayersInternal):
2940         (WebCore::LayerRendererChromium::drawLayer):
2941         * platform/graphics/chromium/cc/CCLayerImpl.h:
2942
2943 2011-08-17  Ryosuke Niwa  <rniwa@webkit.org>
2944
2945         Get rid of calls to deprecatedNode and deprecatedEditingOffset in
2946         AccessibilityRenderObject.cpp and InsertTextCommand.cpp
2947         https://bugs.webkit.org/show_bug.cgi?id=66014
2948
2949         Reviewed by Hajime Morita.
2950
2951         Removed calls to deprecatedNode and deprecatedEditingOffsets in the following files.
2952
2953         * accessibility/AccessibilityRenderObject.cpp:
2954         (WebCore::AccessibilityRenderObject::indexForVisiblePosition): Calls Position::rootEditableElement
2955         and Range::setEnd(const Position&, ExceptionCode) instead of manually pulling deprecatedNode
2956         and deprecatedEditingOffset.
2957         (WebCore::AccessibilityRenderObject::index): Abstracted the logic to loop through render objects
2958         from deprecatedNodes' renderer to m_renderer as renderObjectContainsPosition.
2959         * dom/Position.h:
2960         (WebCore::Position::rootEditableElement): Added.
2961         * dom/Range.cpp:
2962         (WebCore::Range::setStart): Added.
2963         (WebCore::Range::setEnd): Added.
2964         * dom/Range.h:
2965         * editing/InsertTextCommand.cpp:
2966         (WebCore::InsertTextCommand::insertTab):
2967         * editing/RenderedPosition.cpp:
2968         (WebCore::renderObjectContainsPosition): Extracted from AccessibilityRenderObject::index.
2969         * editing/RenderedPosition.h:
2970
2971 2011-08-17  Sailesh Agrawal  <sail@chromium.org>
2972
2973         Chromium Mac: Fix issue where scrollbar wouldn't be drawn until page finished loading
2974         https://bugs.webkit.org/show_bug.cgi?id=66238
2975
2976         Reviewed by Dimitri Glazkov.
2977
2978         Overlay scrollbars were not visible if the user scrolled a page while the page was loading. The sequence of events necessary to reproduce this bug were:
2979           1. -[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:] is called
2980           2. animation is delayed because shouldSuspendScrollAnimations() is true
2981           3. ScrollAnimatorChromiumMac::scroll() is called before the ScrollAnimatorChromiumMac::m_initialScrollbarPaintTimer is fired.
2982           4. At this point the scrollbar painter assumes the scrollbar is already visible (because of 1.) so the scrollbar's alpha stays at 0. Thus the scrollbar isn't visible until the page finishes loading.
2983         It turns out that the root problem was that when the initialScrollbarPainterTimer fired I wasn't flashing the scrollbar correctly. My implementation of wkScrollbarPainterForceFlashScrollers() just called flashScrollers. The Safari implementation of this function also calls hideOverlayScrollers. Calling hideOverlayScrollers causes the alpha to change to 0 which prevents step 4 from happening.
2984
2985         Also, now that wkScrollbarPainterForceFlashScrollers is working correctly I don't need the extra logic I added to the initialScrollbarPainterTimer handler. That logic restarted the timer if shouldSuspendScrollAnimations() was true. But this isn't necessary since calling wkScrollbarPainterForceFlashScrollers() causes -[ScrollbarPainterDelegate setUpAnimation:...] to be called which does the exact same thing. Removing the extra logic reverts http://trac.webkit.org/changeset/92316.
2986
2987         * platform/chromium/ScrollAnimatorChromiumMac.mm:
2988         (WebCore::ScrollAnimatorChromiumMac::initialScrollbarPaintTimerFired):
2989         * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm:
2990         (wkScrollbarPainterForceFlashScrollers):
2991
2992 2011-08-16  Andrey Kosyakov  <caseq@chromium.org>
2993
2994         Web Inspector: maintain visible view hierarchy and dispatch common view events automatically
2995         https://bugs.webkit.org/show_bug.cgi?id=66131
2996
2997         Reviewed by Pavel Feldman.
2998
2999         Test: inspector/view-events.html
3000
3001         - added a notion of an optional parent to a View
3002         - maintain a list of View children
3003         - dispatch common view events, such as show/hide/resize automatically through the hierarchy of visible views.
3004         - promoted Panel's logic of (re)storing scroll positions to view
3005         - demoted inheritScrollPositionFromView to a couple of views that need it.
3006
3007         * inspector/front-end/ApplicationCacheItemsView.js:
3008         (WebInspector.ApplicationCacheItemsView.prototype.onResize):
3009         * inspector/front-end/ConsoleView.js:
3010         (WebInspector.ConsoleView.prototype.populateStatusBar):
3011         (WebInspector.ConsoleView.prototype.elementsToRestoreScrollPositionsFor):
3012         * inspector/front-end/CookieItemsView.js:
3013         (WebInspector.CookieItemsView.prototype.onResize):
3014         (WebInspector.SimpleCookiesTable.prototype.onResize):
3015         * inspector/front-end/DOMStorageItemsView.js:
3016         (WebInspector.DOMStorageItemsView.prototype.onResize):
3017         * inspector/front-end/DetailedHeapshotView.js:
3018         (WebInspector.DetailedHeapshotView.prototype.onResize):
3019         * inspector/front-end/Drawer.js:
3020         (WebInspector.Drawer.prototype.set visibleView):
3021         (WebInspector.Drawer.prototype.show):
3022         (WebInspector.Drawer.prototype.hide):
3023         (WebInspector.Drawer.prototype.onResize):
3024         (WebInspector.Drawer.prototype._animateDrawerHeight.animationFinished):
3025         (WebInspector.Drawer.prototype._animateDrawerHeight):
3026         (WebInspector.Drawer.prototype._statusBarDragging):
3027         (WebInspector.Drawer.prototype._endStatusBarDragging):
3028         * inspector/front-end/ElementsPanel.js:
3029         (WebInspector.ElementsPanel.prototype.onResize):
3030         * inspector/front-end/ExtensionPanel.js:
3031         * inspector/front-end/FontView.js:
3032         (WebInspector.FontView.prototype.onResize):
3033         * inspector/front-end/IFrameView.js:
3034         (WebInspector.IFrameView):
3035         * inspector/front-end/NetworkItemView.js:
3036         (WebInspector.NetworkItemView.prototype._installHighlightSupport):
3037         * inspector/front-end/NetworkPanel.js:
3038         (WebInspector.NetworkLogView):
3039         (WebInspector.NetworkLogView.prototype.elementsToRestoreScrollPositionsFor):
3040         (WebInspector.NetworkLogView.prototype.onResize):
3041         (WebInspector.NetworkLogView.prototype.wasShown):
3042         (WebInspector.NetworkLogView.prototype.willHide):
3043         (WebInspector.NetworkPanel):
3044         (WebInspector.NetworkPanel.prototype.show):
3045         (WebInspector.NetworkPanel.prototype._showResource):
3046         (WebInspector.NetworkPanel.prototype._closeVisibleResource):
3047         * inspector/front-end/Panel.js:
3048         (WebInspector.Panel.prototype.show):
3049         (WebInspector.Panel.prototype.hide):
3050         (WebInspector.Panel.prototype.performSearch.processChunk):
3051         (WebInspector.Panel.prototype.performSearch):
3052         (WebInspector.Panel.prototype.updateSidebarWidth):
3053         * inspector/front-end/PanelEnablerView.js:
3054         (WebInspector.PanelEnablerView.prototype.show):
3055         (WebInspector.PanelEnablerView.prototype.onResize):
3056         * inspector/front-end/ProfileView.js:
3057         (WebInspector.CPUProfileView.prototype.onResize):
3058         * inspector/front-end/ProfilesPanel.js:
3059         (WebInspector.ProfilesPanel.prototype.updateMainViewWidth):
3060         * inspector/front-end/ResourceCookiesView.js:
3061         (WebInspector.ResourceCookiesView.prototype.onResize):
3062         * inspector/front-end/ResourcePreviewView.js:
3063         (WebInspector.ResourcePreviewView.prototype.contentLoaded):
3064         * inspector/front-end/ResourceResponseView.js:
3065         (WebInspector.ResourceResponseView.prototype.contentLoaded):
3066         * inspector/front-end/ResourceTimingView.js:
3067         (WebInspector.ResourceTimingView.prototype.show):
3068         * inspector/front-end/ResourcesPanel.js:
3069         (WebInspector.ResourcesPanel.prototype.show):
3070         (WebInspector.ResourcesPanel.prototype._innerShowView):
3071         (WebInspector.ResourcesPanel.prototype.closeVisibleView):
3072         (WebInspector.ResourcesPanel.prototype.updateMainViewWidth):
3073         (WebInspector.FrameResourceTreeElement.prototype._recreateSourceView):
3074         * inspector/front-end/ScriptsPanel.js:
3075         (WebInspector.ScriptsPanel.prototype.show):
3076         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
3077         (WebInspector.ScriptsPanel.prototype._removeSourceFrame):
3078         (WebInspector.ScriptsPanel.prototype.setSidebarWidth):
3079         * inspector/front-end/SourceFrame.js:
3080         (WebInspector.SourceFrame):
3081         (WebInspector.SourceFrame.prototype.show):
3082         (WebInspector.SourceFrame.prototype.willHide):
3083         (WebInspector.SourceFrame.prototype.clearMessages):
3084         (WebInspector.SourceFrame.prototype._setTextViewerDecorations):
3085         (WebInspector.SourceFrame.prototype.inheritScrollPositions):
3086         * inspector/front-end/TabbedPane.js:
3087         (WebInspector.TabbedPane.prototype.appendTab):
3088         * inspector/front-end/TextViewer.js:
3089         (WebInspector.TextViewer.prototype.elementsToRestoreScrollPositionsFor):
3090         (WebInspector.TextViewer.prototype.inheritScrollPositions):
3091         (WebInspector.TextViewer.prototype.onResize):
3092         * inspector/front-end/TimelinePanel.js:
3093         (WebInspector.TimelinePanel.prototype.onResize):
3094         (WebInspector.TimelinePanel.prototype.elementsToRestoreScrollPositionsFor):
3095         (WebInspector.TimelinePanel.prototype.show):
3096         * inspector/front-end/View.js:
3097         (WebInspector.View):
3098         (WebInspector.View.prototype.wasShown):
3099         (WebInspector.View.prototype.willHide):
3100         (WebInspector.View.prototype._innerShow):
3101         (WebInspector.View.prototype.show):
3102         (WebInspector.View.prototype._innerHide):
3103         (WebInspector.View.prototype.hide):
3104         (WebInspector.View.prototype._detach):
3105         (WebInspector.View.prototype.elementsToRestoreScrollPositionsFor):
3106         (WebInspector.View.prototype.storeScrollPositions):
3107         (WebInspector.View.prototype.restoreScrollPositions):
3108         (WebInspector.View.prototype.addChildView):
3109         (WebInspector.View.prototype.removeChildView):
3110         (WebInspector.View.prototype.onResize):
3111         (WebInspector.View.prototype.doResize):
3112         (WebInspector.View.prototype.dispatchToSelfAndVisibleChildren):
3113         (WebInspector.View.prototype.dispatchToVisibleChildren):
3114         * inspector/front-end/inspector.js:
3115         (WebInspector.windowResize):
3116
3117 2011-08-16  Luke Macpherson   <macpherson@chromium.org>
3118
3119         Represent RenderStyle::textOverflow property using an enum instead of a bool.
3120         https://bugs.webkit.org/show_bug.cgi?id=66356
3121
3122         Reviewed by Dan Bernstein.
3123
3124         No new tests - no behavioral changes.
3125
3126         * css/CSSPrimitiveValueMappings.h:
3127         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3128         Support cast from TextOverflow to CSSPrimitiveValue.
3129         (WebCore::CSSPrimitiveValue::operator TextOverflow):
3130         Support cast from CSSPrimitiveValue to TextOverflow.
3131         * css/CSSStyleSelector.cpp:
3132         (WebCore::CSSStyleSelector::applyProperty):
3133         Use HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro for text overflow.
3134         * rendering/style/RenderStyle.h:
3135         (WebCore::InheritedFlags::textOverflow):
3136         Return TextOverflow enum.
3137         (WebCore::InheritedFlags::setTextOverflow):
3138         Accept TextOverflow enum parameter.
3139         (WebCore::InheritedFlags::initialTextOverflow):
3140         Return TextOverflowClip.
3141         * rendering/style/RenderStyleConstants.h:
3142         Define TextOverflow enum.
3143         * rendering/style/StyleRareNonInheritedData.h:
3144         Change representation of text overflow from bool to one-bit unsigned.
3145
3146 2011-08-16  Jeff Miller  <jeffm@apple.com>
3147
3148         Apple's Windows production build should fail to compile if AVFoundation is not enabled
3149         https://bugs.webkit.org/show_bug.cgi?id=66339
3150         
3151         Generate a compile-time error for Production builds if !USE(AVFOUNDATION).
3152
3153         Reviewed by Darin Adler.
3154
3155         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.cpp: Generate a compile-time error for Production builds if !USE(AVFOUNDATION).
3156
3157 2011-08-16  David Levin  <levin@chromium.org>
3158
3159         REGRESSION (r89086): All worker xhr requests trigger preflight requests.
3160         https://bugs.webkit.org/show_bug.cgi?id=66340
3161
3162         Reviewed by Adam Barth.
3163
3164         Test coming in a more comprehensive patch shortly. This is just a very targetted
3165         patch to allow for easier merging.
3166
3167         * loader/CrossOriginAccessControl.cpp:
3168         (WebCore::isOnAccessControlSimpleRequestHeaderWhitelist): Add referer to the list
3169         of whitelisted headers. It can't be set by xhr so it is ok to whitelist it, but it is
3170         set before calling this function. This is similar to what is done for "origin" in here.
3171
3172 2011-08-16  Shawn Singh  <shawnsingh@chromium.org>
3173
3174         Computing screen-space transform for LayerChromium and CCLayerImpl
3175         https://bugs.webkit.org/show_bug.cgi?id=66114
3176
3177         Reviewed by James Robinson.
3178
3179         Test: compositing/backface-visibility-hierarchical-transform.html
3180
3181         Added a data member to LayerChromium and CCLayerImpl that holds
3182         the screen-space transform.   The transform is computed in
3183         calculateDrawTransformsAndVisibility(), which is used during
3184         updating (LayerChromium) and drawing (CCLayerImpl).  This transform
3185         will also be used for other things, such as HUD drawing, in upcoming
3186         patches.
3187
3188         Also fixed a FIXME in LayerRendererChromium::drawLayer, which
3189         was not computing the entire hierarchy of transforms to determine
3190         back-face visibility.  Now it simply uses the screen space transform.
3191
3192         * platform/graphics/chromium/LayerChromium.h:
3193         (WebCore::LayerChromium::screenSpaceDrawTransform):
3194         (WebCore::LayerChromium::setScreenSpaceDrawTransform):
3195         * platform/graphics/chromium/LayerRendererChromium.cpp:
3196         (WebCore::LayerRendererChromium::updateLayers):
3197         (WebCore::LayerRendererChromium::drawLayersInternal):
3198         (WebCore::LayerRendererChromium::drawLayer):
3199         (WebCore::calculateDrawTransformsAndVisibility):
3200         * platform/graphics/chromium/cc/CCLayerImpl.h:
3201         (WebCore::CCLayerImpl::screenSpaceDrawTransform):
3202         (WebCore::CCLayerImpl::setScreenSpaceDrawTransform):
3203
3204 2011-08-16  Hayato Ito  <hayato@chromium.org>
3205
3206         Implement proper handling of events which happen in children of shadow hosts.
3207         https://bugs.webkit.org/show_bug.cgi?id=66285
3208
3209         Reviewed by Dimitri Glazkov.
3210
3211         Fix the issue where a shadow host stops an event propagation if an
3212         event happens at the children of shadow hosts, outside of the shadow root.
3213
3214         Test: fast/dom/shadow/shadow-contents-event.html
3215
3216         * dom/EventDispatcher.cpp:
3217         (WebCore::EventDispatcher::adjustToShadowBoundaries):
3218
3219 2011-08-16  Per-Erik Brodin  <per-erik.brodin@ericsson.com>
3220
3221         Make it possible to explicitly prevent a preflight via ThreadableLoaderOptions
3222         https://bugs.webkit.org/show_bug.cgi?id=65694
3223
3224         Reviewed by Alexey Proskuryakov.
3225
3226         No new tests since there is no change in behavior.
3227
3228         * fileapi/FileReaderLoader.cpp:
3229         (WebCore::FileReaderLoader::start):
3230         * loader/DocumentThreadableLoader.cpp:
3231         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
3232         (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
3233         * loader/ThreadableLoader.h:
3234         (WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions):
3235         * notifications/Notification.cpp:
3236         (WebCore::Notification::startLoading):
3237         * xml/XMLHttpRequest.cpp:
3238         (WebCore::XMLHttpRequest::createRequest):
3239
3240 2011-08-16  Scott Byer  <scottbyer@chromium.org>
3241
3242         Fix spelling error.
3243         https://bugs.webkit.org/show_bug.cgi?id=66261
3244
3245         Reviewed by Adam Barth.
3246
3247         No functional change, no tests needed.
3248
3249         * platform/ScrollAnimator.cpp:
3250         (WebCore::ScrollAnimator::scroll):
3251         (WebCore::ScrollAnimator::scrollToOffsetWithoutAnimation):
3252         (WebCore::ScrollAnimator::notifyPositionChanged):
3253         * platform/ScrollAnimator.h:
3254         * platform/ScrollAnimatorNone.cpp:
3255         (WebCore::ScrollAnimatorNone::scrollToOffsetWithoutAnimation):
3256         (WebCore::ScrollAnimatorNone::animationTimerFired):
3257         * platform/ScrollAnimatorWin.cpp:
3258         (WebCore::ScrollAnimatorWin::scrollToOffsetWithoutAnimation):
3259         (WebCore::ScrollAnimatorWin::animateScroll):
3260         * platform/chromium/ScrollAnimatorChromiumMac.h:
3261         * platform/chromium/ScrollAnimatorChromiumMac.mm:
3262         (WebCore::ScrollAnimatorChromiumMac::immediateScrollToPoint):
3263         (WebCore::ScrollAnimatorChromiumMac::immediateScrollByDeltaX):
3264         (WebCore::ScrollAnimatorChromiumMac::immediateScrollByDeltaY):
3265         (WebCore::ScrollAnimatorChromiumMac::notifyPositionChanged):
3266         * platform/mac/ScrollAnimatorMac.h:
3267         * platform/mac/ScrollAnimatorMac.mm:
3268         (WebCore::ScrollAnimatorMac::immediateScrollToPoint):
3269         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaX):
3270         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaY):
3271         (WebCore::ScrollAnimatorMac::notifyPositionChanged):
3272
3273 2011-08-16  Joseph Pecoraro  <joepeck@webkit.org>
3274
3275         ASSERT in fast/css/custom-font-xheight.html
3276         https://bugs.webkit.org/show_bug.cgi?id=66328
3277
3278         Reviewed by Dan Bernstein.
3279
3280         In r93140 the temporary font created for a remote CSS font face
3281         was created without being retained. We need to protect the
3282         font from being purged while we hold onto it, so add a font cache
3283         purge preventer.
3284
3285         * css/CSSFontFaceSource.cpp:
3286         (WebCore::CSSFontFaceSource::getFontData):
3287
3288 2011-08-16  Joseph Pecoraro  <joepeck@webkit.org>
3289
3290         Unreviewed Chromium Windows build fix after r93140. Take 4.
3291         Namespace the now public enum as FontCache::ShouldRetain.
3292
3293         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
3294         (WebCore::GetLastResortFallbackFontProcData::GetLastResortFallbackFontProcData):
3295
3296 2011-08-15  Stephen White  <senorblanco@chromium.org>
3297
3298         Canvas resizing can be slow
3299         https://bugs.webkit.org/show_bug.cgi?id=66251
3300
3301         Canvas resizing was slow due to re-allocation of the ImageBuffer on
3302         each size change (width or height).  This was introduced inadvertently
3303         by calls to isAccelerated() during canvas reset().  Since we won't 
3304         know if we have successfully accelerated until ImageBuffer creation,
3305         move the compositor invalidation to createImageBuffer() as well.
3306         This patch also attempts to unify the Skia and CG accelerated canvas
3307         paths.  The DrawingBuffer used by the Skia path is now owned by 
3308         ImageBuffer[Skia], similar to how the IOSurface is owned by
3309         ImageBuffer[CG].  Some of the logic for when to accelerate was moved
3310         into HTMLCanvasElement and unified with the CG path.  Acceleration is
3311         also now enabled by the same "Accelerated" ImageBuffer create flag
3312         used by the CG path.  DrawingBuffer is now re-created even for a 
3313         same-size change (same as the memory buffer), but we speed it up
3314         by calling GraphicsContext3D::texImage2D() with a NULL pixels ptr
3315         instead of GraphicsContext3D::teximage2DResourceSafe() (no need to
3316         clear it, since it's done with a glClear anyway).
3317
3318         Reviewed by Kenneth Russell.
3319
3320         Covered by existing tests in fast/canvas and canvas/philip.
3321
3322         * html/HTMLCanvasElement.cpp:
3323         (WebCore::HTMLCanvasElement::reset):
3324         Don't call isAccelerated() from reset(), since we don't want to
3325         inadvertently create the ImageBuffer.  Also, since we won't know if
3326         we have successfully accelerated until createImageBuffer() is
3327         called, defer the compositor invalidation to createImageBuffer() as
3328         well.
3329         (WebCore::HTMLCanvasElement::shouldAccelerate):
3330         Unify the CG and Skia ports' logic for when to accelerate (Skia
3331         logic moved in from CanvasRenderingContext2D).
3332         (WebCore::HTMLCanvasElement::createImageBuffer):
3333         Use the unified shouldAccelerate() logic, and pass it as a flag
3334         to ImageBuffer.  Do compositor invalidation as well.
3335         * html/HTMLCanvasElement.h:
3336         (WebCore::HTMLCanvasElement::hasCreatedImageBuffer):
3337         Expose hasCreatedImageBuffer() publically, so
3338         CanvasRenderingContext2D::isAccelerated() doesn't inadvertently create
3339         it.
3340         * html/canvas/CanvasRenderingContext2D.cpp:
3341         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
3342         (WebCore::CanvasRenderingContext2D::~CanvasRenderingContext2D):
3343         Remove all acceleration setting and resetting, since it's now done
3344         during ImageBuffer creation.
3345         (WebCore::CanvasRenderingContext2D::isAccelerated):
3346         Check if the image buffer was created, so we don't inadvertently
3347         create it here.
3348         (WebCore::CanvasRenderingContext2D::paintsIntoCanvasBuffer):
3349         Don't call GraphicsContext3D::paintsIntoCanvasBuffer(), since its
3350         WebViewImpl may be null.  Ask the render tree instead.
3351         (WebCore::CanvasRenderingContext2D::reset):
3352         Don't reset acceleration here, since we don't own it anymore.
3353         (WebCore::CanvasRenderingContext2D::platformLayer):
3354         Call into the ImageBuffer to get our PlatformLayer.
3355         * html/canvas/CanvasRenderingContext2D.h:
3356         Remove m_drawingBuffer, and all acceleration-related calls.
3357         * platform/graphics/GraphicsContext.cpp:
3358         * platform/graphics/GraphicsContext.h:
3359         Remove setGraphicsContext3D(), and paintsIntoImageBuffer().
3360         * platform/graphics/ImageBuffer.cpp:
3361         (WebCore::ImageBuffer::platformLayer):
3362         Implement a dummy platformLayer() call for non-skia ports.
3363         * platform/graphics/ImageBuffer.h:
3364         Declare a platformLayer() call (USE(ACCELERATED_COMPOSITING) only).
3365         * platform/graphics/chromium/ImageBufferDataSkia.h:
3366         Add a DrawingBuffer data member.
3367         * platform/graphics/gpu/DrawingBuffer.cpp:
3368         (WebCore::DrawingBuffer::reset):
3369         Use texImage2D() with a NULL ptr, not texImage2DResourceSafe().
3370         Since we immediately clear the framebuffer via glClear(), this whole
3371         resource safe business is overkill.
3372         * platform/graphics/skia/GraphicsContextSkia.cpp:
3373         Remove setGraphicsContext3D() and paintsIntoImageBuffer().  This
3374         functionality is handled by ImageBuffer now.
3375         * platform/graphics/skia/ImageBufferSkia.cpp:
3376         (WebCore::ImageBuffer::ImageBuffer):
3377         Give the ImageBufferData ownership of the DrawingBuffer.
3378         (WebCore::ImageBuffer::platformLayer):
3379         Implement an accessor for the DrawingBuffer's PlatformLayer.
3380         * platform/graphics/skia/PlatformContextSkia.cpp:
3381         (WebCore::PlatformContextSkia::setGraphicsContext3D):
3382         * platform/graphics/skia/PlatformContextSkia.h:
3383         Remove isPathSkiaSafe() extern (unused).
3384         Remove paintsIntoImageBuffer() (now unused).  Remove IntSize param
3385         from setGraphicsContext3D() (unused).
3386
3387 2011-08-16  Joseph Pecoraro  <joepeck@webkit.org>
3388
3389         Unreviewed Chromium Windows build fix after r93140. Take 3.
3390         Include the proper includes!
3391
3392         * platform/graphics/FontCache.h:
3393
3394 2011-08-16  Mihnea Ovidenie  <mihnea@adobe.com>
3395
3396         Unmatrix algorithm implementation is wrong
3397         https://bugs.webkit.org/show_bug.cgi?id=66080
3398
3399         Reviewed by Dean Jackson.
3400
3401         Current version of the algorithm negates only the scaleX while
3402         it should negate also scaleY and scaleZ when appropriate.
3403
3404         Test: animations/animation-matrix-negative-scale-unmatrix.html
3405
3406         * platform/graphics/transforms/TransformationMatrix.cpp:
3407         (WebCore::decompose):
3408
3409 2011-08-16  Joseph Pecoraro  <joepeck@webkit.org>
3410
3411         Unreviewed Chromium Windows build fix after r93140.
3412
3413         This just makes the troublesome enum public. If this
3414         fixes the build I will file a follow-up bug to clean-up
3415         these build issues and either keep the enum public and
3416         cleanup other functions or restore the enum to private.
3417         There is no harm in making the enum public right now.
3418
3419         * platform/graphics/FontCache.h:
3420
3421 2011-08-16  Joseph Pecoraro  <joepeck@webkit.org>
3422
3423         Unreviewed Chromium Windows build fix after r93140.
3424
3425         * platform/graphics/FontCache.h:
3426
3427 2011-08-16  Joseph Pecoraro  <joepeck@webkit.org>
3428
3429         Unreviewed Windows and Chromium Windows build fix after r93140.
3430
3431         * platform/graphics/FontCache.h:
3432         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
3433         (WebCore::FontCache::fontDataFromDescriptionAndLogFont):
3434         (WebCore::getLastResortFallbackFontProc):
3435         (WebCore::FontCache::getLastResortFallbackFont):
3436         * platform/graphics/win/FontCacheWin.cpp:
3437         (WebCore::FontCache::fontDataFromDescriptionAndLogFont):
3438         (WebCore::FontCache::getLastResortFallbackFont):
3439
3440 2011-08-16  Adam Roben  <aroben@apple.com>
3441
3442         Make placeholder text remain visible until a character is typed on Windows
3443
3444         Fixes <http://webkit.org/b/66319> Placeholder text in text fields disappears when the field
3445         is focused on Windows, which doesn't match Lion or Windows native text fields
3446
3447         Covered by existing tests (which are currently failing on the bots until this patch lands).
3448