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