Bug 89258 - [Chromium] Ensure layout has happened before calling into hasNonEmptyBoundingBox()
Summary: [Chromium] Ensure layout has happened before calling into hasNonEmptyBounding...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ilya Sherman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-15 18:02 PDT by Ilya Sherman
Modified: 2012-06-21 14:26 PDT (History)
6 users (show)

See Also:


Attachments
Patch (1.27 KB, patch)
2012-06-15 18:03 PDT, Ilya Sherman
no flags Details | Formatted Diff | Diff
Patch (1.69 KB, patch)
2012-06-15 19:32 PDT, Ilya Sherman
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ilya Sherman 2012-06-15 18:02:33 PDT
[Chromium] Ensure layout has happened before calling into hasNonEmptyBoundingBox()
Comment 1 Ilya Sherman 2012-06-15 18:03:20 PDT
Created attachment 147929 [details]
Patch
Comment 2 James Robinson 2012-06-15 18:13:27 PDT
Comment on attachment 147929 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=147929&action=review

> Source/WebKit/chromium/src/WebNode.cpp:218
> +    m_private->document()->updateLayout();

most code in WebCore of this nature calls updateLayoutIgnorePendingStylesheets() - it deals with a m_hasNodesWithPlaceholderStyle case that seems important
Comment 3 Ilya Sherman 2012-06-15 19:32:52 PDT
Created attachment 147939 [details]
Patch
Comment 4 Ilya Sherman 2012-06-15 19:33:46 PDT
(In reply to comment #2)
> (From update of attachment 147929 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=147929&action=review
> 
> > Source/WebKit/chromium/src/WebNode.cpp:218
> > +    m_private->document()->updateLayout();
> 
> most code in WebCore of this nature calls updateLayoutIgnorePendingStylesheets() - it deals with a m_hasNodesWithPlaceholderStyle case that seems important

Ok, switched to using that method.
Comment 5 WebKit Review Bot 2012-06-18 16:04:01 PDT
Comment on attachment 147939 [details]
Patch

Clearing flags on attachment: 147939

Committed r120637: <http://trac.webkit.org/changeset/120637>
Comment 6 WebKit Review Bot 2012-06-18 16:04:16 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Eric Seidel (no email) 2012-06-19 16:44:22 PDT
What are the side-effects of this change?  Also I'm surprised by the lack of testing?  is testing impossible/impractical?
Comment 8 Ilya Sherman 2012-06-21 14:26:34 PDT
(In reply to comment #7)
> What are the side-effects of this change?

Side-effects include correctness improvements for callers of the two affected methods, and presumably some minimal performance degradations to compensate.  (The impact on performance appears not to be causing any issues for existing clients.)

> Also I'm surprised by the lack of testing?  is testing impossible/impractical?

AFAIK, the Chromium WebKit API is generally not tested within the WebKit project.  However, the correctness issue was caught by a Chromium test, so there is some test coverage.